drm/amdgpu: Add debug bit for userptr usage
authorShane Xiao <shane.xiao@amd.com>
Thu, 24 Apr 2025 05:15:01 +0000 (13:15 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 7 May 2025 21:45:04 +0000 (17:45 -0400)
commit8e320f67d49d6bb28eba9c8bded66ad04b0acf0b
treeb4c6ad9fa1aecaab1258cb40ae517683723bb1d6
parentdef41146b96a9e292a17cddb1ac97007f41c44bc
drm/amdgpu: Add debug bit for userptr usage

In VM debug mode, it is desirable to notify the application
to correct the freeing sequence by unmapping the memory before
destroying the userptr in the old userptr path. Add a bitmask
to decide whether to send gpu vm fault to the applition.

Signed-off-by: Shane Xiao <shane.xiao@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu.h
drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c