drm_mode_compare(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– drm_mode_compare(9) πŸ’–

okay so bestie, welcome to the kernel API manual β€” this one's drm_mode_compare, and yes it's a whole function that literally just vibes about which display mode is better πŸ”₯


✨ NAME ✨

drm_mode_compare β€” compare modes for favorability πŸŽ€


✨ SYNOPSIS ✨

int drm_mode_compare (void *priv , const struct list_head *lh_a , const
struct list_head *lh_b );

✨ ARGUMENTS ✨

  • priv β€” unused. yeah. it's just there. not doing anything. icon of showing up πŸ’€
  • lh_a β€” the list_head for the first mode πŸ…°οΈ
  • lh_b β€” the list_head for the second mode πŸ…±οΈ

✨ DESCRIPTION ✨

So the way this works: you hand it two modes, lh_a and lh_b, and it compares them, returning a value that tells you which one is better. that's it, that's the whole vibe check πŸ‘‘βœ¨


✨ RETURN ✨

  • Negative β€” if lh_a is better than lh_b πŸ₯‡
  • Zero β€” if they're equivalent, a whole tie, no notes 🫢
  • Positive β€” if lh_b is better than lh_a πŸ†

✨ SEE ALSO ✨

Kernel file: ./drivers/gpu/drm/drm_modes.c πŸ¦‹


that's the whole page bestie, go forth and compare modes responsibly πŸ’…βœ¨

shoutout to ./drivers/gpu/drm for being the home of this whole situation, and to October 2026 for the timestamp 🩷 mwah, ilysm, bye πŸ§šβ€β™€οΈπŸ’œ

πŸ“¦ where this page comes from