drm_crtc_cleanup(9)
π drm_crtc_cleanup(9) β the Kernel API Manual page you actually wanna read
okay so this is drm_crtc_cleanup(9) from the Kernel API Manual, and bestie, it's a short one but it's important, so let's get into it π
β¨ NAME β¨
drm_crtc_cleanup β clean up the core crtc usage. that's it. that's the whole vibe. it's the "okay we're done here, pack it up" function π§Ή
β¨ SYNOPSIS β¨
void drm_crtc_cleanup (struct drm_crtc *crtc );
one function, one argument, zero return value. simple. iconic. no notes π
β¨ ARGUMENTS β¨
crtcβ the CRTC you wanna cleanup, bestie. that's the one. hand it over and let the function do its thing π«Ά
β¨ DESCRIPTION β¨
so here's the tea β β this function cleans up crtc and removes it from the DRM mode setting core. like, it takes your CRTC out of the group chat. it's no longer part of the mode setting core's business. periodt.
but β and this is the part people always get wrong, so listen up π₯ β the function does not free the crtc structure itself. the asterisks around not in the original are doing so much work rn. that memory is your problem, bestie. freeing the struct is the responsibility of the caller. so if you call drm_crtc_cleanup and then assume the struct is gone?? no ma'am. that's a leak and it's giving π.
lowkey the whole function is "i broke up with the DRM mode setting core for you, but you still gotta deal with the apartment lease (the struct) yourself" π
β¨ SEE ALSO β¨
all the friends and neighbors, fr fr π
- the Kernel file
./drivers/gpu/drm/drm_crtc.coverview(9) drm_crtc_from_index(9)- standard CRTC properties(9)
drm_crtc_init_with_planes(9)drmm_crtc_init_with_planes(9)drm_mode_getcrtc(9)drm_mode_set_config_internal(9)drm_crtc_check_viewport(9)drm_mode_setcrtc(9)drm_crtc_create_scaling_filter_property(9)drm_crtc_in_clone_mode(9)
okay that's the page!! go forth and clean up your CRTCs responsibly, and remember: cleanup β free, and that's the whole lesson π¦π
source is./drivers/gpu/drm, dated October 2026, and this little number lives atdrm_crtc_cleanup(9)β mwah, bye 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