drm_display...om_videomode(9)
π NAME π
drm_display_mode_from_videomode β fill in @dmode using @vm,
okay so real talk, this is the drm_display_mode_from_videomode(9) page from the Kernel API Manual β and yes the header up top squishes it into drm_display...om_videomode(9) because terminals are dramatic and love to truncate π
anyway. It's a tiny little function, lowkey one of the shortest glow-ups in the whole DRM directory, and it just fills in @dmode using @vm, (the trailing comma is canon, don't @ me).
β¨ SYNOPSIS β¨
void drm_display_mode_from_videomode (const struct videomode *vm ,
struct drm_display_mode *dmode );
literally that's it. one function, two pointers, zero drama (and it returns void, so don't go looking for a return value bestie, there isn't one π«Ά).
π ARGUMENTS π
vmβ the source, bestie. this is thevideomodestructure you're reading from. it'sconst, so hands off, no touching, no cap π.dmodeβ the destination, main character energy. this is thedrm_display_modestructure you're writing into, and by the end of it she's fully filled in π.
π¦ DESCRIPTION π¦
Fills out dmode using the display mode specified in vm.
that's the whole bit. source in, destination out, everything the display mode needs gets copied over. it's giving tiny-but-essential, a little conversion liaison between the videomode world and the drm_display_mode world πΈ. no flags, no modes, no hidden behaviour β just vibes and a struct copy. slay.
heads up: it's void, so if something goes wrong you won't get told. there's no error return to check here, so don't go waiting on one π.
π SEE ALSO π
the kernel file herself lives at ./drivers/gpu/drm/drm_modes.c β that's the home base π . and here's the whole friend group, in the exact order they showed up:
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_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_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 yeah, drm_display_mode_to_videomode(9) is right there in the list β she's the reverse-direction bestie of the function you're literally reading about. iconic symmetry π₯)
okay that's the whole page, no crumbs left π. this came out of the Kernel API Manual, sourced from ./drivers/gpu/drm, dated October 2026 β and the page title at the very bottom is drm_display...om_videomode(9) all over again, still truncated, still cute. go fill in some dmodes, you've got this π§π
π¦ 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