summaryrefslogtreecommitdiffstats
path: root/include/uapi
diff options
context:
space:
mode:
authorEmil Velikov <emil.velikov@collabora.com>2019-06-14 13:33:35 -0400
committerAlex Deucher <alexander.deucher@amd.com>2019-07-16 14:08:30 -0400
commitcf034477321e8c88d667514923763b93a0892f49 (patch)
tree5cf8b31b34eb4ac437bed2b243d7ee1607062795 /include/uapi
parent54728170e00cecfac0394c6ee7ea4043778a512b (diff)
drm/amdgpu: extend AMDGPU_CTX_PRIORITY_NORMAL comment
Currently the AMDGPU_CTX_PRIORITY_* defines are used in both drm_amdgpu_ctx_in::priority and drm_amdgpu_sched_in::priority. Extend the comment to mention the CAP_SYS_NICE or DRM_MASTER requirement is only applicable with the former. Cc: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl> Cc: Christian König <christian.koenig@amd.com> Cc: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Emil Velikov <emil.velikov@collabora.com> Reviewed-by: Christian König <christian.koenig@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'include/uapi')
-rw-r--r--include/uapi/drm/amdgpu_drm.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/include/uapi/drm/amdgpu_drm.h b/include/uapi/drm/amdgpu_drm.h
index d799858b9e53..11cc57322962 100644
--- a/include/uapi/drm/amdgpu_drm.h
+++ b/include/uapi/drm/amdgpu_drm.h
@@ -219,7 +219,10 @@ union drm_amdgpu_bo_list {
219#define AMDGPU_CTX_PRIORITY_VERY_LOW -1023 219#define AMDGPU_CTX_PRIORITY_VERY_LOW -1023
220#define AMDGPU_CTX_PRIORITY_LOW -512 220#define AMDGPU_CTX_PRIORITY_LOW -512
221#define AMDGPU_CTX_PRIORITY_NORMAL 0 221#define AMDGPU_CTX_PRIORITY_NORMAL 0
222/* Selecting a priority above NORMAL requires CAP_SYS_NICE or DRM_MASTER */ 222/*
223 * When used in struct drm_amdgpu_ctx_in, a priority above NORMAL requires
224 * CAP_SYS_NICE or DRM_MASTER
225*/
223#define AMDGPU_CTX_PRIORITY_HIGH 512 226#define AMDGPU_CTX_PRIORITY_HIGH 512
224#define AMDGPU_CTX_PRIORITY_VERY_HIGH 1023 227#define AMDGPU_CTX_PRIORITY_VERY_HIGH 1023
225 228
@@ -229,6 +232,7 @@ struct drm_amdgpu_ctx_in {
229 /** For future use, no flags defined so far */ 232 /** For future use, no flags defined so far */
230 __u32 flags; 233 __u32 flags;
231 __u32 ctx_id; 234 __u32 ctx_id;
235 /** AMDGPU_CTX_PRIORITY_* */
232 __s32 priority; 236 __s32 priority;
233}; 237};
234 238
@@ -281,6 +285,7 @@ struct drm_amdgpu_sched_in {
281 /* AMDGPU_SCHED_OP_* */ 285 /* AMDGPU_SCHED_OP_* */
282 __u32 op; 286 __u32 op;
283 __u32 fd; 287 __u32 fd;
288 /** AMDGPU_CTX_PRIORITY_* */
284 __s32 priority; 289 __s32 priority;
285 __u32 ctx_id; 290 __u32 ctx_id;
286}; 291};