drm_mode_create(9)
π drm_mode_create(9) β like, the Kernel API Manual page, bestie π
okay so welcome to the drm_mode_create(9) glow-up β¨ this is straight out of the Kernel API Manual and it's literally your cheat sheet for making a brand-new display mode. no cap, it's short, it's sweet, and it slays π
πΈ NAME πΈ
drm_mode_create β create a new display mode π₯οΈβ¨
π¦ SYNOPSIS π¦
struct drm_display_mode * drm_mode_create (struct drm_device *dev );
π ARGUMENTS π
devβ the DRM device, aka the whole reason we're here π«Ά
π DESCRIPTION π
okay so here's the vibe: this function creates a new, cleared drm_display_mode using kzalloc, allocates an ID for it, and hands it right back to you πβ¨
that's it. that's the whole function. iconic behaviour, honestly π
β RETURN β
- Pointer to the new mode on success π
NULLon error π
π§ SEE ALSO π§
Kernel file ./drivers/gpu/drm/drm_modes.c β go read the source, iykyk π
and like, the whole friend group of mode-related functions, fr fr:
drm_mode_debug_printmodeline(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_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 π«Ά this one lives over in ./drivers/gpu/drm and it's dated October 2026 β the Kernel API Manual said so, so it's canon π mwah, go create some modes π
β¨
π¦ 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