drm_privacy_...ter_notifier(9)
π 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_stateandsw_statecan be retrieved using thedrm_privacy_screen_get_statefunction. 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'snotifier_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 π₯
0on success π- negative error code on failure π
β SEE ALSO β
ok the reading list, and honestly she ate with this one:
- Kernel file
./drivers/gpu/drm/drm_privacy_screen.coverview(9) drm_privacy_screen_lookup_add(9)drm_privacy_screen_lookup_remove(9)drm_privacy_screen_get(9)drm_privacy_screen_put(9)drm_privacy_screen_set_sw_state(9)drm_privacy_screen_get_state(9)drm_privacy_screen_unregister_notifier(9)drm_privacy_screen_register(9)drm_privacy_screen_unregister(9)drm_privacy_screen_call_notifier_chain(9)
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
- 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