On Sat, 19 Sep 2020 12:37:26 -0700 Rob Clark wrote: > +/** > + * drm_crtc_set_sched_mode: > + * @dev: DRM device > + * @mode: one of DRM_CLIENT_CAP_SCHED_x > + * > + * Set the scheduling mode for per-CRTC kthread workers. This controls > + * whether nonblocking atomic commits will run with SCHED_NORMAL or > + * SCHED_FIFO (rt) priority. > + */ > +void drm_crtc_set_sched_mode(struct drm_device *dev, int mode) > +{ > + struct drm_crtc *crtc; > + > + drm_for_each_crtc(crtc, dev) { > + switch (mode) { > + case DRM_CLIENT_CAP_SCHED_NORMAL: > + /* zero is default nice value for kthreads: */ > + sched_set_normal(crtc->worker->task, 0); > + break; > + case DRM_CLIENT_CAP_SCHED_FIFO: > + sched_set_fifo(crtc->worker->task); > + break; Better if they are done in kernel/kthread.c wrt FIFO worker. Off-topic: if that's fine, what's preventing you from doing the same in kernel/workqueue.c for the workqueus you create manually? _______________________________________________ dri-devel mailing list dri-devel@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/dri-devel