[PATCH 02/13] drm/amdgpu/userq: add UAPI for setting queue priority
Khatri, Sunil
sukhatri at amd.com
Fri Apr 11 16:49:43 UTC 2025
Reviewed-by: Sunil Khatri <sunil.khatri at amd.com>
On 4/11/2025 12:23 AM, Alex Deucher wrote:
> Allow the user to set a queue priority levels:
> 0 - normal low - most apps (maps to MES AMD_PRIORITY_LEVEL_NORMAL)
> 1 - low - background jobs (maps to MES AMD_PRIORITY_LEVEL_LOW)
> 2 - normal high - apps that need relative high (maps to MES AMD_PRIORITY_LEVEL_MEDIUM)
> 3 - high (admin only - for compositors) (maps to MES AMD_PRIORITY_LEVEL_HIGH)
>
> Signed-off-by: Alex Deucher <alexander.deucher at amd.com>
> ---
> include/uapi/drm/amdgpu_drm.h | 8 ++++++++
> 1 file changed, 8 insertions(+)
>
> diff --git a/include/uapi/drm/amdgpu_drm.h b/include/uapi/drm/amdgpu_drm.h
> index 1a451907184cc..8719754c777b4 100644
> --- a/include/uapi/drm/amdgpu_drm.h
> +++ b/include/uapi/drm/amdgpu_drm.h
> @@ -329,6 +329,14 @@ union drm_amdgpu_ctx {
> #define AMDGPU_USERQ_OP_CREATE 1
> #define AMDGPU_USERQ_OP_FREE 2
>
> +/* queue priority levels */
> +#define AMDGPU_USERQ_CREATE_FLAGS_QUEUE_PRIORITY_MASK 0x3
> +#define AMDGPU_USERQ_CREATE_FLAGS_QUEUE_PRIORITY_SHIFT 0
> +#define AMDGPU_USERQ_CREATE_FLAGS_QUEUE_PRIORITY_NORMAL_LOW 0
> +#define AMDGPU_USERQ_CREATE_FLAGS_QUEUE_PRIORITY_LOW 1
> +#define AMDGPU_USERQ_CREATE_FLAGS_QUEUE_PRIORITY_NORMAL_HIGH 2
> +#define AMDGPU_USERQ_CREATE_FLAGS_QUEUE_PRIORITY_HIGH 3 /* admin only */
> +
> /*
> * This structure is a container to pass input configuration
> * info for all supported userqueue related operations.
More information about the amd-gfx
mailing list