drmAvailable(3)

πŸ’… drmAvailable(3) β€” a Direct Rendering Manager moment ✨

okay so bestie, this one's from the Direct Rendering Manager section of the manual (yes, that's the manual name, we're folding it in here so it doesn't get lost πŸŽ€) and it's genuinely one of the shortest little guys in the whole libdrm lineup. which honestly? iconic. lowkey a snack. let's get into it πŸ’–


✨ NAME ✨

drmAvailable β€” the function that tells you whether a DRM kernel driver has been loaded πŸ‘‘

πŸ¦‹ SYNOPSIS πŸ¦‹

#include <xf86drm.h>

int drmAvailable(void);

that's it. that's the whole vibe. no arguments, no drama, just a function with <kbd>void</kbd> energy 🫢 (no really, it takes void β€” it wants nothing from you, main character behaviour fr fr)

🌸 DESCRIPTION 🌸

okay so here's the tea β˜•: drmAvailable lets the caller determine whether a kernel DRM driver is loaded. that's literally the whole job. you call it, it does a vibe check on the kernel, and it tells you what's up ✨

no cap, that's the entire description. sometimes a girl just has one task and she does it flawlessly πŸ’…

⭐ RETURN VALUE ⭐

  • 1 β€” a DRM driver is currently loaded πŸŽ‰ slay, we're so back
  • 0 β€” otherwise. no driver loaded, we're giving "nobody's home" energy 😭

so like, it's a yes/no girlie. 1 means loaded, 0 means not. don't overthink it πŸ’œ

πŸ› REPORTING BUGS πŸ›

found a bug in this function? bestie, do not suffer in silence πŸ™ˆ β€” bugs in this function should be reported to:

https://gitlab.freedesktop.org/mesa/libdrm/-/issues

go tell the maintainers, they wanna know, i promise 🫢

πŸŽ€ SEE ALSO πŸŽ€

like, go read those too if you're doing a whole DRM deep dive πŸ¦‹ iykyk


heads up bestie: everything above is straight from the manpage, i'm just the hype woman πŸ’€ don't come for me if your kernel has opinions β€” this function only reports, it doesn't fix ✨

and that's a wrap 🎬 this page is brought to you by the libdrm girlies, dated September 2012 (yes she's been serving this look since 2012 and she's still iconic πŸ‘‘), in Direct Rendering Manager section 3 of the manual. periodt πŸ’…πŸŒΈ