drm_privacy...set_sw_state(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… drm_privacy...set_sw_state(9) β€” like, the Kernel API Manual, bestie ✨

okay so this one's from the Kernel API Manual and it's literally called drm_privacy_screen_set_sw_state β€” say that five times fast, I dare you 🫢


🌸 NAME 🌸

drm_privacy_screen_set_sw_state β€” set a privacy-screen's sw-state. that's it. that's the whole vibe πŸ’«


✨ SYNOPSIS ✨

int drm_privacy_screen_set_sw_state (struct drm_privacy_screen *priv ,
enum drm_privacy_screen_status sw_state );

bestie look at that signature. two arguments. so clean. we love to see it πŸ‘‘


πŸŽ€ ARGUMENTS πŸŽ€

  • priv β€” the privacy screen you're setting the sw-state for. it's the main character here, give it what it needs πŸ’–
  • sw_state β€” the new sw-state value you want to set. brand new value, who dis 🌈

πŸ¦‹ DESCRIPTION πŸ¦‹

okay so here's the tea β˜• β€” this function sets the sw-state of a privacy screen. simple enough, right? but wait, there's a plot twist:

if the privacy-screen is not in a locked hw-state, then the actual and hw-state of the privacy-screen get immediately updated to the new value. like, right away. instant. no waiting around πŸ’¨

but if the privacy-screen is in a locked hw-state, then the new sw-state gets remembered as the requested state β€” like, the state it should be put in when it becomes unlocked πŸ‘€. so it's not ignored, it's just... on hold. patient queen behavior tbh πŸ’…

ngl this is giving "hold my call, I'll get back to you" energy and honestly? respect πŸ™ˆ

⭐ RETURN ⭐

  • 0 β€” success! slay! we ate! πŸŽ‰
  • negative error code β€” failure 😭 something went wrong, go check it

πŸ”₯ SEE ALSO πŸ”₯

a whole friend group of functions fr fr β€” go say hi to all of them 🫢✨


mwah πŸ’‹ that's the whole page, brought to you by the fine folks at ./drivers/gpu/drm, dated October 2026. go forth and set those sw-states, bestie β€” you've got this πŸ‘‘πŸŒΈ

πŸ“¦ where this page comes from