[PATCH 1/3] drm/amdgpu: track whether a queue is a kernel queue in amdgpu_mqd_prop

Lazar, Lijo lijo.lazar at amd.com
Fri Jul 18 04:10:08 UTC 2025



On 7/17/2025 3:31 AM, Alex Deucher wrote:
> Used to to set the MQD appropriately for each queue type.
> Kernel queues have have additional privileges.
> 
<nit> Extra 'have'
> Acked-by: Christian König <christian.koenig at amd.com>
> Signed-off-by: Alex Deucher <alexander.deucher at amd.com>
> ---
>  drivers/gpu/drm/amd/amdgpu/amdgpu.h      | 1 +
>  drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c | 2 ++
>  2 files changed, 3 insertions(+)
> 
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu.h b/drivers/gpu/drm/amd/amdgpu/amdgpu.h
> index a1737556a77eb..ef3af170dda4e 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu.h
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu.h
> @@ -883,6 +883,7 @@ struct amdgpu_mqd_prop {
>  	uint64_t csa_addr;
>  	uint64_t fence_address;
>  	bool tmz_queue;
> +	bool kernel_queue;
>  };
>  
>  struct amdgpu_mqd {
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c
> index acac646a4e4e9..617dc009a2550 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c
> @@ -719,6 +719,8 @@ static void amdgpu_ring_to_mqd_prop(struct amdgpu_ring *ring,
>  	prop->eop_gpu_addr = ring->eop_gpu_addr;
>  	prop->use_doorbell = ring->use_doorbell;
>  	prop->doorbell_index = ring->doorbell_index;
> +	/* kernel queues are privileged */
<nit> This comment is no longer needed here.

Thanks,
Lijo

> +	prop->kernel_queue = true;
>  
>  	/* map_queues packet doesn't need activate the queue,
>  	 * so only kiq need set this field.



More information about the amd-gfx mailing list