drm_mode_prune_invalid(9)
π drm_mode_prune_invalid(9) β like, the Kernel API Manual page you actually wanna read
okay so bestie, welcome to drm_mode_prune_invalid(9), straight out of the Kernel API Manual β¨ this one is short and sweet and honestly kinda iconic β it's the cleanup crew of the DRM mode world π§Ή
πΈ NAME πΈ
drm_mode_prune_invalid β remove invalid modes from mode list, no cap ποΈπ
β¨ SYNOPSIS β¨
void drm_mode_prune_invalid (struct drm_device *dev , struct list_head
*mode_list , bool verbose );
like yes, that's the whole signature, she's compact π
π«Ά ARGUMENTS π«Ά
devβ the DRM device, your main character πmode_listβ the list of modes you want checked, aka the friend group you're about to vibe check πverboseβ be verbose about it, i.e. say the quiet part out loud π£οΈβ¨
π₯ DESCRIPTION π₯
okay so here's the tea β β this helper function is what you call to prune a display mode list after validation has been completed. Like, the validation part already happened, this is the after-party where you decide who stays π
All modes whose status is not MODE_OK get removed from the list. periodt. π«β¨
And if verbose is set, the status code and the mode name are also printed to dmesg β so you get receipts in the logs, iykyk ππ
ngl this is genuinely useful: it's the "okay everyone who didn't pass the vibe check, out you go" step π
π SEE ALSO π
Kernel file ./drivers/gpu/drm/drm_modes.c π¦
and the whole extended friend group, in the order the manpage says hi to 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), 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_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)
like, that's every single one, I did not skip a single bestie fr fr ππ
and that's the page!! π source/version business for the sign-off: this lil beauty lives under ./drivers/gpu/drm and the date on it is October 2026 β go off, calendar π
π slay, and happy pruning bestie π
ππ¦
π¦ 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