drm_mode_config_cleanup(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– 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 πŸ”₯


Signing off from ./drivers/gpu/drm, October 2026 β€” stay clean, stay single-threaded, and slay the teardown πŸ’–πŸŽ€πŸ«Ά

πŸ“¦ where this page comes from