summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c
diff options
context:
space:
mode:
authorChristian König2016-02-08 11:08:35 +0100
committerAlex Deucher2016-02-10 20:17:16 +0100
commitcc325d1913475655b81c0417ba04c84f168ac78c (patch)
tree6dcc586983e753988a4b2713678f78bbb49ded6e /drivers/gpu/drm/amd/amdgpu/amdgpu_object.c
parentdrm/radeon: Avoid double gpu reset by adding a timeout on IB ring tests. (diff)
downloadkernel-qcow2-linux-cc325d1913475655b81c0417ba04c84f168ac78c.tar.gz
kernel-qcow2-linux-cc325d1913475655b81c0417ba04c84f168ac78c.tar.xz
kernel-qcow2-linux-cc325d1913475655b81c0417ba04c84f168ac78c.zip
drm/amdgpu: check userptrs mm earlier
Instead of when we try to bind it check the usermm when we try to use it in the IOCTLs. Signed-off-by: Christian König <christian.koenig@amd.com> Acked-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_object.c')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_object.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c
index 8c1fc1f56342..b74084ce734f 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c
@@ -370,7 +370,7 @@ int amdgpu_bo_pin_restricted(struct amdgpu_bo *bo, u32 domain,
int r, i;
unsigned fpfn, lpfn;
- if (amdgpu_ttm_tt_has_userptr(bo->tbo.ttm))
+ if (amdgpu_ttm_tt_get_usermm(bo->tbo.ttm))
return -EPERM;
if (WARN_ON_ONCE(min_offset > max_offset))