drm_mode_config_cleanup(9)
π NAME π
drm_mode_config_cleanup β free up DRM mode_config info. Welcome to drm_mode_config_cleanup(9) from the Kernel API Manual, bestie β this is the cleanup era and weβre gonna understand it fr fr β¨
π¦ SYNOPSIS π¦
void drm_mode_config_cleanup (struct drm_device *dev );
πΈ ARGUMENTS πΈ
devβ the DRM device. Thatβs the main character of this whole teardown arc π
π DESCRIPTION π
Okay so picture this: drm_mode_config_cleanup frees up all the connectors and CRTCs associated with this DRM device, and then it frees up the framebuffers and associated buffer objects. Like, full cleanup, no crumbs left, periodt π§Ήβ¨
Note that since this should happen single-threaded at driver/device teardown time, no locking is required. Itβs the driverβs job to make sure that guarantee actually holds true. No cap β if that single-threaded promise isnβt real, thatβs a driver problem, not a βmaybe add a lockβ vibe π
FIXME: With the managed drmm_mode_config_init it is no longer necessary for drivers to explicitly call this function. So yeah, this is one of those βstill here, but managed init changed the gameβ situations π
π₯ SEE ALSO π₯
- Kernel file
./drivers/gpu/drm/drm_mode_config.c drm_mode_getresources(9)drm_mode_config_reset(9)drm_mode_config_create_initial_state(9)drmm_mode_config_init(9)
Signing off from ./drivers/gpu/drm, October 2026 β stay clean, stay single-threaded, and slay the teardown πππ«Ά
π¦ 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