diff options
author | Christian König <christian.koenig@amd.com> | 2015-05-04 07:20:36 -0400 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2015-06-03 21:03:26 -0400 |
commit | a961ea7349d08d5962b6a619f2c2cca670da41ed (patch) | |
tree | 0d7efe82c19a5582e52248f949ce90dc8d5d5491 | |
parent | dd08fae1e9b2466380d9447a0643c182cd142149 (diff) |
drm/amdgpu: fix userptr lockup
Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Jammy Zhou <Jammy.Zhou@amd.com>
Reviewed-by: Monk Liu <monk.liu@amd.com>
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_mn.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_mn.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_mn.c index b3a17a9ab1f4..b1969f2b2038 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_mn.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_mn.c | |||
@@ -142,6 +142,9 @@ static void amdgpu_mn_invalidate_range_start(struct mmu_notifier *mn, | |||
142 | 142 | ||
143 | list_for_each_entry(bo, &node->bos, mn_list) { | 143 | list_for_each_entry(bo, &node->bos, mn_list) { |
144 | 144 | ||
145 | if (!bo->tbo.ttm || bo->tbo.ttm->state != tt_bound) | ||
146 | continue; | ||
147 | |||
145 | r = amdgpu_bo_reserve(bo, true); | 148 | r = amdgpu_bo_reserve(bo, true); |
146 | if (r) { | 149 | if (r) { |
147 | DRM_ERROR("(%ld) failed to reserve user bo\n", r); | 150 | DRM_ERROR("(%ld) failed to reserve user bo\n", r); |