drm/amdgpu: rename context priority levels
authorAndres Rodriguez <andresx7@gmail.com>
Fri, 13 Oct 2017 18:58:14 +0000 (14:58 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Thu, 19 Oct 2017 19:26:48 +0000 (15:26 -0400)
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@gmail.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_sched.c
include/uapi/drm/amdgpu_drm.h

index cd123306eda71202bd54c8658fa2c3978246e194..290cc3f9c433a3df7de41f1c1db228db30377ee8 100644 (file)
 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;
index a332de1aeb42a8cac96fea0f7d1f05646a24b8aa..d0a3ea69eab6e98f01279abcc44d55298f24ff4f 100644 (file)
@@ -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_* */