drm/amdgpu: extend AMDGPU_CTX_PRIORITY_NORMAL comment
Subsystems (3)
PATCH 1/1 drm/amdgpu: extend AMDGPU_CTX_PRIORITY_NORMAL comment
From: Emil Velikov <[email protected]>
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.
---
Mildly curious: why didn't one extend ctx_amdgpu_ctx instead of adding drm_amdgpu_sched? New flag + _u32 fd at the end (for the former) would have been enough (and tweaking the ioctl permission thingy).
Speaking of flags, drm_amdgpu_sched_in lost its so extending it will be "fun"
--- include/uapi/drm/amdgpu_drm.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-)
include/uapi/drm/amdgpu_drm.h +6 -1
@@ -219,7 +219,10 @@ union drm_amdgpu_bo_list {#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 */ +/* +* When used in struct drm_amdgpu_ctx_in, a priority above NORMAL requires +* CAP_SYS_NICE or DRM_MASTER +*/ #define AMDGPU_CTX_PRIORITY_HIGH 512#define AMDGPU_CTX_PRIORITY_VERY_HIGH 1023
@@ -229,6 +232,7 @@ struct drm_amdgpu_ctx_in {/** For future use, no flags defined so far */ __u32 flags;__u32 ctx_id; +/** AMDGPU_CTX_PRIORITY_* */ __s32 priority; };
@@ -281,6 +285,7 @@ struct drm_amdgpu_sched_in {/* AMDGPU_SCHED_OP_* */ __u32 op;__u32 fd; +/** AMDGPU_CTX_PRIORITY_* */ __s32 priority;__u32 ctx_id; };
Signature · 6 lines
2.21.0 _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
Koenig, Christian
maintainerAm 14.06.19 um 19:33 schrieb Emil Velikov:
Quoted 8 lines
From: Emil Velikov <[email protected]>
Currently the AMDGPU_CTX_PRIORITY_* defines are used in both
drm_amdgpu_ctx_in::priorityanddrm_amdgpu_sched_in::priority.Extend the comment to mention the
CAP_SYS_NICEorDRM_MASTERrequirement is only applicable with the former.
Quoted 8 lines
Cc Bas Nieuwenhuizen <[email protected]>Cc Christian König <[email protected]>Cc Alex Deucher <[email protected]>Signed-off-by Emil Velikov <[email protected]>---
Mildly curious: why didn't one extendctx_amdgpu_ctxinstead of addingdrm_amdgpu_sched? New flag +_u32fd at the end (for the former) would have been enough (and tweaking the ioctl permission thingy).
The drm_amdgpu_sched is only allowed for DRM_MASTER.
Christian.
Quoted 32 lines
Speaking of flags,
drm_amdgpu_sched_inlost its so extending it will be "fun"--- include/uapi/drm/amdgpu_drm.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-)include/uapi/drm/amdgpu_drm.h +5
-1@@ -219,7 +219,10 @@ union drm_amdgpu_bo_list {#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 */ +/* +* When used in struct drm_amdgpu_ctx_in, a priority above NORMAL requires +* CAP_SYS_NICE or DRM_MASTER +*/ #define AMDGPU_CTX_PRIORITY_HIGH 512#define AMDGPU_CTX_PRIORITY_VERY_HIGH 1023@@ -229,6 +232,7 @@ struct drm_amdgpu_ctx_in {/** For future use, no flags defined so far */ __u32 flags;__u32 ctx_id; +/** AMDGPU_CTX_PRIORITY_* */ __s32 priority; };
include/uapi/drm/amdgpu_drm.h struct drm_amdgpu_sched_in { · line 291
Quoted 7 lines
include/uapi/drm/amdgpu_drm.h +1
-0@@ -281,6 +285,7 @@ struct drm_amdgpu_sched_in {/* AMDGPU_SCHED_OP_* */ __u32 op;__u32 fd; +/** AMDGPU_CTX_PRIORITY_* */ __s32 priority;__u32 ctx_id; };
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
A message that is not in the archive (sent off-list or not yet received): b3b4b6d8-1b64-7860-88e5-ec91b9d2f711-5C7GfCeVMHo@public.gmane.org
Quoted 19 lines · Christian
Am 14.06.19 um 19:33 schrieb Emil Velikov:
Quoted 8 lines
From: Emil Velikov <[email protected]>
Currently the AMDGPU_CTX_PRIORITY_* defines are used in both
drm_amdgpu_ctx_in::priorityanddrm_amdgpu_sched_in::priority.Extend the comment to mention the
CAP_SYS_NICEorDRM_MASTERrequirement is only applicable with the former.Quoted 8 lines
Cc Bas Nieuwenhuizen <[email protected]>Cc Christian König <[email protected]>Cc Alex Deucher <[email protected]>Signed-off-by Emil Velikov <[email protected]>---
Mildly curious: why didn't one extendctx_amdgpu_ctxinstead of addingdrm_amdgpu_sched? New flag +_u32fd at the end (for the former) would have been enough (and tweaking the ioctl permission thingy).
Quoted 2 lines
The
drm_amdgpu_schedis only allowed forDRM_MASTER.
Fair enough.
Is the patch wrong or did it slip through the cracks? I cannot see it in Alex's tree.
-Emil
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Am 02.07.19 um 19:15 schrieb Emil Velikov:
Quoted 19 lines
Quoted 17 lines · Christian
Am 14.06.19 um 19:33 schrieb Emil Velikov:
Quoted 16 lines
From: Emil Velikov <[email protected]>
Currently the AMDGPU_CTX_PRIORITY_* defines are used in both
drm_amdgpu_ctx_in::priorityanddrm_amdgpu_sched_in::priority.Extend the comment to mention the
CAP_SYS_NICEorDRM_MASTERrequirement is only applicable with the former.Cc Bas Nieuwenhuizen <[email protected]>Cc Christian König <[email protected]>Cc Alex Deucher <[email protected]>Signed-off-by Emil Velikov <[email protected]>---
Mildly curious: why didn't one extendctx_amdgpu_ctxinstead of addingdrm_amdgpu_sched? New flag +_u32fd at the end (for the former) would have been enough (and tweaking the ioctl permission thingy).
Quoted 6 lines
Quoted 2 lines
The
drm_amdgpu_schedis only allowed forDRM_MASTER.Fair enough.
Is the patch wrong or did it slip through the cracks? I cannot see it in Alex's tree.
Looks like Alex just missed this one and I was on vacation/out of office for a while.
I've gone ahead added my rb and just pushed it.
Thanks,
Christian.
Quoted 6 lines
-Emil
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel