drm/amdgpu: rework context priority handling
authorNirmoy Das <nirmoy.das@amd.com>
Tue, 24 Aug 2021 18:39:18 +0000 (20:39 +0200)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 1 Sep 2021 20:55:11 +0000 (16:55 -0400)
commit84d588c3de84d07ef83608b60faa4fffdea32aad
tree5653868a273ad413c469f4432c8ab9c50e5daed3
parent391ac13539cadf3377460bb7140829ee99799de4
drm/amdgpu: rework context priority handling

To get a hardware queue priority for a context, we are currently
mapping AMDGPU_CTX_PRIORITY_* to DRM_SCHED_PRIORITY_* and then
to hardware queue priority, which is not the right way to do that
as DRM_SCHED_PRIORITY_* is software scheduler's priority and it is
independent from a hardware queue priority.

Use userspace provided context priority, AMDGPU_CTX_PRIORITY_* to
map a context to proper hardware queue priority.

Signed-off-by: Nirmoy Das <nirmoy.das@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c
drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.h
drivers/gpu/drm/amd/amdgpu/amdgpu_sched.c