intel_tc_port_sanitize_mode(9)
π 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 todig_port. the CRTC is the main character here,dig_portis 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 π
- Kernel file
./drivers/gpu/drm/i915/display/intel_tc.cβ go read the source, iykyk π intel_tc_port_init_mode(9)β her sister function β¨intel_tc_port_flush_work(9)β and her other sister π
β 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
- 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