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

Nirmoy nirmodas at amd.com
Mon Mar 2 12:29:18 UTC 2020


On 3/2/20 1:06 PM, Christian König wrote:
>
>>   #define AMDGPU_MAX_GFX_QUEUES KGD_MAX_QUEUES
>>   #define AMDGPU_MAX_COMPUTE_QUEUES KGD_MAX_QUEUES
>> +enum gfx_pipe_priority {
>> +    AMDGPU_GFX_PIPE_PRIO_LOW = 0,
>
> That is not used as far as I can see.
Okay I will remove it.
>
>> +    AMDGPU_GFX_PIPE_PRIO_NORMAL,
>> +    AMDGPU_GFX_PIPE_PRIO_HIGH,
>> +    AMDGPU_GFX_PIPE_PRIO_MAX
>> +
>> +};
>> +
>> +#define AMDGPU_GFX_QUEUE_PRIORITY_MINIMUM  0
>> +#define AMDGPU_GFX_QUEUE_PRIORITY_MAXIMUM  15
>>
>>   struct amdgpu_mec {
>>       struct amdgpu_bo    *hpd_eop_obj;
>> @@ -280,8 +290,9 @@ struct amdgpu_gfx {
>>       uint32_t            num_gfx_sched;
>>       unsigned            num_gfx_rings;
>>       struct amdgpu_ring compute_ring[AMDGPU_MAX_COMPUTE_RINGS];
>> +    struct drm_gpu_scheduler 
>> **compute_prio_sched[AMDGPU_GFX_PIPE_PRIO_MAX];
>>       struct drm_gpu_scheduler *compute_sched[AMDGPU_MAX_COMPUTE_RINGS];
>> -    uint32_t            num_compute_sched;
>> +    uint32_t num_compute_sched[DRM_SCHED_PRIORITY_MAX];
>
> Typo here that should probably be AMDGPU_GFX_PIPE_PRIO_MAX.
True. This is embarrassing :/
> _ring {
>>       struct mutex        priority_mutex;
>>       /* protected by priority_mutex */
>>       int            priority;
>> +    bool            high_priority;
>
> Probably better to use gfx_pipe_priority here.
Okay
>
>


More information about the amd-gfx mailing list