From: Boris Brezillon <boris.brezillon@collabora.com>
To: Steven Price <steven.price@arm.com>
Cc: "Liviu Dudau" <liviu.dudau@arm.com>,
"Adrián Larumbe" <adrian.larumbe@collabora.com>,
dri-devel@lists.freedesktop.org,
"Lars-Ivar Hesselberg Simonsen" <lars-ivar.simonsen@arm.com>,
kernel@collabora.com, "Karunika Choo" <karunika.choo@arm.com>
Subject: Re: [PATCH v1 2/4] drm/panthor: Add support for atomic page table updates
Date: Fri, 7 Nov 2025 18:14:30 +0100 [thread overview]
Message-ID: <20251107181430.32cf2162@fedora> (raw)
In-Reply-To: <6d6b2e09-5093-4a91-aa81-b39147515107@arm.com>
On Fri, 7 Nov 2025 16:26:54 +0000
Steven Price <steven.price@arm.com> wrote:
> On 31/10/2025 15:48, Boris Brezillon wrote:
> > Move the lock/flush_mem operations around the gpuvm_sm_[un]map() calls
> > so we can implement true atomic page updates, where any access in the
> > locked range done by the GPU has to wait for the page table updates
> > to land before proceeding.
> >
> > This is needed for vkQueueBindSparse(), so we can replace the dummy
> > page mapped over the entire object by actual BO backed pages in an atomic
> > way. But it's also useful to avoid "AS_ACTIVE bit stuck" failures in
> > the sm_[un]map() path, leading to gpuvm state inconsistencies.
> >
> > Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
>
> +CC: Karunika
>
> The concept here looks good, but...
>
> This is effectively undoing the changes that Karunika did in commit
> dd11c7dec74b ("drm/panthor: Make MMU cache maintenance use FLUSH_CACHES
> command"). The FLUSH_MEM/FLUSH_PT commands have been deprecated in
> Mali-Gx20, so either this needs refactoring to use the newer
> FLUSH_CACHES GPU_COMMAND.
>
> I believe the expected ideal approach on later GPUs is:
>
> 1. LOCK
> 2. Make page table updates
> 3. FLUSH_RANGE to GPU_COMMAND flushing the *physical* address ranges
> 4. UNLOCK
>
> Note that on earlier GPUs we don't have FLUSH_RANGE so FLUSH_CACHES
> replaces step 3 (and is what we have upstream). But I think this is the
> reason why FLUSH_MEM/FLUSH_PT are deprecated because those work on a
> virtual address range.
Ah, right. I'll revisit the logic to have it working on newer gens.
next prev parent reply other threads:[~2025-11-07 17:14 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-31 15:48 [PATCH v1 0/4] drm/panthor: Misc fixes Boris Brezillon
2025-10-31 15:48 ` [PATCH v1 1/4] drm/panthor: Fix UAF on kernel BO VA nodes Boris Brezillon
2025-11-03 11:10 ` Liviu Dudau
2025-11-03 14:34 ` Liviu Dudau
2025-10-31 15:48 ` [PATCH v1 2/4] drm/panthor: Add support for atomic page table updates Boris Brezillon
2025-11-07 16:26 ` Steven Price
2025-11-07 17:14 ` Boris Brezillon [this message]
2025-10-31 15:48 ` [PATCH v1 3/4] drm/panthor: Make panthor_vm_[un]map_pages() more robust Boris Brezillon
2025-11-03 21:00 ` Akash Goel
2025-11-04 7:43 ` Boris Brezillon
2025-10-31 15:48 ` [PATCH v1 4/4] drm/panthor: Relax check in panthor_sched_pre_reset() Boris Brezillon
2025-11-07 16:40 ` Steven Price
2025-11-12 12:47 ` Boris Brezillon
2025-11-17 9:49 ` Steven Price
2025-11-17 10:26 ` Boris Brezillon
2025-11-17 11:07 ` Steven Price
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=20251107181430.32cf2162@fedora \
--to=boris.brezillon@collabora.com \
--cc=adrian.larumbe@collabora.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=karunika.choo@arm.com \
--cc=kernel@collabora.com \
--cc=lars-ivar.simonsen@arm.com \
--cc=liviu.dudau@arm.com \
--cc=steven.price@arm.com \
/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