Commit f3d19bf8 authored by Andres Rodriguez's avatar Andres Rodriguez Committed by Alex Deucher

drm/amdgpu: introduce AMDGPU_CTX_PRIORITY_UNSET

Use _INVALID to identify bad parameters and _UNSET to represent the
lack of interest in a specific value.
Signed-off-by: default avatarAndres Rodriguez <andresx7@gmail.com>
Acked-by: default avatarChristian König <christian.koenig@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 9ebbaabe
...@@ -230,6 +230,8 @@ static enum amd_sched_priority amdgpu_to_sched_priority(int amdgpu_priority) ...@@ -230,6 +230,8 @@ static enum amd_sched_priority amdgpu_to_sched_priority(int amdgpu_priority)
case AMDGPU_CTX_PRIORITY_LOW_SW: case AMDGPU_CTX_PRIORITY_LOW_SW:
case AMDGPU_CTX_PRIORITY_LOW_HW: case AMDGPU_CTX_PRIORITY_LOW_HW:
return AMD_SCHED_PRIORITY_LOW; return AMD_SCHED_PRIORITY_LOW;
case AMDGPU_CTX_PRIORITY_UNSET:
return AMD_SCHED_PRIORITY_UNSET;
default: default:
WARN(1, "Invalid context priority %d\n", amdgpu_priority); WARN(1, "Invalid context priority %d\n", amdgpu_priority);
return AMD_SCHED_PRIORITY_INVALID; return AMD_SCHED_PRIORITY_INVALID;
......
...@@ -122,7 +122,8 @@ enum amd_sched_priority { ...@@ -122,7 +122,8 @@ enum amd_sched_priority {
AMD_SCHED_PRIORITY_HIGH_HW, AMD_SCHED_PRIORITY_HIGH_HW,
AMD_SCHED_PRIORITY_KERNEL, AMD_SCHED_PRIORITY_KERNEL,
AMD_SCHED_PRIORITY_MAX, AMD_SCHED_PRIORITY_MAX,
AMD_SCHED_PRIORITY_INVALID = -1 AMD_SCHED_PRIORITY_INVALID = -1,
AMD_SCHED_PRIORITY_UNSET = -2
}; };
/** /**
......
...@@ -169,6 +169,7 @@ union drm_amdgpu_bo_list { ...@@ -169,6 +169,7 @@ union drm_amdgpu_bo_list {
#define AMDGPU_CTX_UNKNOWN_RESET 3 #define AMDGPU_CTX_UNKNOWN_RESET 3
/* Context priority level */ /* Context priority level */
#define AMDGPU_CTX_PRIORITY_UNSET -2048
#define AMDGPU_CTX_PRIORITY_LOW_HW -1023 #define AMDGPU_CTX_PRIORITY_LOW_HW -1023
#define AMDGPU_CTX_PRIORITY_LOW_SW -512 #define AMDGPU_CTX_PRIORITY_LOW_SW -512
#define AMDGPU_CTX_PRIORITY_NORMAL 0 #define AMDGPU_CTX_PRIORITY_NORMAL 0
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment