From: Christian König Date: Mon, 4 May 2015 11:20:36 +0000 (+0200) Subject: drm/amdgpu: fix userptr lockup X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=a961ea7349d08d5962b6a619f2c2cca670da41ed;p=GitHub%2Fexynos8895%2Fandroid_kernel_samsung_universal8895.git drm/amdgpu: fix userptr lockup Signed-off-by: Christian König Reviewed-by: Jammy Zhou Reviewed-by: Monk Liu --- 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);