drm_lspcon_get_mode(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… drm_lspcon_get_mode(9) β€” the Kernel API Manual glow-up ✨

okay bestie, so this one lives in the Kernel API Manual and it's literally called drm_lspcon_get_mode β€” and no cap, the whole gig is: Get LSPCON's current mode of operation by reading offset (0x80, 0x41) πŸŽ€

That's it. That's the vibe. We're reading a couple of little register offsets and finding out what headspace your LSPCON is in rn. πŸ¦‹


✨ SYNOPSIS ✨

int drm_lspcon_get_mode (const struct drm_device *dev , struct
i2c_adapter *adapter , enum drm_lspcon_mode *mode );

look at her go 😭 three args, one int return, absolutely iconic behaviour.


🌸 ARGUMENTS 🌸

  • dev β€” the drm_device to use, aka the main character of this whole operation πŸ‘‘
  • adapter β€” the I2C-over-aux adapter, the little messenger that carries the gossip 🧚
  • mode β€” output variable for the current lspcon mode of operation; this is where the answer gets dropped off πŸ’–

⭐ RETURN ⭐

  • 0 on success β€” and when it succeeds it sets the current_mode value to the appropriate mode 🫢
  • -error on failure β€” yes, negative error, we're in our flop era and the call did not slay πŸ’€
fr fr: check that return value. 0 = we ate. anything else = we did not eat. πŸ™ˆ

πŸ¦‹ SEE ALSO πŸ¦‹

Kernel file:

./drivers/gpu/drm/display/drm_dp_dual_mode_helper.c

and the whole friend group, lowkey a full group chat:

iykyk πŸ’…


kisses, this page came from ./drivers/gpu/drm/display and it's dated October 2026 β€” see u in the next release, mwah πŸ“βœ¨

πŸ“¦ where this page comes from