drm_mode_compare(9)
π 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β thelist_headfor the first mode π °οΈlh_bβ thelist_headfor 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_ais better thanlh_bπ₯ - Zero β if they're equivalent, a whole tie, no notes π«Ά
- Positive β if
lh_bis better thanlh_aπ
β¨ SEE ALSO β¨
Kernel file: ./drivers/gpu/drm/drm_modes.c π¦
drm_mode_debug_printmodeline(9)drm_mode_create(9)drm_mode_destroy(9)drm_mode_probed_add(9)drm_analog_tv_mode(9)drm_cvt_mode(9)drm_gtf_mode_complex(9)drm_gtf_mode(9)drm_display_mode_from_videomode(9)drm_display_mode_to_videomode(9)drm_bus_flags_from_videomode(9)of_get_drm_display_mode(9)of_get_drm_panel_display_mode(9)drm_mode_set_name(9)drm_mode_vrefresh(9)drm_mode_get_hv_timing(9)drm_mode_set_crtcinfo(9)drm_mode_copy(9)drm_mode_init(9)drm_mode_duplicate(9)drm_mode_match(9)drm_mode_equal(9)drm_mode_equal_no_clocks(9)drm_mode_equal_no_clocks_no_stereo(9)drm_mode_validate_driver(9)drm_mode_validate_size(9)drm_mode_validate_ycbcr420(9)drm_mode_prune_invalid(9)drm_mode_sort(9)drm_connector_list_update(9)drm_mode_parse_command_line_for_connector(9)drm_mode_create_from_cmdline_mode(9)drm_mode_convert_to_umode(9)drm_mode_convert_umode(9)drm_mode_is_420_only(9)drm_mode_is_420_also(9)drm_mode_is_420(9)drm_set_preferred_mode(9)
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
- 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