DRM_MODESET_LOCK_ALL_END(9)
π DRM_MODESET_LOCK_ALL_END(9) β like, the Kernel API Manual bestie β¨
okay so this is DRM_MODESET_LOCK_ALL_END from the Kernel API Manual, and honestly? she's the cleanup queen we all need. π
πΈ NAME πΈ
DRM_MODESET_LOCK_ALL_END β the helper that releases and cleans up your modeset locks. she tidies up after the party. iconic behaviour, no cap. π§Ήβ¨
π¦ SYNOPSIS π¦
DRM_MODESET_LOCK_ALL_END (dev , ctx , ret );
π ARGUMENTS π
devβ your drm device. the main character of the operation tbh. π₯οΈctxβ the local modeset acquire context. heads up bestie: it will be dereferenced. πretβ your local ret/err/etc variable, there to track the error status and keep you honest. π
β¨ DESCRIPTION β¨
so this is literally the other side of DRM_MODESET_LOCK_ALL_BEGIN. they're a matching set, iykyk. π«Ά
it will bounce back to BEGIN if ret is -EDEADLK. yes, it goes back. it's giving boomerang energy. πͺ
β οΈ ok important: you must use the same ret variable for begin and end. like, the same one. this is not a drill. it's so deadlock conditions get handled properly, and skipping it is lowkey a bad time. π
π₯ RETURN π₯
ret will be untouched unless it's -EDEADLK on entry. so basically:
- if you successfully acquire the locks,
retstays whatever your code sets it to. slay. π - if there's a deadlock or other failure with acquire or backoff,
retgets set to that failure. π
in both of those failure cases, the code between BEGIN/END will not be run β so the failure is just reflecting that you couldn't grab the locks. sad but true. π
π SEE ALSO π
- Kernel file
./include/drm/drm_modeset_lock.hstruct drm_modeset_acquire_ctx(9)struct drm_modeset_lock(9)drm_modeset_lock_fini(9)drm_modeset_is_locked(9)drm_modeset_lock_assert_held(9)DRM_MODESET_LOCK_ALL_BEGIN(9)
π¦ that's the whole page, bestie β brought to you from ./include/drm, October 2026 edition. go forth and release those locks responsibly. periodt. ππ
π¦ 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