drm_mode_match(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… drm_mode_match(9) β€” the tea on mode matching

okay bestie, welcome to the Kernel API Manual entry for drm_mode_match πŸŽ€ this one lives in the DRM (direct rendering manager) corner of the kernel, and it's literally just the "are these two modes the same, or like... same-ish?" check. no cap.


✨ SYNOPSIS ✨

bool drm_mode_match (const struct drm_display_mode *mode1 , const struct
       drm_display_mode *mode2 , unsigned int match_flags );

it hands you back a bool, takes two const struct drm_display_mode * pointers (mode1 and mode2), plus a unsigned int match_flags that tells it how equal you want them to be. cute, right? πŸ¦‹


🌸 ARGUMENTS 🌸

  • mode1 β€” the first mode, aka contestant number one πŸ’–
  • mode2 β€” the second mode, contestant number two 🫢
  • match_flags β€” the vibe check instructions, like which parts need to match (the DRM_MODE_MATCH_* family of flags) πŸ‘‘

πŸ’œ DESCRIPTION πŸ’œ

so the whole gig is: check to see if mode1 and mode2 are equivalent. that's it. that's the function. it's giving "are you the same person or just twins" energy ✨


⭐ RETURN ⭐

True if the modes are (partially) equal, false otherwise. slay πŸ’… β€” partial equality is allowed because of those match_flags, iykyk.


πŸ”₯ SEE ALSO πŸ”₯

the kernel file that holds all this magic:

  • ./drivers/gpu/drm/drm_modes.c

and the whole friend group of related calls (no gatekeeping here, bestie, we list all of them 🫢):


🧚 a lil sign-off 🧚

this iconic page comes to you from ./drivers/gpu/drm, dated October 2026, and yeah β€” it's drm_mode_match(9), the manual page herself. periodt. πŸŒˆπŸ’–

πŸ“¦ where this page comes from