STRUCT DRM_PRIVACY_SCREEN_OPS(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ struct drm_privacy_screen_ops(9) ✨

okay bestie, welcome to the Kernel API Manual πŸ’… today we're looking at struct drm_privacy_screen_ops β€” no cap, it's the whole vibe of the privacy-screen operation set. 🫢


πŸŽ€ NAME πŸŽ€

struct drm_privacy_screen_ops β€” literally just the drm_privacy_screen operations, that's the whole thing, that's her πŸ‘‘


πŸ¦‹ SYNOPSIS πŸ¦‹

the way she's shaped, fr fr:

struct drm_privacy_screen_ops {
    int (*set_sw_state)(struct drm_privacy_screen *priv, enum
drm_privacy_screen_status sw_state);
    void (*get_hw_state)(struct drm_privacy_screen *priv);
 };

🌸 Members 🌸

bestie these are the two function pointers and they are both main characters, let's go:

  • set_sw_state β€” called when someone wants to request a change of the privacy-screen state. and like, plot twist 🫒 the privacy-screen class code has a check in it so this does not get called when the hw_state is reporting that the state is locked. it is the driver's responsibility to update sw_state and hw_state. and heads up: this is always called with the drm_privacy_screen's lock held. always. 😌
  • get_hw_state β€” called to request that the driver gets the current privacy-screen state from the hardware and then updates sw_state and hw_state accordingly. the core calls this right before the privacy-screen is registered in sysfs. like, right before. timing is everything ✨

πŸ’œ Description πŸ’œ

so what is this? it defines the operations which the privacy-screen class code may call. these functions should be implemented by the privacy-screen driver. that's it, that's the assignment, slay πŸ’…


πŸ”₯ SEE ALSO πŸ”₯

  • Kernel file ./include/drm/drm_privacy_screen_driver.h
  • struct drm_privacy_screen(9)

that's the whole page babes, go implement your ops πŸ’–

✧ο½₯゚: * sign-off * :ο½₯゚✧ this lil gem lives in ./include/drm, and the version/date stamp on it is October 2026 β€” so like, future vibes but make it kernel 🌈 see you in the source tree, mwah πŸ“

πŸ“¦ where this page comes from