drm_bus_flag...om_videomode(9)
π drm_bus_flags_from_videomode(9) β¨
okay so this is a page from the Kernel API Manual, bestie β yes, that Kernel API Manual β and we're about to get into some pixel-clock and DE-polarity extraction. stay with me, it's actually so good π«Ά
πΈ NAME πΈ
drm_bus_flags_from_videomode β extract information about pixelclk and DE polarity from videomode and store it in a separate variable
like, the whole gig is: grab the pixelclk + DE polarity tea out of a videomode and park it in its own lil variable. slay π
π¦ SYNOPSIS π¦
void drm_bus_flags_from_videomode (const struct videomode *vm , u32 *bus_flags );
π ARGUMENTS π
vmβ the videomode structure to use. this is the source of the vibes, we're reading from it πbus_flagsβ information about pixelclk, sync and DE polarity will be stored here. that's the destination, the little basket we drop everything into π§Ίβ¨
π₯ DESCRIPTION π₯
okay so here's what it actually does, no cap:
it sets DRM_BUS_FLAG_DE_(LOW|HIGH), DRM_BUS_FLAG_PIXDATA_DRIVE_(POS|NEG)EDGE and DISPLAY_FLAGS_SYNC_(POS|NEG)EDGE in bus_flags according to the DISPLAY_FLAGS found in vm.
that's it. that's the whole function. it reads the DISPLAY_FLAGS out of vm, and based on what it finds, it writes the matching DRM_BUS_FLAG_DE_*, DRM_BUS_FLAG_PIXDATA_DRIVE_* and DISPLAY_FLAGS_SYNC_* values into bus_flags. lowkey iconic that it's that tidy ππ
careful bestie β it's writing into bus_flags, so that pointer needs to be somewhere real to land. this is a store, not a vibe check π
π SEE ALSO π
the kernel file lives right here: ./drivers/gpu/drm/drm_modes.c β go say hi π
and here's the whole friend group, fr fr β every single one of them:
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)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_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)
and that's the page, bestie πβ¨ this lil gem comes from ./drivers/gpu/drm, dated October 2026 β so go forth, extract those flags, and remember: the vibe is immaculate, the facts are untouched ππ¦
π¦ 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