aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/msm/msm_gem.c
diff options
context:
space:
mode:
authorRob Clark <[email protected]>2025-06-29 20:13:05 +0000
committerRob Clark <[email protected]>2025-07-05 00:48:36 +0000
commitfeb8ef4636a457a1fd916a3ae575f552935e69b9 (patch)
treee8a5ad9c03613d716cc68aba1d6bad6ef2db316a /drivers/gpu/drm/msm/msm_gem.c
parentdrm/msm: Lazily create context VM (diff)
downloadkernel-feb8ef4636a457a1fd916a3ae575f552935e69b9.tar.gz
kernel-feb8ef4636a457a1fd916a3ae575f552935e69b9.zip
drm/msm: Add opt-in for VM_BIND
Add a SET_PARAM for userspace to request to manage to the VM itself, instead of getting a kernel managed VM. In order to transition to a userspace managed VM, this param must be set before any mappings are created. Signed-off-by: Rob Clark <[email protected]> Signed-off-by: Rob Clark <[email protected]> Tested-by: Antonino Maniscalco <[email protected]> Reviewed-by: Antonino Maniscalco <[email protected]> Patchwork: https://patchwork.freedesktop.org/patch/661494/
Diffstat (limited to 'drivers/gpu/drm/msm/msm_gem.c')
-rw-r--r--drivers/gpu/drm/msm/msm_gem.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/gpu/drm/msm/msm_gem.c b/drivers/gpu/drm/msm/msm_gem.c
index 186d160b74de..d16d3012434a 100644
--- a/drivers/gpu/drm/msm/msm_gem.c
+++ b/drivers/gpu/drm/msm/msm_gem.c
@@ -82,6 +82,14 @@ static void msm_gem_close(struct drm_gem_object *obj, struct drm_file *file)
return;
/*
+ * VM_BIND does not depend on implicit teardown of VMAs on handle
+ * close, but instead on implicit teardown of the VM when the device
+ * is closed (see msm_gem_vm_close())
+ */
+ if (msm_context_is_vmbind(ctx))
+ return;
+
+ /*
* TODO we might need to kick this to a queue to avoid blocking
* in CLOSE ioctl
*/