diff options
author | Christian König <christian.koenig@amd.com> | 2017-11-24 11:39:30 +0100 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2017-11-28 17:44:15 -0500 |
commit | 6edc6910ba4cd6eab309263539c8f09b8ad772bf (patch) | |
tree | 5efc4cbf8b413aba6de79ca06aa8239361d7239e /drivers/gpu | |
parent | fa7c7939b4bf112cd06ba166b739244077898990 (diff) |
drm/amdgpu: don't try to move pinned BOs
Never try to move pinned BOs during CS.
Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c index a57cec737c18..57abf7abd7a9 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c @@ -409,6 +409,10 @@ static bool amdgpu_cs_try_evict(struct amdgpu_cs_parser *p, if (candidate->robj == validated) break; + /* We can't move pinned BOs here */ + if (bo->pin_count) + continue; + other = amdgpu_mem_type_to_domain(bo->tbo.mem.mem_type); /* Check if this BO is in one of the domains we need space for */ |