On 13-04-2026 02:32 pm, Christian König wrote:
On 4/13/26 10:49, Sunil Khatri wrote:
In function amdgpu_userq_priority_permit allow till
maximum priority i.e 3 which is seen for gnome shell.
This is needed to fix the issue of unable to create queue
for gnome shell.
logs:
[drm] *ERROR* comm: gnome-shell pid: 2802 client-id:10 client: Unset ... SK:
Priority 3
Clear NAK, as far as I can see the existing code is correct.
AMDGPU_USERQ_CREATE_FLAGS_QUEUE_PRIORITY_HIGH is only allowed when you have
CAP_SYS_NICE, e.g. you are root.
That is also documented in the UAPI. Question is why is gnome shell trying to
use that?
I see, let me add Yogesh for his inputs, @yogesh, why gnome shell is
asking for priority AMDGPU_USERQ_CREATE_FLAGS_QUEUE_PRIORITY_HIGH. Based
on the code seems mesa is getting a flag set flags &
PIPE_CONTEXT_HIGH_PRIORITY -> this sets
AMDGPU_USERQ_CREATE_FLAGS_QUEUE_PRIORITY_HIGH for graphics queue.
Regards Sunil Khatri
Regards,
Christian.
Signed-off-by: Sunil Khatri<[email protected]>
---
drivers/gpu/drm/amd/amdgpu/amdgpu_userq.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_userq.c
b/drivers/gpu/drm/amd/amdgpu/amdgpu_userq.c
index 6a635bb8bb30..b4f7229c21c5 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_userq.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_userq.c
@@ -701,7 +701,7 @@ void amdgpu_userq_put(struct amdgpu_usermode_queue *queue)
static int amdgpu_userq_priority_permit(struct drm_file *filp,
int priority)
{
- if (priority < AMDGPU_USERQ_CREATE_FLAGS_QUEUE_PRIORITY_HIGH)
+ if (priority <= AMDGPU_USERQ_CREATE_FLAGS_QUEUE_PRIORITY_HIGH)
return 0;
if (capable(CAP_SYS_NICE))