STRUCT DRM_PRIVACY_SCREEN_OPS(9)
β¨ 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 thehw_stateis reporting that the state is locked. it is the driver's responsibility to updatesw_stateandhw_state. and heads up: this is always called with thedrm_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 updatessw_stateandhw_stateaccordingly. 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
- 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