drm_mode_get_hv_timing(9)
π drm_mode_get_hv_timing π
okay bestie, so this is a page from the Kernel API Manual β it's drm_mode_get_hv_timing(9), and it's lowkey one of the most straightforward little helpers in the DRM mode family. it just fetches the hdisplay/vdisplay for a given mode. that's it. that's the whole vibe. π
β¨ NAME β¨
drm_mode_get_hv_timing β fetches hdisplay/vdisplay for given mode
πΈ SYNOPSIS πΈ
void drm_mode_get_hv_timing (const struct drm_display_mode *mode , int
*hdisplay , int *vdisplay );
so yeah, it returns void (nothing comes back to you, it fills in your pointers), takes a const struct drm_display_mode * and two int * out-params. periodt. π
π¦ ARGUMENTS π¦
modeβ mode to query πhdisplayβ hdisplay value to fill in βοΈvdisplayβ vdisplay value to fill in βοΈ
π DESCRIPTION π
okay so here's the one thing you actually gotta know, and it's giving plot twist: the vdisplay value will be doubled if the specified mode is a stereo mode of the appropriate layout. π like, not every stereo mode, only the ones with the appropriate layout β fr fr, that's the condition, don't @ me.
so hdisplay just gets filled in like normal, but vdisplay might come back twice as tall depending on that stereo situation. main character behavior honestly. π₯
π SEE ALSO π
the kernel file lives at ./drivers/gpu/drm/drm_modes.c β that's the home base, iykyk π
and here's the whole friend group, no cap, all of them, not skipping a single one:
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_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_compare(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)
ππ«Άβ¨
ngl the "appropriate layout" bit is doing a lot of heavy lifting in that description β it's the exact wording from the page, so keep it in mind and don't go assuming it doubles for every stereo mode. k? ty bestie π
and that's the page!! mwah π this was drm_mode_get_hv_timing(9) from the Kernel API Manual, source ./drivers/gpu/drm, dated October 2026 β iconic, no notes, go query some modes you absolute legend ππΈ
π¦ 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