Issue #3478 has been updated by liweitianux.
Two ideas: * Change @MAX_SCHEDULE_TIMEOUT@ to @INT_MAX@, as our @*sleep()@ uses @int@ type for the timeout. * Or change @*sleep()@ to use @long@ type for the timeout. ---------------------------------------- Bug #3478: drm: make the Linux "wait forever" sleeps wait forever http://bugs.dragonflybsd.org/issues/3478#change-15002 * Author: tuxillo * Status: New * Priority: Normal * Target version: 6.6 * Start date: 2026-11-22 ---------------------------------------- __wait_for_completion_generic() and __wait_event_common() pass their timeout to lksleep() and tsleep(), which take an int. MAX_SCHEDULE_TIMEOUT (LONG_MAX) becomes -1 there, which tsleep() turns into the next tick, so wait_for_completion*() and wait_event*_timeout(MAX_SCHEDULE_TIMEOUT) returned after one tick without the event. radeon_fence_wait() took that as a signalled fence, and drm_atomic_helper_swap_state() went ahead before the previous commit's hw_done. Treat timeouts of INT_MAX ticks or more as no timeout, as schedule_timeout() already does. Also make an interruptible completion wait return -ERESTARTSYS on a signal instead of sleeping again at once, and at least 1 on completion, as Linux does. ---Files-------------------------------- Makefile (249 Bytes) wfctest.c (3.44 KB) wfcsig.sh (371 Bytes) 0001-drm-make-the-Linux-wait-forever-sleeps-wait-forever.patch (3.67 KB) -- You have received this notification because you have either subscribed to it, or are involved in it. To change your notification preferences, please click here: http://bugs.dragonflybsd.org/my/account
