drm_crtc_vblank_restore(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… drm_crtc_vblank_restore(9) β€” Kernel API Manual, bestie ✨

Okay so real talk, we're in the Kernel API Manual today and the star of the show is drm_crtc_vblank_restore(9). Yes the page header literally says drm_crtc_vblank_restore(9) twice, we love a self-referential queen. πŸŽ€


✨ NAME ✨

drm_crtc_vblank_restore β€” literally just estimate the vblanks you missed and update the vblank count. That's it. That's the whole vibe. πŸ¦‹


🌸 SYNOPSIS 🌸

void drm_crtc_vblank_restore (struct drm_crtc *crtc );

No return value, it just does the thing. Periodt. πŸ’…


πŸ’– ARGUMENTS πŸ’–

  • crtc β€” the CRTC in question. Like, the CRTC. The one we're talking about. πŸ‘‘

🧚 DESCRIPTION 🧚

So here's the tea: power management features can cause the frame counter to reset between vblank disable and enable. Rude, honestly. 😭

Drivers can use this function inside their drm_crtc_funcs.enable_vblank implementation to estimate how many vblanks got missed since the last drm_crtc_funcs.disable_vblank, using timestamps, and then update the vblank counter. Iconic recovery arc fr fr. ✨

⚠️ Okay this part matters so listen up πŸ‘€ β€” drivers must have race-free high-precision timestamping support. That means drm_crtc_funcs.get_vblank_timestamp has to be hooked up, and drm_vblank_crtc_config.disable_immediate must be set, to indicate that the time-stamping functions are race-free against vblank hardware counter increments. No cap, if that's not set up you're gonna have a bad time. πŸ’€

πŸ”₯ SEE ALSO πŸ”₯

Everything is connected, bestie, this is the whole friend group 🫢:


Okay that's the whole page, mwah πŸ’‹ β€” brought to you by the source at ./drivers/gpu/drm, version October 2026, and yeah the footer really does say drm_crtc_vblank_restore(9) again because the branding is consistent and we respect it. Stay timestamped, stay race-free, ily! πŸŒˆπŸ’œ

πŸ“¦ where this page comes from