drm/amdgpu: Unset context priority is now invalid
authorjsg <jsg@openbsd.org>
Thu, 9 Nov 2023 08:10:19 +0000 (08:10 +0000)
committerjsg <jsg@openbsd.org>
Thu, 9 Nov 2023 08:10:19 +0000 (08:10 +0000)
From Luben Tuikov
cafa191b27dd3c6199529f36a6dfddb707c240c0 in linux-6.1.y/6.1.62
eab0261967aeab528db4d0a51806df8209aec179 in mainline linux

sys/dev/pci/drm/amd/amdgpu/amdgpu_ctx.c

index 8cf3e24..252047c 100644 (file)
@@ -47,7 +47,6 @@ const unsigned int amdgpu_ctx_num_entities[AMDGPU_HW_IP_NUM] = {
 bool amdgpu_ctx_priority_is_valid(int32_t ctx_prio)
 {
        switch (ctx_prio) {
-       case AMDGPU_CTX_PRIORITY_UNSET:
        case AMDGPU_CTX_PRIORITY_VERY_LOW:
        case AMDGPU_CTX_PRIORITY_LOW:
        case AMDGPU_CTX_PRIORITY_NORMAL:
@@ -55,6 +54,7 @@ bool amdgpu_ctx_priority_is_valid(int32_t ctx_prio)
        case AMDGPU_CTX_PRIORITY_VERY_HIGH:
                return true;
        default:
+       case AMDGPU_CTX_PRIORITY_UNSET:
                return false;
        }
 }