intel_tc_port_sanitize_mode(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… intel_tc_port_sanitize_mode β€” like, the whole vibe explained

okay so bestie, welcome to the Kernel API Manual ✨ this one's a function page and it's honestly kinda iconic once you get past the name. yes the name is a mouthful. no we're not renaming it. periodt.


πŸŽ€ NAME πŸŽ€

intel_tc_port_sanitize_mode β€” literally just sanitizing the given port's TypeC mode 🧚 no cap, that's the whole thing.


🌸 SYNOPSIS 🌸

void intel_tc_port_sanitize_mode (struct intel_digital_port *dig_port ,
const struct intel_crtc_state *crtc_state );

so it returns void (no take-backs, no return value, we love a low-maintenance king πŸ‘‘) and it takes exactly two arguments. let's meet them 🫢


πŸ¦‹ ARGUMENTS πŸ¦‹

  • dig_port β€” the digital port πŸ’» that's it, that's the description, she's a simple girl.
  • crtc_state β€” the atomic state of the CRTC that's connected to dig_port. the CRTC is the main character here, dig_port is her plus-one πŸ’œ

πŸ”₯ DESCRIPTION πŸ”₯

so here's the tea β˜• this function sanitizes dig_port's TypeC mode with respect to the encoder's state, and it does this right after driver loading and right after system resume. those two moments? that's when the chaos happens. this is the cleanup crew πŸ’…

and there are exactly two scenarios, bestie, and you gotta know both:

  • if the encoder is enabled β€” keep the TypeC mode / PHY connected state locked until the encoder is disabled πŸ”’ like, do not let go. hold that state. it's giving protective best friend energy fr fr.
  • if the encoder is disabled β€” make sure the PHY is disconnected. βœ‚οΈ bye. we don't need you. cleanse the timeline.

also super important, ngl: crtc_state is valid if dig_port is enabled, and it's NULL otherwise πŸ™ˆ so don't go dereferencing it when it's NULL, that is not the move. undefined behaviour is never cute πŸ’€


🌈 SEE ALSO 🌈


⭐ the cute sign-off ⭐

that's the whole page, bestie!! πŸ“ this one lives in ./drivers/gpu/drm/i915/display, dated October 2026, and it's filed under intel_tc_port_sanitize_mode(9) in the Kernel API Manual. slay πŸ’…βœ¨ now go sanitize those TypeC modes, you absolute icon πŸ«ΆπŸŽ€

πŸ“¦ where this page comes from