[PATCH 1/8] drm/amdgpu: add UAPI to create user queue gangs

Khatri, Sunil sukhatri at amd.com
Mon Apr 28 10:04:10 UTC 2025


Small edit,
Series is Acked-by: Sunil Khatri <sunil.khatri at amd.com>
On 4/28/2025 3:32 PM, Khatri, Sunil wrote:
> LGTM functionally,
> Acked-by: Sunil Khatri <sunil.khatri at amd.com>
>
> But i would like @christian to look once as he is one of the original 
> author of gang submission.
>
> Regards,
> Sunil khatri
>
> On 4/26/2025 12:11 AM, Alex Deucher wrote:
>> Queues in a gang will schedule together.
>>
>> Signed-off-by: Alex Deucher <alexander.deucher at amd.com>
>> ---
>>   include/uapi/drm/amdgpu_drm.h | 11 +++++++++++
>>   1 file changed, 11 insertions(+)
>>
>> diff --git a/include/uapi/drm/amdgpu_drm.h 
>> b/include/uapi/drm/amdgpu_drm.h
>> index 56f052a10ff38..83414563779fb 100644
>> --- a/include/uapi/drm/amdgpu_drm.h
>> +++ b/include/uapi/drm/amdgpu_drm.h
>> @@ -329,6 +329,7 @@ union drm_amdgpu_ctx {
>>   #define AMDGPU_USERQ_OP_CREATE    1
>>   #define AMDGPU_USERQ_OP_FREE    2
>>   #define AMDGPU_USERQ_OP_QUERY_STATUS    3
>> +#define AMDGPU_USERQ_OP_CREATE_GANG    4
>>     /* queue priority levels */
>>   /* low < normal low < normal high < high */
>> @@ -417,6 +418,15 @@ struct drm_amdgpu_userq_in {
>>       __u64 mqd_size;
>>   };
>>   +struct drm_amdgpu_userq_in_create_gang {
>> +    /** AMDGPU_USERQ_OP_* */
>> +    __u32    op;
>> +    __u32    pad;
>> +    /** Queue ids passed for operation USERQ_OP_CREATE_GANG */
>> +    __u32    primary_queue_id;
>> +    __u32    secondary_queue_id;
>> +};
>> +
>>   /* The structure to carry output of userqueue ops */
>>   struct drm_amdgpu_userq_out {
>>       /**
>> @@ -436,6 +446,7 @@ struct drm_amdgpu_userq_out_query_state {
>>     union drm_amdgpu_userq {
>>       struct drm_amdgpu_userq_in in;
>> +    struct drm_amdgpu_userq_in_create_gang in_cg;
>>       struct drm_amdgpu_userq_out out;
>>       struct drm_amdgpu_userq_out_query_state out_qs;
>>   };


More information about the amd-gfx mailing list