drm_mode_copy(9)
π
drm_mode_copy β like, the drm_mode_copy(9) page, bestie β¨
okay so this is straight out of the Kernel API Manual, and it's genuinely one of the shortest little icons in the whole DRM family. no cap, it's a two-line function and she still ate. π
πΈ NAME πΈ
drm_mode_copy β copy the mode. that's it. that's the whole vibe. π¦
β¨ SYNOPSIS β¨
void drm_mode_copy (struct drm_display_mode *dst , const struct
drm_display_mode *src );
so yeah, she takes two pointers to struct drm_display_mode and returns void. no drama, no return value, she just does the thing. π
π«Ά ARGUMENTS π«Ά
dstβ the mode you're overwriting. she's the main character getting a whole new look, bestie. makeover time. πsrcβ the mode you're copying from. the blueprint. the inspo. the source material. π
π§ DESCRIPTION π§
okay so the actual tea: drm_mode_copy copies an existing mode into another mode. that's the whole job. lowkey iconic in its simplicity. β
but β and this is the part you cannot skip, fr fr β it does it while preserving the list head of the destination mode. like, the dst mode's list head stays exactly where it is. do not touch. she's anchored. π
so it's not just a blind memcpy of the whole struct β the list head of dst is preserved. remember that, iykyk. π
π SEE ALSO π
the source file lives here, in the kernel tree:
Kernel file ./drivers/gpu/drm/drm_modes.c
and here's the whole friend group, no one left out π:
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_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 whole page, bestie πβ¨ go forth and copy modes responsibly π
this one's brought to you by ./drivers/gpu/drm, dated October 2026 β mwah, catch you on the next man page π«Άπ
π¦ 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