[PATCH] drm/amdgpu: rename context priority levels
Andres Rodriguez
andresx7 at gmail.com
Fri Oct 13 18:58:14 UTC 2017
Don't leak implementation details about how each priority behaves to
usermode. This allows greater flexibility in the future.
Squash into c2636dc53abd8269a0930bccd564f2f195dba729
Signed-off-by: Andres Rodriguez <andresx7 at gmail.com>
---
Hey Alex,
>From some of the IRC discussions, I thought this would be
appropriate.
Regards,
Andres
drivers/gpu/drm/amd/amdgpu/amdgpu_sched.c | 8 ++++----
include/uapi/drm/amdgpu_drm.h | 8 ++++----
2 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_sched.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_sched.c
index cd12330..290cc3f 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_sched.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_sched.c
@@ -32,14 +32,14 @@
enum amd_sched_priority amdgpu_to_sched_priority(int amdgpu_priority)
{
switch (amdgpu_priority) {
- case AMDGPU_CTX_PRIORITY_HIGH_HW:
+ case AMDGPU_CTX_PRIORITY_VERY_HIGH:
return AMD_SCHED_PRIORITY_HIGH_HW;
- case AMDGPU_CTX_PRIORITY_HIGH_SW:
+ case AMDGPU_CTX_PRIORITY_HIGH:
return AMD_SCHED_PRIORITY_HIGH_SW;
case AMDGPU_CTX_PRIORITY_NORMAL:
return AMD_SCHED_PRIORITY_NORMAL;
- case AMDGPU_CTX_PRIORITY_LOW_SW:
- case AMDGPU_CTX_PRIORITY_LOW_HW:
+ case AMDGPU_CTX_PRIORITY_LOW:
+ case AMDGPU_CTX_PRIORITY_VERY_LOW:
return AMD_SCHED_PRIORITY_LOW;
case AMDGPU_CTX_PRIORITY_UNSET:
return AMD_SCHED_PRIORITY_UNSET;
diff --git a/include/uapi/drm/amdgpu_drm.h b/include/uapi/drm/amdgpu_drm.h
index a332de1..d0a3ea6 100644
--- a/include/uapi/drm/amdgpu_drm.h
+++ b/include/uapi/drm/amdgpu_drm.h
@@ -172,12 +172,12 @@ union drm_amdgpu_bo_list {
/* Context priority level */
#define AMDGPU_CTX_PRIORITY_UNSET -2048
-#define AMDGPU_CTX_PRIORITY_LOW_HW -1023
-#define AMDGPU_CTX_PRIORITY_LOW_SW -512
+#define AMDGPU_CTX_PRIORITY_VERY_LOW -1023
+#define AMDGPU_CTX_PRIORITY_LOW -512
#define AMDGPU_CTX_PRIORITY_NORMAL 0
/* Selecting a priority above NORMAL requires CAP_SYS_NICE or DRM_MASTER */
-#define AMDGPU_CTX_PRIORITY_HIGH_SW 512
-#define AMDGPU_CTX_PRIORITY_HIGH_HW 1023
+#define AMDGPU_CTX_PRIORITY_HIGH 512
+#define AMDGPU_CTX_PRIORITY_VERY_HIGH 1023
struct drm_amdgpu_ctx_in {
/** AMDGPU_CTX_OP_* */
--
2.9.3
More information about the amd-gfx
mailing list