drm_dev_is_unplugged(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ‘‘ 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 against drm_dev_unplug. It is recommended that drivers instead use the underlying drm_dev_enter and drm_dev_exit function pairs. Like... genuinely recommended. It's giving "please don't" πŸ˜­πŸ™ˆ

🌈 SEE ALSO 🌈

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