diff options
author | Christian König <christian.koenig@amd.com> | 2017-11-24 05:39:30 -0500 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2017-11-28 17:44:15 -0500 |
commit | 6edc6910ba4cd6eab309263539c8f09b8ad772bf (patch) | |
tree | 5efc4cbf8b413aba6de79ca06aa8239361d7239e /drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | |
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/drm/amd/amdgpu/amdgpu_cs.c')
-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, | |||
409 | if (candidate->robj == validated) | 409 | if (candidate->robj == validated) |
410 | break; | 410 | break; |
411 | 411 | ||
412 | /* We can't move pinned BOs here */ | ||
413 | if (bo->pin_count) | ||
414 | continue; | ||
415 | |||
412 | other = amdgpu_mem_type_to_domain(bo->tbo.mem.mem_type); | 416 | other = amdgpu_mem_type_to_domain(bo->tbo.mem.mem_type); |
413 | 417 | ||
414 | /* Check if this BO is in one of the domains we need space for */ | 418 | /* Check if this BO is in one of the domains we need space for */ |