drm_get_pan...tation_quirk(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… NAME πŸ’…

drm_get_panel_orientation_quirk β€” bestie, this is the vibe check for panel orientation quirks ✨

So this is a page from the Kernel API Manual (yes, the kernel has lore, and this is part of it πŸ‘‘), and it's all about one little function that goes looking for panel orientation quirks. Let's get into it 🫢


✨ SYNOPSIS ✨

int drm_get_panel_orientation_quirk (int width , int height );

That's literally it, no cap. Two ints in, one int out πŸ’…


πŸŽ€ ARGUMENTS πŸŽ€

  • width β€” the width in pixels of the panel 🌸
  • height β€” the height in pixels of the panel πŸ¦‹

Two numbers, that's all she needs πŸ’–


🧚 DESCRIPTION 🧚

Okay so here's the tea β˜•: this function checks for platform specific quirks β€” like, DMI based ones β€” that hand over info about panel_orientation for systems where you literally cannot probe that from the hard-/firm-ware 😭 The hardware is not giving, so the quirk table has to step in and save the day 🫢

And the way it avoids false-positives? Iconic behavior honestly: the function takes the panel resolution as an argument and checks that against the resolution expected by the quirk-table entry πŸ‘‘ So like, it's not just guessing β€” it's matching you against the exact resolution the quirk table is expecting ✨

Not me also flagging this: this function is also used outside of the drm-subsys β€” by for example the efifb code πŸ”₯ Because of this, this function gets compiled into its own kernel-module when built as a module πŸ’€ (yes, she has main character energy, she gets her own module)

πŸ¦‹ RETURN πŸ¦‹

It returns a DRM_MODE_PANEL_ORIENTATION_* value if there's a quirk for this system πŸ’–

Or DRM_MODE_PANEL_ORIENTATION_UNKNOWN if there's no quirk πŸ™ˆ

Simple as that, periodt ⭐


πŸ’œ SEE ALSO πŸ’œ

  • Kernel file ./drivers/gpu/drm/drm_panel_orientation_quirks.c πŸ“

That's where the quirk table actually lives, iykyk 🌈


Sign-off time πŸŽ€ this page lives in ./drivers/gpu/drm and it's dated October 2026 ⭐ Go check out all the quirks bestie, they're lowkey iconic πŸ’…βœ¨

πŸ“¦ where this page comes from