History

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.

Andres Rodriguez committed 9 years ago

Commit f3d19bf1 parent 9ebbaab3 files · +5 −1Browse files

Unified · Split

3 files
  1. drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c +2 −0
  2. drivers/gpu/drm/amd/scheduler/gpu_scheduler.h +2 −1
  3. include/uapi/drm/amdgpu_drm.h +1 −0
drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c+2−0
@@ -230,6 +230,8 @@ static enum amd_sched_priority amdgpu_to_sched_priority(int amdgpu_priority) · 229 unmodified lines
230230 case AMDGPU_CTX_PRIORITY_LOW_SW:
231231 case AMDGPU_CTX_PRIORITY_LOW_HW:
232232 return AMD_SCHED_PRIORITY_LOW;
233+ case AMDGPU_CTX_PRIORITY_UNSET:
234+ return AMD_SCHED_PRIORITY_UNSET;
233235 default:
234236 WARN(1, "Invalid context priority %d\n", amdgpu_priority);
235237 return AMD_SCHED_PRIORITY_INVALID;
drivers/gpu/drm/amd/scheduler/gpu_scheduler.h+2−1
@@ -122,7 +122,8 @@ enum amd_sched_priority { · 121 unmodified lines
122122 AMD_SCHED_PRIORITY_HIGH_HW,
123123 AMD_SCHED_PRIORITY_KERNEL,
124124 AMD_SCHED_PRIORITY_MAX,
125− AMD_SCHED_PRIORITY_INVALID = -1
125+ AMD_SCHED_PRIORITY_INVALID = -1,
126+ AMD_SCHED_PRIORITY_UNSET = -2
126127 };
127128
128129 /**
include/uapi/drm/amdgpu_drm.h+1−0
@@ -169,6 +169,7 @@ union drm_amdgpu_bo_list { · 168 unmodified lines
169169 #define AMDGPU_CTX_UNKNOWN_RESET 3
170170
171171 /* Context priority level */
172+#define AMDGPU_CTX_PRIORITY_UNSET -2048
172173 #define AMDGPU_CTX_PRIORITY_LOW_HW -1023
173174 #define AMDGPU_CTX_PRIORITY_LOW_SW -512
174175 #define AMDGPU_CTX_PRIORITY_NORMAL 0

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t