[PATCH 1/4] drm/amdgpu: fix ring priority assignment

Christian König christian.koenig at amd.com
Mon Feb 1 15:00:45 UTC 2021


Am 01.02.21 um 15:37 schrieb Nirmoy Das:
> Assign correct ring priority.
>
> Fixes: 33abcb1f5a17 ("drm/amdgpu: set compute queue priority at mqd_init")
> Signed-off-by: Nirmoy Das <nirmoy.das at amd.com>
> ---
>   drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c | 3 ++-
>   1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c
> index 1a612f51ecd9..b3d064383807 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c
> @@ -258,7 +258,8 @@ int amdgpu_ring_init(struct amdgpu_device *adev, struct amdgpu_ring *ring,
>   	}
>   
>   	ring->max_dw = max_dw;
> -	ring->priority = DRM_SCHED_PRIORITY_NORMAL;
> +	ring->priority = (hw_prio == AMDGPU_GFX_PIPE_PRIO_HIGH) ?
> +		DRM_SCHED_PRIORITY_HIGH : DRM_SCHED_PRIORITY_NORMAL;
>   	mutex_init(&ring->priority_mutex);

I think we should rather nuke the ring->priority and priority_mutex 
fields here, cause that is completely unused right now.

(We can of course keep the priority field around, but I suggest to use 
the hw priority directly).

Christian.

>   
>   	if (!ring->no_scheduler) {



More information about the amd-gfx mailing list