Generated by GPT-5-mini| libdrm | |
|---|---|
| Name | libdrm |
| Title | libdrm |
| Developers | Mesa Project, X.Org Foundation, Keith Packard |
| Initial release | 2007 |
| License | MIT License |
| Repository | freedesktop.org/git |
libdrm
libdrm is a user-space library that provides a thin abstraction layer for interacting with the Direct Rendering Manager interfaces of the Linux kernel and coordinating with components such as Mesa (computer graphics), the X.Org Foundation, and the Wayland (display server protocol). It is designed to facilitate communication between graphics drivers such as those from Intel Corporation, AMD, and NVIDIA Corporation and higher-level projects like GNOME, KDE, and Weston (compositor). libdrm enables hardware-accelerated rendering stacks including DRI and integrates with window systems such as X Window System and protocols like Wayland (display server protocol) to service compositors and toolkits including GTK, Qt (software), and SDL (software).
libdrm emerged to standardize user-space access to the kernel's Direct Rendering Manager APIs and to reduce duplication across projects such as Mesa (computer graphics), X.Org, and proprietary drivers from NVIDIA Corporation, Intel Corporation, and AMD. It sits between kernel interfaces exposed by Linux kernel subsystems and user-space consumers like Mesa 3D Graphics Library, X.Org Server, and Wayland compositors such as Weston (compositor). Major contributors and maintainers have included developers affiliated with Freedesktop.org, the Mesa Project, and individual engineers like Keith Packard and vendors including Intel Corporation and Red Hat. The library's evolution has been driven by coordination among projects including DRI, Gallium3D, and display server codebases such as X.Org Server and Wayland (display server protocol).
libdrm's architecture modularizes support for multiple drivers and kernel features using driver-specific modules and a common core that wraps ioctl interfaces from the Direct Rendering Manager. Components include generic helpers for buffer management and modesetting, driver backends for vendors like Intel Corporation, AMD, and NVIDIA Corporation, and utilities for managing GEM and TTM buffer objects used by Mesa 3D Graphics Library and compositors like Weston (compositor). It interacts with kernel facilities such as the IOMMU handling in conjunction with Linux kernel memory management and uses DRM modeset APIs that affect display engines implemented by vendors including Intel Corporation, AMD, and historically ATI Technologies. The codebase references subsystems and projects such as DRM (direct rendering manager), Kernel mode setting, and user-space consumers including X.Org Server, Wayland (display server protocol), and Mesa (computer graphics).
libdrm exposes C APIs for device discovery, mode setting, GEM buffer management, and ioctl wrappers tailored to drivers like the i915 driver from Intel Corporation and the amdgpu driver from AMD. Applications and libraries such as Mesa 3D Graphics Library, X.Org Server, Weston (compositor), GNOME, and KDE call libdrm functions to allocate buffers, synchronize GPU contexts, and commit display modes managed by the Direct Rendering Manager. Bindings and usage patterns are present in projects including DRI, Gallium3D, DRI2, and DRI3, and toolkits such as GTK and Qt (software) indirectly rely on these interfaces through compositors and drivers. Developers reference kernel documentation, patches in repositories like Freedesktop.org, and discussions among vendors including Intel Corporation, AMD, and NVIDIA Corporation to implement features such as atomic modesetting and cursor handling supported by libdrm.
Development of libdrm is coordinated via Freedesktop.org infrastructure and code review workflows shared with the Mesa Project, X.Org Foundation, and vendor repositories from Intel Corporation and AMD. Maintainers include contributors affiliated with organizations such as Red Hat, Intel Corporation, and independent developers linked to projects like Wayland (display server protocol) and X.Org Server. The project receives patches and issue reports through mailing lists and git repositories, and interfaces with kernel development maillists such as the Linux kernel DRM community and maintainers like those working on Direct Rendering Manager subsystems. Release cadence and API stability are influenced by coordination with Mesa 3D Graphics Library, compositor projects like Weston (compositor), and major distributions including Debian, Ubuntu, and Fedora that package libdrm for end users.
libdrm targets Linux kernel platforms and supports drivers maintained by vendors such as Intel Corporation (i915), AMD (amdgpu, radeon), and historically vendor-specific stacks from NVIDIA Corporation. It is used across distributions including Debian, Ubuntu, Fedora, and vendor-provided systems such as Red Hat Enterprise Linux. Support extends to embedded and SoC platforms from suppliers like ARM Holdings partners and to projects using Wayland (display server protocol) and X Window System across hardware families. Driver-specific modules within libdrm expose capability-specific ioctls, and compatibility with kernel versions is managed in coordination with the Linux kernel DRM maintainers and hardware vendors including Intel Corporation, AMD, and ecosystem integrators like Collabora.
libdrm is distributed under the MIT License, enabling broad reuse by ecosystem projects such as Mesa (computer graphics), X.Org Server, and proprietary drivers from vendors including NVIDIA Corporation and Intel Corporation. Security considerations involve careful mediation of ioctl calls to the Direct Rendering Manager and coordination with the Linux kernel security model, including interactions with SELinux policies used by distributions like Red Hat Enterprise Linux and Fedora. Vulnerability disclosures and fixes are coordinated across stakeholders including Freedesktop.org contributors, distribution maintainers such as those at Debian and Ubuntu, and vendor security teams from Intel Corporation and AMD to ensure that buffer management and modesetting do not expose escalation paths in user-space consumers like X.Org Server and Wayland (display server protocol) implementations.
Category:Graphics libraries