* [PATCH v4] drm/vblank: Increase timeout in drm_wait_one_vblank()
@ 2025-10-28 3:43 Chintan Patel
2025-10-28 17:14 ` Thomas Zimmermann
0 siblings, 1 reply; 3+ messages in thread
From: Chintan Patel @ 2025-10-28 3:43 UTC (permalink / raw)
To: maarten.lankhorst, maxime.ripard, tzimmermann, airlied, simona
Cc: dri-devel, linux-kernel, syzbot+147ba789658184f0ce04,
Chintan Patel
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: syzbot+147ba789658184f0ce04@syzkaller.appspotmail.com
Closes: https://syzkaller.appspot.com/bug?extid=147ba789658184f0ce04
Tested-by: syzbot+147ba789658184f0ce04@syzkaller.appspotmail.com
Signed-off-by: Chintan 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)
---
drivers/gpu/drm/drm_vblank.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/drm_vblank.c b/drivers/gpu/drm/drm_vblank.c
index 46f59883183d..f779103b261b 100644
--- a/drivers/gpu/drm/drm_vblank.c
+++ b/drivers/gpu/drm/drm_vblank.c
@@ -1303,7 +1303,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);
--
2.43.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH v4] drm/vblank: Increase timeout in drm_wait_one_vblank()
2025-10-28 3:43 [PATCH v4] drm/vblank: Increase timeout in drm_wait_one_vblank() Chintan Patel
@ 2025-10-28 17:14 ` Thomas Zimmermann
2025-10-29 3:50 ` Chintan Patel
0 siblings, 1 reply; 3+ messages in thread
From: Thomas Zimmermann @ 2025-10-28 17:14 UTC (permalink / raw)
To: Chintan Patel, maarten.lankhorst, maxime.ripard, airlied, simona
Cc: dri-devel, linux-kernel, syzbot+147ba789658184f0ce04
Am 28.10.25 um 04:43 schrieb Chintan Patel:
> 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.
Thanks a lot.
>
> Reported-by: syzbot+147ba789658184f0ce04@syzkaller.appspotmail.com
> Closes: https://syzkaller.appspot.com/bug?extid=147ba789658184f0ce04
> Tested-by: syzbot+147ba789658184f0ce04@syzkaller.appspotmail.com
> Signed-off-by: Chintan Patel <chintanlike@gmail.com>
Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de>
>
> 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)
> ---
> drivers/gpu/drm/drm_vblank.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/drm_vblank.c b/drivers/gpu/drm/drm_vblank.c
> index 46f59883183d..f779103b261b 100644
> --- a/drivers/gpu/drm/drm_vblank.c
> +++ b/drivers/gpu/drm/drm_vblank.c
> @@ -1303,7 +1303,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);
>
--
--
Thomas Zimmermann
Graphics Driver Developer
SUSE Software Solutions Germany GmbH
Frankenstrasse 146, 90461 Nuernberg, Germany
GF: Ivo Totev, Andrew Myers, Andrew McDonald, Boudien Moerman
HRB 36809 (AG Nuernberg)
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH v4] drm/vblank: Increase timeout in drm_wait_one_vblank()
2025-10-28 17:14 ` Thomas Zimmermann
@ 2025-10-29 3:50 ` Chintan Patel
0 siblings, 0 replies; 3+ messages in thread
From: Chintan Patel @ 2025-10-29 3:50 UTC (permalink / raw)
To: Thomas Zimmermann, maarten.lankhorst, maxime.ripard, airlied,
simona
Cc: dri-devel, linux-kernel, syzbot+147ba789658184f0ce04
On 10/28/25 10:14, Thomas Zimmermann wrote:
>
>
> Am 28.10.25 um 04:43 schrieb Chintan Patel:
>> 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.
>
> Thanks a lot.
>
Appreciate your guidance !
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2025-10-29 3:50 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-10-28 3:43 [PATCH v4] drm/vblank: Increase timeout in drm_wait_one_vblank() Chintan Patel
2025-10-28 17:14 ` Thomas Zimmermann
2025-10-29 3:50 ` Chintan Patel
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).