Skip to contentSkip to conversation

drm/vblank: Increase timeout in drm_wait_one_vblank()

PATCH In review Chintan Patel 2 participants 5 messages Oct 28, 2025 – Dec 4, 2025

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH v4 1/1 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.

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(-)
drivers/gpu/drm/drm_vblank.c +1 -1
index 46f59883183d..f779103b261b 100644
@@ -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);
 
Signature · 1 line
2.43.0
maintainer Reviewed-by on v4 1/1
#1 lore raw

Am 28.10.25 um 04:43 schrieb Chintan Patel:

Quoted 6 lines

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.

Quoted 5 lines
Quoted 30 lines

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(-)
drivers/gpu/drm/drm_vblank.c +1 -1
index 46f59883183d..f779103b261b 100644
@@ -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);
 
Signature · 7 lines
--
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)
#2 lore raw
Quoted 12 lines · Thomas Zimmermann

Am 28.10.25 um 04:43 schrieb Chintan Patel:

Quoted 6 lines

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 !

#3 lore raw
In reply to Thomas Zimmermann

Hi Thomas,

Quoted 13 lines · Thomas Zimmermann

Am 28.10.25 um 04:43 schrieb Chintan Patel:

Quoted 6 lines

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.

Quoted 1 line
Quoted 6 lines
Quoted 4 lines

Gentle ping on this patch. Please let me know if there are any issues with the patch, or if it requires any changes or further testing.

Quoted 29 lines
Quoted 28 lines

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(-)
drivers/gpu/drm/drm_vblank.c +1 -1
index 46f59883183d..f779103b261b 100644
@@ -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);
#4 lore raw

Hi

Am 04.12.25 um 04:44 schrieb Chintan Patel:

Quoted 16 lines

Hi Thomas,

Quoted 13 lines · Thomas Zimmermann

Am 28.10.25 um 04:43 schrieb Chintan Patel:

Quoted 6 lines

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.

Quoted 1 line
Quoted 8 lines
Quoted 6 lines
Quoted 4 lines

Gentle ping on this patch. Please let me know if there are any issues with the patch, or if it requires any changes or further testing.

It's on its way already. This patch has been merged as commit f050da08a4ed ("drm/vblank: Increase timeout in drm_wait_one_vblank()"). It was part of the recent PR for v6.19-rc1.

Best regards
Thomas

[1] https://lore.kernel.org/dri-devel/CAPM=9tySHmq2KLAvW95MeKcb-37gZBhHTY5hf4dCTgUFLd+RKg@mail.gmail.com/T/#u

Quoted 31 lines
Quoted 30 lines
Quoted 29 lines

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(-)
drivers/gpu/drm/drm_vblank.c +1 -1
index 46f59883183d..f779103b261b 100644
@@ -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);
Signature · 6 lines
--
Thomas Zimmermann
Graphics Driver Developer
SUSE Software Solutions Germany GmbH
Frankenstr. 146, 90461 Nürnberg, Germany, www.suse.com
GF: Jochen Jaser, Andrew McDonald, Werner Knoblich, (HRB 36809, AG Nürnberg)