diff options
author | Roger.He <Hongbo.He@amd.com> | 2017-03-27 19:38:11 +0800 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2017-03-29 23:55:48 -0400 |
commit | c309cd03b4e63785974481d65ffaf13ffcd75afb (patch) | |
tree | 593a2ceff1feef05dde49fa53e5b4cf8f78ed9fb /drivers/gpu/drm/amd | |
parent | e51a3226d48fd02b37090a01c17587944743389a (diff) | |
download | op-kernel-dev-c309cd03b4e63785974481d65ffaf13ffcd75afb.zip op-kernel-dev-c309cd03b4e63785974481d65ffaf13ffcd75afb.tar.gz |
drm/amd/amdgpu: fix performance drop when VRAM pressure
When VRAM pressue and trigger huge evictions there is performance drop,
this patch fix it.
Signed-off-by: Roger.He <Hongbo.He@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c index 9b2e1f1..5aac350 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c @@ -405,10 +405,8 @@ int amdgpu_bo_create_restricted(struct amdgpu_device *adev, if (unlikely(r != 0)) return r; - bo->tbo.priority = ilog2(bo->tbo.num_pages); if (kernel) - bo->tbo.priority *= 2; - bo->tbo.priority = min(bo->tbo.priority, (unsigned)(TTM_MAX_BO_PRIORITY - 1)); + bo->tbo.priority = 1; if (flags & AMDGPU_GEM_CREATE_VRAM_CLEARED && bo->tbo.mem.placement & TTM_PL_FLAG_VRAM) { |