From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from bali.collaboradmins.com (bali.collaboradmins.com [148.251.105.195]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0F7113B8BB9 for ; Thu, 24 Sep 2026 12:30:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=148.251.105.195 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1790253057; cv=none; b=IBimOH9KzW1jYoG2VxOmqL/5ECXp5hCXX9NR9YvOJ+fCPvCbAzR/PzVXl75jY2vy7cOuxZP6mMf1as3jP2NjMF5BzEAFWMyRMlGTcfzD+0hxz3W0Db5sYTxLtgu3eZ4YO7tvtVkmJdmKWGzoegHwfRroenvm69a8VHNH4vSsB+o= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1790253057; c=relaxed/simple; bh=wzmzkZ9ZhUiQxGJYR6sBbhtS0oVJuIIFllbIo4vfYrk=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=N8QkPWlSxO5GWkPnWTy+h0TtpfO1kZYtltwPy/stJkmzEzcc4tNeMS+5MZFtoy1NAbiqImgjPsLNoSY/cAczjPI55TC2ELYDKwS3n714tBUkjDaB2jqinZN+6M3PAv0lYDI5uGg5ndwgNBb2b4ReLTsb4LlJ1URlh1XKZpAWn1Y= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=collabora.com; spf=pass smtp.mailfrom=collabora.com; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b=QCEeOxDS; arc=none smtp.client-ip=148.251.105.195 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=collabora.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=collabora.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b="QCEeOxDS" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1790253053; bh=wzmzkZ9ZhUiQxGJYR6sBbhtS0oVJuIIFllbIo4vfYrk=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=QCEeOxDSE2B7OCvO5L02ujAM50SAvZC7Y5F7DDk8gXsSPVucgh1HpIoRuDFCKGy0b OTjLNiV80VThcZNAKesM3mmNsplnMe3vPzpXzP+P6Ny55v59gOr7Uk8I6nwQt8wtXK g3trkxc9mP0gx+y6FhYEtlF4zqLPJZpS+eBHPw363cTQ3STGKj+Ejg/Qo3XIlyQESn i8SoR6Ff5u68gMBTshTZ/U7IdJajP0utnPCMRYrKrpq3QT5dHH7N1hCYitu7RxCWje 5cYjqZwLHUs9xHTgEB1P0akhdumvSc/I3Uyid6JX1SC2Ik8dq/r8WGvCgfaLAgR2c9 Ez8qZvh4OtsQQ== Received: from fedora-32.home (unknown [100.64.0.11]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: bbrezillon) by bali.collaboradmins.com (Postfix) with ESMTPSA id 9DE2017E0A68; Thu, 24 Sep 2026 14:30:52 +0200 (CEST) From: Boris Brezillon Date: Thu, 24 Sep 2026 14:30:43 +0200 Subject: [PATCH 1/3] drm/panthor: Don't invalidate OTHER caches Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20260924-panthor-mmu-fixes-v1-1-e25f9b106466@collabora.com> References: <20260924-panthor-mmu-fixes-v1-0-e25f9b106466@collabora.com> In-Reply-To: <20260924-panthor-mmu-fixes-v1-0-e25f9b106466@collabora.com> To: Steven Price , Liviu Dudau , Akash Goel Cc: Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Simona Vetter , Chia-I Wu , dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, Boris Brezillon X-Mailer: b4 0.15.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1790253051; l=1715; i=boris.brezillon@collabora.com; s=20260429; h=from:subject:message-id; bh=wzmzkZ9ZhUiQxGJYR6sBbhtS0oVJuIIFllbIo4vfYrk=; b=LcVX7O2aDqNbkbo6BkeZhxzvSHttYQtYb4Mtxw5SCYJzC8T+XeH5Wq8dZ0D0dAsKQFz3arQpx vG4qiknSJkbCcyVGcfO0yyH45jQSaIODcKpNOd7foJbSh07PSfF0d+k X-Developer-Key: i=boris.brezillon@collabora.com; a=ed25519; pk=eN+ORdOgQY7d5U+0kA8h5bf67XdD8bhKbjD/TCHexSY= Don't invalidate the OTHER caches (AKA L1 read-only caches) since this seems to trip out the flush-elimination logic on v13, and it's not needed in practice (can't leak other context data because of TLB invalidation or corrupt physical pages returned to the system because it's a RO cache). It's also worth noting that the downstream driver has been avoid OTHER caches invalidation from the start, and that we were doing the same until atomic page table update was introduced. Fixes: 6e2d3b3e8589 ("drm/panthor: Add support for atomic page table updates") Signed-off-by: Boris Brezillon --- drivers/gpu/drm/panthor/panthor_mmu.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/panthor/panthor_mmu.c b/drivers/gpu/drm/panthor/panthor_mmu.c index 9f63a048df61..7e98084b9a1e 100644 --- a/drivers/gpu/drm/panthor/panthor_mmu.c +++ b/drivers/gpu/drm/panthor/panthor_mmu.c @@ -634,7 +634,7 @@ static int panthor_mmu_as_disable(struct panthor_device *ptdev, u32 as_nr, /* Flush+invalidate RW caches, invalidate RO ones. */ ret = panthor_gpu_flush_caches(ptdev, CACHE_CLEAN | CACHE_INV, - CACHE_CLEAN | CACHE_INV, CACHE_INV); + CACHE_CLEAN | CACHE_INV, 0); if (ret) return ret; @@ -1841,8 +1841,7 @@ static void panthor_vm_unlock_region(struct panthor_vm *vm) * range is narrow enough and the HW supports it. */ ret = panthor_gpu_flush_caches(ptdev, CACHE_CLEAN | CACHE_INV, - CACHE_CLEAN | CACHE_INV, - CACHE_INV); + CACHE_CLEAN | CACHE_INV, 0); /* Unlock the region if the flush is effective. */ if (!ret) -- 2.55.0