diff options
| author | Christian König <[email protected]> | 2016-02-08 10:57:22 +0100 |
|---|---|---|
| committer | Alex Deucher <[email protected]> | 2016-02-10 14:07:52 -0500 |
| commit | cc1de6e800c253172334f8774c419dc64401cd2e (patch) | |
| tree | 40de20901e3f0d8b867d2682b6ed20d3a5e0f333 /drivers/gpu/drm/amd/amdgpu/amdgpu_mn.c | |
| parent | f6ff4f67cdf8455d0a4226eeeaf5af17c37d05eb (diff) | |
drm/amdgpu: fix issue with overlapping userptrs
Otherwise we could try to evict overlapping userptr BOs in get_user_pages(),
leading to a possible circular locking dependency.
Signed-off-by: Christian König <[email protected]>
Acked-by: Alex Deucher <[email protected]>
Cc: [email protected]
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_mn.c')
| -rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_mn.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_mn.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_mn.c index b1969f2b2038..d4e2780c0796 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_mn.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_mn.c @@ -142,7 +142,8 @@ 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) + if (!amdgpu_ttm_tt_affect_userptr(bo->tbo.ttm, start, + end)) continue; r = amdgpu_bo_reserve(bo, true); |