public inbox for drm-ai-reviews@public-inbox.freedesktop.org
 help / color / mirror / Atom feed
* [PATCH 0/7] drm/vblank: timer: Fix timestamps and improve reliabilty
@ 2026-06-01 14:08 Thomas Zimmermann
  2026-06-01 14:08 ` [PATCH 1/7] drm/vblank: timer: Return success status from get_vblank_timeout Thomas Zimmermann
                   ` (7 more replies)
  0 siblings, 8 replies; 19+ messages in thread
From: Thomas Zimmermann @ 2026-06-01 14:08 UTC (permalink / raw)
  To: simona, michel.daenzer, louis.chauvet, ville.syrjala, jani.nikula,
	mhklkml, maarten.lankhorst, mripard, airlied
  Cc: dri-devel, amd-gfx, virtualization, Thomas Zimmermann

It appears that the DRM's vblank timers have always been somewhat buggy
in their timestamp calculations. Fix the generic implementation and
improve reliability.

Patch 1 returns success/failure to the caller, as expected by DRM.

Patch 2 fixes the timestamp calculation to return the time of the first
visible scanline in the current vblank phase.

Patch 3 switches the hrtimer to absolute values since boot, so that it's
easier to work with and we can predict future timestamps reliably.

Patches 4 and 5 allow for estimating timestamps even with the timer
being disabled.

Patches 6 and 7 improve the retrieval of the next vblank timeout's
timestamp.

Tested under heavy CPU-load on bochs and virtio. No ersors or warnings
showed up.

There have been reports about vblank timeouts being handled so late,
that they trigger DRM's internal error checks. Maybe these fixes and
adjustments can help to further avoid hick ups from delayed vblank
timers.

Thomas Zimmermann (7):
  drm/vblank: timer: Return success status from get_vblank_timeout
  drm/vblank: timer: Fix timestamp calculation
  drm/vblank: timer: Use absolute timer since boot
  drm/vblank: timer: Reorganize get_vblank_timeout
  drm/vblank: timer: Estimate vblank timeout if timer is disabled
  drm/vblank: timer: Verify that expiry time is in the future
  drm/vblank: timer: Avoid reading the vblank time unnecessarily

 drivers/gpu/drm/drm_vblank.c        | 105 ++++++++++++++++++++--------
 drivers/gpu/drm/drm_vblank_helper.c |   4 +-
 include/drm/drm_vblank.h            |   2 +-
 3 files changed, 79 insertions(+), 32 deletions(-)


base-commit: 4f554688dffcacf48630c14f9fb77a9f60394c1c
-- 
2.54.0


^ permalink raw reply	[flat|nested] 19+ messages in thread

end of thread, other threads:[~2026-06-04  4:04 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-06-01 14:08 [PATCH 0/7] drm/vblank: timer: Fix timestamps and improve reliabilty Thomas Zimmermann
2026-06-01 14:08 ` [PATCH 1/7] drm/vblank: timer: Return success status from get_vblank_timeout Thomas Zimmermann
2026-06-04  4:03   ` Claude review: " Claude Code Review Bot
2026-06-01 14:08 ` [PATCH 2/7] drm/vblank: timer: Fix timestamp calculation Thomas Zimmermann
2026-06-01 16:24   ` Michel Dänzer
2026-06-01 17:30     ` Thomas Zimmermann
2026-06-02 14:14       ` Michel Dänzer
2026-06-04  4:03   ` Claude review: " Claude Code Review Bot
2026-06-01 14:08 ` [PATCH 3/7] drm/vblank: timer: Use absolute timer since boot Thomas Zimmermann
2026-06-04  4:03   ` Claude review: " Claude Code Review Bot
2026-06-01 14:08 ` [PATCH 4/7] drm/vblank: timer: Reorganize get_vblank_timeout Thomas Zimmermann
2026-06-04  4:03   ` Claude review: " Claude Code Review Bot
2026-06-01 14:08 ` [PATCH 5/7] drm/vblank: timer: Estimate vblank timeout if timer is disabled Thomas Zimmermann
2026-06-04  4:03   ` Claude review: " Claude Code Review Bot
2026-06-01 14:08 ` [PATCH 6/7] drm/vblank: timer: Verify that expiry time is in the future Thomas Zimmermann
2026-06-04  4:03   ` Claude review: " Claude Code Review Bot
2026-06-01 14:08 ` [PATCH 7/7] drm/vblank: timer: Avoid reading the vblank time unnecessarily Thomas Zimmermann
2026-06-04  4:04   ` Claude review: " Claude Code Review Bot
2026-06-04  4:03 ` Claude review: drm/vblank: timer: Fix timestamps and improve reliabilty Claude Code Review Bot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox