dri-devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Boris Brezillon" <boris.brezillon@collabora.com>
Cc: dri-devel@lists.freedesktop.org
Subject: Re: [PATCH 1/3] drm/panthor: Don't invalidate OTHER caches
Date: Thu, 24 Sep 2026 12:36:23 +0000	[thread overview]
Message-ID: <20260924123624.546901F000FF@smtp.kernel.org> (raw)
In-Reply-To: <20260924-panthor-mmu-fixes-v1-1-e25f9b106466@collabora.com>

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Low] doc: comment contradicts code on RO cache invalidation
--

commit 97f084533582df463bbfd6d17bb8670c85068160
Author: Boris Brezillon <boris.brezillon@collabora.com>

drm/panthor: Don't invalidate OTHER caches

This commit stops invalidating OTHER (L1 read-only) caches during MMU
operations to prevent issues with flush-elimination logic on v13 hardware.
The invalidation is deemed unnecessary as TLB invalidation prevents context
data leaks and the cache is read-only.

> diff --git a/drivers/gpu/drm/panthor/panthor_mmu.c b/drivers/gpu/drm/panthor/panthor_mmu.c
> index 9f63a048df61c..7e98084b9a1ed 100644
> --- a/drivers/gpu/drm/panthor/panthor_mmu.c
> +++ b/drivers/gpu/drm/panthor/panthor_mmu.c

[ ... ]

> @@ -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);

[Severity: Low]
This isn't a bug, but should the comment just above this call in
panthor_vm_unlock_region() be updated?

The comment still explicitly says "and invalidate RO ones", which now
contradicts the implementation since 0 is being passed for the OTHER (RO)
caches.

>  
>  		/* Unlock the region if the flush is effective. */
>  		if (!ret)

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260924-panthor-mmu-fixes-v1-0-e25f9b106466@collabora.com?part=1

  reply	other threads:[~2026-09-24 12:36 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-24 12:30 [PATCH 0/3] drm/panthor: Misc MMU fixes/robustness improvements Boris Brezillon
2026-09-24 12:30 ` [PATCH 1/3] drm/panthor: Don't invalidate OTHER caches Boris Brezillon
2026-09-24 12:36   ` sashiko-bot [this message]
2026-09-24 12:30 ` [PATCH 2/3] drm/panthor: Fully disable the AS even if it's going to be re-assigned Boris Brezillon
2026-09-24 12:30 ` [PATCH 3/3] drm/panthor: Move cache-flush after UPDATE(UNMAPPED) Boris Brezillon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260924123624.546901F000FF@smtp.kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=boris.brezillon@collabora.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=sashiko-reviews@lists.linux.dev \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox