]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commitf634d9b901d8016f3861e5046377062fd1495d98
tree5653868a273ad413c469f4432c8ab9c50e5daed3
parentf5b7d8384c26f48c1dbf4b7ad6cf8e3d3555a969
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