drm/amdgpu: validate the parameters of bo mapping operations more clearly
authorxinhui pan <xinhui.pan@amd.com>
Thu, 11 Apr 2024 03:11:38 +0000 (11:11 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 17 Apr 2024 02:39:15 +0000 (22:39 -0400)
commit98856136c485e586ab063f0b3780dfc0c78df780
tree6cbf5d325615db7c1b291dca568e48b25710b77d
parentf23558627f2bb28df3b7f3d1d53b1e7f4bd1e250
drm/amdgpu: validate the parameters of bo mapping operations more clearly

Verify the parameters of
amdgpu_vm_bo_(map/replace_map/clearing_mappings) in one common place.

Fixes: dc54d3d1744d ("drm/amdgpu: implement AMDGPU_VA_OP_CLEAR v2")
Cc: stable@vger.kernel.org
Reported-by: Vlad Stolyarov <hexed@google.com>
Suggested-by: Christian König <christian.koenig@amd.com>
Signed-off-by: xinhui pan <xinhui.pan@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_vm.c