From d97b72cf335cdda76c245666ef4b446045ffefff Mon Sep 17 00:00:00 2001 From: jsg Date: Thu, 9 Nov 2023 08:14:14 +0000 Subject: [PATCH] gpu/drm: Eliminate DRM_SCHED_PRIORITY_UNSET From Luben Tuikov 9f9b2ec53aca630783493a2ccc3bab0794052133 in linux-6.1.y/6.1.62 fa8391ad68c16716e2c06ada397e99ceed2fb647 in mainline linux --- sys/dev/pci/drm/amd/amdgpu/amdgpu_ctx.c | 3 ++- sys/dev/pci/drm/include/drm/gpu_scheduler.h | 3 +-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/sys/dev/pci/drm/amd/amdgpu/amdgpu_ctx.c b/sys/dev/pci/drm/amd/amdgpu/amdgpu_ctx.c index 252047c3ace..c2036297236 100644 --- a/sys/dev/pci/drm/amd/amdgpu/amdgpu_ctx.c +++ b/sys/dev/pci/drm/amd/amdgpu/amdgpu_ctx.c @@ -64,7 +64,8 @@ amdgpu_ctx_to_drm_sched_prio(int32_t ctx_prio) { switch (ctx_prio) { case AMDGPU_CTX_PRIORITY_UNSET: - return DRM_SCHED_PRIORITY_UNSET; + pr_warn_once("AMD-->DRM context priority value UNSET-->NORMAL"); + return DRM_SCHED_PRIORITY_NORMAL; case AMDGPU_CTX_PRIORITY_VERY_LOW: return DRM_SCHED_PRIORITY_MIN; diff --git a/sys/dev/pci/drm/include/drm/gpu_scheduler.h b/sys/dev/pci/drm/include/drm/gpu_scheduler.h index 8d27eed5ce7..ed3b182ab8d 100644 --- a/sys/dev/pci/drm/include/drm/gpu_scheduler.h +++ b/sys/dev/pci/drm/include/drm/gpu_scheduler.h @@ -55,8 +55,7 @@ enum drm_sched_priority { DRM_SCHED_PRIORITY_HIGH, DRM_SCHED_PRIORITY_KERNEL, - DRM_SCHED_PRIORITY_COUNT, - DRM_SCHED_PRIORITY_UNSET = -2 + DRM_SCHED_PRIORITY_COUNT }; /** -- 2.20.1