drm/msm: Don't fallback to shared VM for VM_BIND

If the user wants a userspace managed VM (EN_VM_BIND) don't silently
fall back to shared VM.

Signed-off-by: Rob Clark <robin.clark@oss.qualcomm.com>
Patchwork: https://patchwork.freedesktop.org/patch/743110/
Message-ID: <20260729155609.20190-16-robin.clark@oss.qualcomm.com>
This commit is contained in:
Rob Clark 2026-07-29 08:55:52 -07:00
parent 00dfa76bdf
commit 3b35a5c528
2 changed files with 3 additions and 2 deletions

View File

@ -234,7 +234,8 @@ struct drm_gpuvm *msm_context_vm(struct drm_device *dev, struct msm_context *ctx
if (!ctx->vm) {
vm = msm_gpu_create_private_vm(
priv->gpu, current, !ctx->userspace_managed_vm);
smp_store_release(&ctx->vm, vm);
if (!IS_ERR_OR_NULL(vm))
smp_store_release(&ctx->vm, vm);
}
return ctx->vm;

View File

@ -879,7 +879,7 @@ msm_gpu_create_private_vm(struct msm_gpu *gpu, struct task_struct *task,
to_msm_vm(vm)->pid = get_pid(task_pid(task));
}
if (IS_ERR_OR_NULL(vm))
if (IS_ERR_OR_NULL(vm) && kernel_managed)
vm = drm_gpuvm_get(gpu->vm);
return vm;