drm_can_sleep(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸŽ€ drm_can_sleep(9) πŸŽ€

okay so welcome to the Kernel API Manual page for drm_can_sleep, bestie πŸ’– this one is short but it has opinions.


🌸 NAME 🌸

drm_can_sleep β€” returns true if it’s currently okay to sleep 😴

✨ SYNOPSIS ✨

bool drm_can_sleep (void );

πŸŽ€ ARGUMENTS πŸŽ€

  • void β€” no arguments. literally none. zero. the void is voiding 🫢

πŸ’… DESCRIPTION πŸ’…

okay so real talk: This function shall not be used in new code. periodt. do not put this in your new code, bestie, i am begging πŸ™ˆ

the check for running in atomic context may not work β€” see linux/preempt.h for the details πŸ‘€

FIXME: All users of drm_can_sleep should be removed (see todo.rst) πŸ’€

so yeah. it’s giving β€œlegacy icon but also please retire her gently.” no cap.

πŸ”₯ RETURN πŸ”₯

False if kgdb is active, we are in atomic context or irqs are disabled. that’s the vibe check it’s doing 😭

πŸ‘€ SEE ALSO πŸ‘€

  • Kernel file ./include/drm/drm_util.h
  • drm utils(9)

kisses, this page lives in ./include/drm, it’s the October 2026 cut, and you were reading drm_can_sleep(9) πŸ’–πŸ«Άβœ¨

πŸ“¦ where this page comes from