Use _INVALID to identify bad parameters and _UNSET to represent the lack of interest in a specific value.
Unified · Split
| @@ -230,6 +230,8 @@ static enum amd_sched_priority amdgpu_to_sched_priority(int amdgpu_priority) · 229 unmodified lines | |||
| 230 | case AMDGPU_CTX_PRIORITY_LOW_SW: | 230 | case AMDGPU_CTX_PRIORITY_LOW_SW: |
| 231 | case AMDGPU_CTX_PRIORITY_LOW_HW: | 231 | case AMDGPU_CTX_PRIORITY_LOW_HW: |
| 232 | return AMD_SCHED_PRIORITY_LOW; | 232 | return AMD_SCHED_PRIORITY_LOW; |
| 233 | case AMDGPU_CTX_PRIORITY_UNSET: | ||
| 234 | return AMD_SCHED_PRIORITY_UNSET; | ||
| 233 | default: | 235 | default: |
| 234 | WARN(1, "Invalid context priority %d\n", amdgpu_priority); | 236 | WARN(1, "Invalid context priority %d\n", amdgpu_priority); |
| 235 | return AMD_SCHED_PRIORITY_INVALID; | 237 | return AMD_SCHED_PRIORITY_INVALID; |
| @@ -122,7 +122,8 @@ enum amd_sched_priority { · 121 unmodified lines | |||
| 122 | AMD_SCHED_PRIORITY_HIGH_HW, | 122 | AMD_SCHED_PRIORITY_HIGH_HW, |
| 123 | AMD_SCHED_PRIORITY_KERNEL, | 123 | AMD_SCHED_PRIORITY_KERNEL, |
| 124 | AMD_SCHED_PRIORITY_MAX, | 124 | AMD_SCHED_PRIORITY_MAX, |
| 125 | AMD_SCHED_PRIORITY_INVALID = -1 | 125 | AMD_SCHED_PRIORITY_INVALID = -1, |
| 126 | AMD_SCHED_PRIORITY_UNSET = -2 | ||
| 126 | }; | 127 | }; |
| 127 | 128 | ||
| 128 | /** | 129 | /** |
| @@ -169,6 +169,7 @@ union drm_amdgpu_bo_list { · 168 unmodified lines | |||
| 169 | #define AMDGPU_CTX_UNKNOWN_RESET 3 | 169 | #define AMDGPU_CTX_UNKNOWN_RESET 3 |
| 170 | 170 | ||
| 171 | /* Context priority level */ | 171 | /* Context priority level */ |
| 172 | #define AMDGPU_CTX_PRIORITY_UNSET -2048 | ||
| 172 | #define AMDGPU_CTX_PRIORITY_LOW_HW -1023 | 173 | #define AMDGPU_CTX_PRIORITY_LOW_HW -1023 |
| 173 | #define AMDGPU_CTX_PRIORITY_LOW_SW -512 | 174 | #define AMDGPU_CTX_PRIORITY_LOW_SW -512 |
| 174 | #define AMDGPU_CTX_PRIORITY_NORMAL 0 | 175 | #define AMDGPU_CTX_PRIORITY_NORMAL 0 |