gpu/drm: Eliminate DRM_SCHED_PRIORITY_UNSET
authorjsg <jsg@openbsd.org>
Thu, 9 Nov 2023 08:14:14 +0000 (08:14 +0000)
committerjsg <jsg@openbsd.org>
Thu, 9 Nov 2023 08:14:14 +0000 (08:14 +0000)
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
sys/dev/pci/drm/include/drm/gpu_scheduler.h

index 252047c..c203629 100644 (file)
@@ -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;
index 8d27eed..ed3b182 100644 (file)
@@ -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
 };
 
 /**