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

Nirmoy nirmodas at amd.com
Thu Mar 5 21:13:18 UTC 2020


On 3/5/20 7:42 PM, Luben Tuikov wrote:
>
>> A quick search leads me amdgpu_sched_ioctl() which is using
>> DRM_SCHED_PRIORITY_INVALID
>>
>> to indicate a invalid value from userspace. I don't know much about drm
>> api to suggest any useful
>>
>> changes regarding this. But again this isn't in the scope of this patch
>> series.
> I'm not asking you to eliminate "DRM_SCHED_PRIORITY_INVALID".
> Oh wait! You forgot what I suggested in a previous review on
> how to fix enum drm_sched_priority, did you? :-D Search
> for that email.

Let me quote[1]:

"

Also consider changing to this:


enum drm_sched_priority {
         DRM_SCHED_PRIORITY_UNSET,
--------DRM_SCHED_PRIORITY_INVALID,--------<--- remove
         DRM_SCHED_PRIORITY_MIN,
         DRM_SCHED_PRIORITY_LOW = DRM_SCHED_PRIORITY_MIN,
         DRM_SCHED_PRIORITY_NORMAL,
         DRM_SCHED_PRIORITY_HIGH_SW,
         DRM_SCHED_PRIORITY_HIGH_HW,
         DRM_SCHED_PRIORITY_KERNEL,
         DRM_SCHED_PRIORITY_MAX,
};

We should never have an "invalid priority", just ignored priority. :-)
Second, having 0 as UNSET gives you easy priority when you set
map[0] = normal_priority, as memory usually comes memset to 0.
IOW, you'd not need to check against UNSET, and simply use
the default [0] which you'd set to normal priority.

"

I guess understood it wrong.


[1]https://www.mail-archive.com/amd-gfx@lists.freedesktop.org/msg45621.html 
<https://www.mail-archive.com/amd-gfx@lists.freedesktop.org/msg45621.html>


Regards,

Nirmoy

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/amd-gfx/attachments/20200305/234011c5/attachment.htm>


More information about the amd-gfx mailing list