drm_privacy_...ter_notifier(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– drm_privacy_screen_register_notifier πŸ’–

okay so bestie, welcome to drm_privacy_...ter_notifier(9) β€” yes that's the truncated header name, she's mysterious, she's iconic, and she lives in the Kernel API Manual. the actual function is drm_privacy_screen_register_notifier, and today we're gonna learn what she does, no cap 🫢


✨ SYNOPSIS ✨

int drm_privacy_screen_register_notifier (struct drm_privacy_screen
*priv , struct notifier_block *nb );

like, you hand her a privacy screen and a notifier block and she does her thing. slay πŸ’…


πŸŽ€ ARGUMENTS πŸŽ€

  • priv β€” the privacy screen you're registering this notifier with. like, the main character of this whole situation πŸ‘‘
  • nb β€” the notifier-block that's getting registered. this is the little guy that'll get pinged later πŸ¦‹

🌸 DESCRIPTION 🌸

so here's the vibe: you register a notifier with the privacy-screen, and that notifier gets notified whenever the privacy-screen state gets changed from outside the privacy-screen class. iykyk 😌 e.g. β€” and this is the iconic example β€” the state may be changed by the hardware itself in response to a hotkey press. the hardware just does it, no permission slip, no text message. rude but valid.

some very important deets, listen up:

  • the notifier is called with no locks held. yes bestie, no locks. πŸ”“
  • the new hw_state and sw_state can be retrieved using the drm_privacy_screen_get_state function. that's how you find out what actually happened ✨
  • a pointer to the drm_privacy_screen's struct is passed as the `void *data` argument of the notifier_block's notifier_call. like a little gift-wrapped pointer 🎁
ok and this part is SO important, highkey a vibe check for your whole mental model: the notifier will NOT be called when changes are made through drm_privacy_screen_set_sw_state. only for external changes. periodt. don't come for her when she doesn't fire on your own software-initiated changes πŸ’€

πŸ”₯ RETURN πŸ”₯

  • 0 on success πŸŽ‰
  • negative error code on failure 😭

⭐ SEE ALSO ⭐

ok the reading list, and honestly she ate with this one:


and that's the whole page, bestie!! πŸ§šπŸ’œ

this icon was brought to you from the ./drivers/gpu/drm directory, dated October 2026, and yes β€” she's still out here going by drm_privacy_...ter_notifier(9) in the footer. truncated queen. no explanation. we respect it πŸ’…βœ¨πŸŒΈ

πŸ“¦ where this page comes from