drm_dev_is_unplugged(9)
π drm_dev_is_unplugged(9) β like, the Kernel API Manual edition, bestie β¨
okay so real talk, this one lives in the Kernel API Manual and it's short but she's important, so pay attention π
πΈ NAME πΈ
drm_dev_is_unplugged β the vibe check for "is this DRM device unplugged or not" ππ
β¨ SYNOPSIS β¨
bool drm_dev_is_unplugged (struct drm_device *dev );
π ARGUMENTS π
devβ the DRM device in question, your main character π«Ά
π¦ DESCRIPTION π¦
So you can call this function when you wanna check whether a hotpluggable is unplugged, periodt. The unplugging itself gets signalled through drm_dev_unplug. And here's the sweet part β if a device is unplugged, these two functions guarantee that any store before calling drm_dev_unplug is visible to callers of this function after it completes. no cap, that's the whole promise π₯
WARNING: β οΈ This function fundamentally races againstdrm_dev_unplug. It is recommended that drivers instead use the underlyingdrm_dev_enteranddrm_dev_exitfunction pairs. Like... genuinely recommended. It's giving "please don't" ππ
π SEE ALSO π
- Kernel file
./include/drm/drm_drv.h enum drm_driver_feature(9)struct drm_driver(9)devm_drm_dev_alloc(9)drm_core_check_all_features(9)drm_core_check_feature(9)drm_drv_uses_atomic_modeset(9)
go read those too, iykyk π
and that's the page, bestie π§ this cutie came out of ./include/drm and it's stamped October 2026 β so like, future-versioned slay πβ
π¦ 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