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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




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@xxxxxxxxxxxxxxxxxxxxx/msg45621.html


Regards,

Nirmoy

_______________________________________________
amd-gfx mailing list
amd-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux