summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian König <christian.koenig@amd.com>2017-01-23 16:28:06 -0500
committerAlex Deucher <alexander.deucher@amd.com>2017-01-27 12:20:34 -0500
commit373308a5f5f3f82656567481f688350887abb771 (patch)
treee7d4c734fa8c2c89a6217c07ecd16fa3e24bcf7c
parente1f055b30187204439b6693a118b9dde9cda04ae (diff)
downloadop-kernel-dev-373308a5f5f3f82656567481f688350887abb771.zip
op-kernel-dev-373308a5f5f3f82656567481f688350887abb771.tar.gz
drm/amdgpu: double the priority of kernel allocations
Give kernel allocations a higher priority cause it is often more work to swap them back in. Signed-off-by: Christian König <christian.koenig@amd.com> Reviewed-by: Roger.He <Hongbo.He@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_object.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c
index c43e8c5..a97d883 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c
@@ -387,6 +387,8 @@ int amdgpu_bo_create_restricted(struct amdgpu_device *adev,
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));
if (flags & AMDGPU_GEM_CREATE_VRAM_CLEARED &&
OpenPOWER on IntegriCloud