drm_panic_lock(9)
π drm_panic_lock(9) π
okay so bestie, welcome to the Kernel API Manual page for drm_panic_lock(9) β the function that keeps your panic printing state from getting absolutely cooked π
β¨ NAME β¨
drm_panic_lock β protect panic printing relevant state π‘οΈ
πΈ SYNOPSIS πΈ
drm_panic_lock (dev , flags );
π¦ ARGUMENTS π¦
devβ astruct drm_deviceπ₯οΈflagsβunsigned longirq flags you need to pass to the unlock counterpart π
π DESCRIPTION π
You must call this function to protect the software and hardware state that the panic printing code must be able to rely on. Keep those protected sections as small as possible, no cap. It uses the irqsave/irqrestore variant, and it can be called from an irq handler. Examples include:
- Access to peek/poke or other similar registers, if that is the way the driver prints the pixels into the scanout buffer at panic time. π
- Updates to pointers like
drm_plane.state, allowing the panic handler to safely deference these. This is done indrm_atomic_helper_swap_state. π«Ά - An state that isn't invariant and that the driver must be able to access during panic printing. π
π SEE ALSO π
Kernel file ./include/drm/drm_panic.h struct drm_scanout_buffer(9), drm_panic_trylock(9), drm_panic_unlock(9) β go read these too, bestie π
that's the whole vibe fr fr: from ./include/drm, dated October 2026, all about drm_panic_lock(9) β slay and stay safe out there π
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms