[PATCH v5 1/4] drm/amdgpu: set compute queue priority at mqd_init

Christian König ckoenig.leichtzumerken at gmail.com
Mon Mar 2 17:16:38 UTC 2020


Am 02.03.20 um 15:20 schrieb Nirmoy:
> Hi Christian
>
> On 3/2/20 2:10 PM, Christian König wrote:
>>
>>>
>>> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ring.h 
>>> b/drivers/gpu/drm/amd/amdgpu/amdgpu_ring.h
>>> index 24caff085d00..201c6ac7bf9d 100644
>>> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ring.h
>>> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ring.h
>>> @@ -222,6 +222,7 @@ struct amdgpu_ring {
>>>       struct mutex        priority_mutex;
>>>       /* protected by priority_mutex */
>>>       int            priority;
>>> +    bool            gfx_pipe_priority;
>>
>> Didn't you wanted to make this an enum? Or was that another field.
>
> Shall I move gfx_pipe_priority to amdgpu_ring.h  from amdgpu_gfx.h
>
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ring.h
> @@ -35,6 +35,13 @@
>  #define AMDGPU_MAX_VCE_RINGS           3
>  #define AMDGPU_MAX_UVD_ENC_RINGS       2
>
> +/* gfx ring's pipe priority */
> +enum gfx_pipe_priority {
> +       AMDGPU_GFX_PIPE_PRIO_NORMAL = 1,
> +       AMDGPU_GFX_PIPE_PRIO_HIGH,
> +       AMDGPU_GFX_PIPE_PRIO_MAX
> +};
>
> or else
>
> @@ -222,7 +229,8 @@ struct amdgpu_ring {
>         struct mutex            priority_mutex;
>         /* protected by priority_mutex */
>         int                     priority;
> -       bool                    gfx_pipe_priority;
> +
> +       enum gfx_pipe_priority  pipe_priority;
>
> doesn't work because of compilation error: " field ‘pipe_priority’ has 
> incomplete type"

Mhm, let me ask from the other direction: What is that good for in the 
first place?

As far as I can see this is just to communicate to the ctx handling what 
priority a hw ring has, right?

But what we actually need in the ctx handling is an array of ring with 
normal and high priorty. So why don't we create that in the first place?

Regards,
Christian.

>
> Regards,
>
> Nirmoy
>
> _______________________________________________
> amd-gfx mailing list
> amd-gfx at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/amd-gfx



More information about the amd-gfx mailing list