Skip to content

Commit fa8391a

Browse files
author
Luben Tuikov
committed
gpu/drm: Eliminate DRM_SCHED_PRIORITY_UNSET
Eliminate DRM_SCHED_PRIORITY_UNSET, value of -2, whose only user was amdgpu. Furthermore, eliminate an index bug, in that when amdgpu boots, it calls drm_sched_entity_init() with DRM_SCHED_PRIORITY_UNSET, which uses it to index sched->sched_rq[]. Cc: Alex Deucher <[email protected]> Cc: Christian König <[email protected]> Signed-off-by: Luben Tuikov <[email protected]> Acked-by: Alex Deucher <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent eab0261 commit fa8391a

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,8 @@ amdgpu_ctx_to_drm_sched_prio(int32_t ctx_prio)
6464
{
6565
switch (ctx_prio) {
6666
case AMDGPU_CTX_PRIORITY_UNSET:
67-
return DRM_SCHED_PRIORITY_UNSET;
67+
pr_warn_once("AMD-->DRM context priority value UNSET-->NORMAL");
68+
return DRM_SCHED_PRIORITY_NORMAL;
6869

6970
case AMDGPU_CTX_PRIORITY_VERY_LOW:
7071
return DRM_SCHED_PRIORITY_MIN;

include/drm/gpu_scheduler.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,7 @@ enum drm_sched_priority {
6868
DRM_SCHED_PRIORITY_HIGH,
6969
DRM_SCHED_PRIORITY_KERNEL,
7070

71-
DRM_SCHED_PRIORITY_COUNT,
72-
DRM_SCHED_PRIORITY_UNSET = -2
71+
DRM_SCHED_PRIORITY_COUNT
7372
};
7473

7574
/* Used to chose between FIFO and RR jobs scheduling */

0 commit comments

Comments
 (0)