Commit f050da08 authored by Chintan Patel's avatar Chintan Patel Committed by Thomas Zimmermann
Browse files

drm/vblank: Increase timeout in drm_wait_one_vblank()



Currently, wait_event_timeout() in drm_wait_one_vblank() uses a 100ms
timeout. Under heavy scheduling pressure or rare delayed vblank
handling, this can trigger WARNs unnecessarily.

Increase the timeout to 1000ms to reduce spurious WARNs, while still
catching genuine issues.

Reported-by: default avatar <syzbot+147ba789658184f0ce04@syzkaller.appspotmail.com>
Closes: https://syzkaller.appspot.com/bug?extid=147ba789658184f0ce04


Tested-by: default avatar <syzbot+147ba789658184f0ce04@syzkaller.appspotmail.com>
Signed-off-by: default avatarChintan Patel <chintanlike@gmail.com>

v2:
 - Dropped unnecessary in-code comment (suggested by Thomas Zimmermann)
 - Removed else branch, only log timeout case

v3:
 - Replaced drm_dbg_kms()/manual logging with drm_err() (suggested by Ville Syrjälä)
 - Removed unnecessary curr = drm_vblank_count() (suggested by Thomas Zimmermann)
 - Fixed commit message wording ("invalid userspace calls" → "delayed vblank handling")

v4:
 - Keep the original drm_WARN() to catch genuine kernel issues
 - Increased timeout from 100ms → 1000ms to reduce spurious WARNs (suggested by Thomas Zimmermann)
Reviewed-by: default avatarThomas Zimmermann <tzimmermann@suse.de>
Signed-off-by: default avatarThomas Zimmermann <tzimmermann@suse.de>
Link: https://patch.msgid.link/20251028034337.6341-1-chintanlike@gmail.com
parent 3946d3ba
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1315,7 +1315,7 @@ void drm_wait_one_vblank(struct drm_device *dev, unsigned int pipe)

	ret = wait_event_timeout(vblank->queue,
				 last != drm_vblank_count(dev, pipe),
				 msecs_to_jiffies(100));
				 msecs_to_jiffies(1000));

	drm_WARN(dev, ret == 0, "vblank wait timed out on crtc %i\n", pipe);