From: Luigi Santivetti <luigi.santivetti@imgtec.com>
To: Gyeyoung Baek <gye976@gmail.com>,
Alessio Belle <alessio.belle@imgtec.com>,
Maarten Lankhorst <maarten.lankhorst@linux.intel.com>,
Maxime Ripard <mripard@kernel.org>,
Thomas Zimmermann <tzimmermann@suse.de>,
David Airlie <airlied@gmail.com>, Simona Vetter <simona@ffwll.ch>
Cc: Alexandru Dadu <alexandru.dadu@imgtec.com>,
Brajesh Gupta <brajesh.gupta@imgtec.com>,
Frank Binns <frank.binns@imgtec.com>,
<imagination@lists.freedesktop.org>,
<dri-devel@lists.freedesktop.org>, <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v2 2/2] drm/imagination: Stop locking reservations around map and unmap
Date: Thu, 26 Nov 2026 15:42:44 +0000 [thread overview]
Message-ID: <1463fe4976d02b8b6d748dbb560a88bf54525cf1.camel@imgtec.com> (raw)
In-Reply-To: <20261011-pvr-gpuvm-immediate-v2-2-744ddc6644c3@gmail.com>
Hi Gyeyoung,
this patch (and the previous) was tested with a CTS cycle and results showed no
regressions.
On Sun, 2026-10-11 at 18:45 +0900, Gyeyoung Baek wrote:
> The GPUVA lists are now protected by gpuva.lock instead of the
> reservations, so map and unmap no longer need to lock the reservations.
> Nothing else on that path relies on them.
>
> Signed-off-by: Gyeyoung Baek <gye976@gmail.com>
> ---
Reviewed-by: Luigi Santivetti <luigi.santivetti@imgtec.com>
> drivers/gpu/drm/imagination/pvr_vm.c | 43 ------------------------------------
> 1 file changed, 43 deletions(-)
>
> diff --git a/drivers/gpu/drm/imagination/pvr_vm.c b/drivers/gpu/drm/imagination/pvr_vm.c
> index 807a01aab1d..08ce6542550 100644
> --- a/drivers/gpu/drm/imagination/pvr_vm.c
> +++ b/drivers/gpu/drm/imagination/pvr_vm.c
> @@ -704,16 +704,6 @@ void pvr_destroy_vm_contexts_for_file(struct pvr_file *pvr_file)
> }
> }
>
> -static int
> -pvr_vm_lock_extra(struct drm_gpuvm_exec *vm_exec)
> -{
> - struct pvr_vm_bind_op *bind_op = vm_exec->extra.priv;
> - struct pvr_gem_object *pvr_obj = bind_op->pvr_obj;
> -
> - /* Acquire lock on the GEM object being mapped/unmapped. */
> - return drm_exec_lock_obj(&vm_exec->exec, gem_from_pvr_gem(pvr_obj));
> -}
> -
> /**
> * pvr_vm_map() - Map a section of physical memory into a section of
> * device-virtual memory.
> @@ -741,15 +731,6 @@ pvr_vm_map(struct pvr_vm_context *vm_ctx, struct pvr_gem_object *pvr_obj,
> u64 pvr_obj_offset, u64 device_addr, u64 size)
> {
> struct pvr_vm_bind_op bind_op = {0};
> - struct drm_gpuvm_exec vm_exec = {
> - .vm = &vm_ctx->gpuvm_mgr,
> - .flags = DRM_EXEC_INTERRUPTIBLE_WAIT |
> - DRM_EXEC_IGNORE_DUPLICATES,
> - .extra = {
> - .fn = pvr_vm_lock_extra,
> - .priv = &bind_op,
> - },
> - };
>
> int err = pvr_vm_bind_op_map_init(&bind_op, vm_ctx, pvr_obj,
> pvr_obj_offset, device_addr,
> @@ -761,15 +742,7 @@ pvr_vm_map(struct pvr_vm_context *vm_ctx, struct pvr_gem_object *pvr_obj,
> pvr_gem_object_get(pvr_obj);
>
> mutex_lock(&vm_ctx->lock);
> - err = drm_gpuvm_exec_lock(&vm_exec);
> - if (err)
> - goto err_cleanup;
> -
> err = pvr_vm_bind_op_exec(&bind_op);
> -
> - drm_gpuvm_exec_unlock(&vm_exec);
> -
> -err_cleanup:
> mutex_unlock(&vm_ctx->lock);
>
> pvr_vm_bind_op_fini(&bind_op);
> @@ -802,15 +775,6 @@ pvr_vm_unmap_obj_locked(struct pvr_vm_context *vm_ctx,
> u64 device_addr, u64 size)
> {
> struct pvr_vm_bind_op bind_op = {0};
> - struct drm_gpuvm_exec vm_exec = {
> - .vm = &vm_ctx->gpuvm_mgr,
> - .flags = DRM_EXEC_INTERRUPTIBLE_WAIT |
> - DRM_EXEC_IGNORE_DUPLICATES,
> - .extra = {
> - .fn = pvr_vm_lock_extra,
> - .priv = &bind_op,
> - },
> - };
>
> int err = pvr_vm_bind_op_unmap_init(&bind_op, vm_ctx, pvr_obj,
> device_addr, size);
> @@ -819,15 +783,8 @@ pvr_vm_unmap_obj_locked(struct pvr_vm_context *vm_ctx,
>
> pvr_gem_object_get(pvr_obj);
>
> - err = drm_gpuvm_exec_lock(&vm_exec);
> - if (err)
> - goto err_cleanup;
> -
> err = pvr_vm_bind_op_exec(&bind_op);
>
> - drm_gpuvm_exec_unlock(&vm_exec);
> -
> -err_cleanup:
> pvr_vm_bind_op_fini(&bind_op);
>
> return err;
>
next prev parent reply other threads:[~2026-11-26 15:43 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-11 9:45 [PATCH v2 0/2] drm/imagination: Switch the GPUVM to immediate mode Gyeyoung Baek
2026-10-11 9:45 ` [PATCH v2 1/2] " Gyeyoung Baek
2026-10-31 16:44 ` Gyeyoung Baek
2026-11-26 15:41 ` Luigi Santivetti
2026-10-11 9:45 ` [PATCH v2 2/2] drm/imagination: Stop locking reservations around map and unmap Gyeyoung Baek
2026-11-26 15:42 ` Luigi Santivetti [this message]
2026-11-17 9:27 ` [PATCH v2 0/2] drm/imagination: Switch the GPUVM to immediate mode Luigi Santivetti
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=1463fe4976d02b8b6d748dbb560a88bf54525cf1.camel@imgtec.com \
--to=luigi.santivetti@imgtec.com \
--cc=airlied@gmail.com \
--cc=alessio.belle@imgtec.com \
--cc=alexandru.dadu@imgtec.com \
--cc=brajesh.gupta@imgtec.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=frank.binns@imgtec.com \
--cc=gye976@gmail.com \
--cc=imagination@lists.freedesktop.org \
--cc=linux-kernel@vger.kernel.org \
--cc=maarten.lankhorst@linux.intel.com \
--cc=mripard@kernel.org \
--cc=simona@ffwll.ch \
--cc=tzimmermann@suse.de \
/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
all inboxes | Powered by JetHome®