aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdgpu/amdgpu_mn.c
diff options
context:
space:
mode:
authorChristian König <[email protected]>2015-05-04 11:20:36 +0000
committerAlex Deucher <[email protected]>2015-06-04 01:03:26 +0000
commita961ea7349d08d5962b6a619f2c2cca670da41ed (patch)
tree0d7efe82c19a5582e52248f949ce90dc8d5d5491 /drivers/gpu/drm/amd/amdgpu/amdgpu_mn.c
parentdrm/amdgpu: fix userptr BO unpin bug (v2) (diff)
downloadkernel-a961ea7349d08d5962b6a619f2c2cca670da41ed.tar.gz
kernel-a961ea7349d08d5962b6a619f2c2cca670da41ed.zip
drm/amdgpu: fix userptr lockup
Signed-off-by: Christian König <[email protected]> Reviewed-by: Jammy Zhou <[email protected]> Reviewed-by: Monk Liu <[email protected]>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_mn.c')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_mn.c3
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,
list_for_each_entry(bo, &node->bos, mn_list) {
+ if (!bo->tbo.ttm || bo->tbo.ttm->state != tt_bound)
+ continue;
+
r = amdgpu_bo_reserve(bo, true);
if (r) {
DRM_ERROR("(%ld) failed to reserve user bo\n", r);