xenocara/lib/libdrm
purplerain 921461fcd8
sync with OpenBSD -current
2024-01-31 02:14:33 +00:00
..
amdgpu sync with OpenBSD -current 2024-01-31 02:14:33 +00:00
android sync code with last improvements from OpenBSD 2023-08-28 05:57:34 +00:00
data sync with OpenBSD -current 2024-01-31 02:14:33 +00:00
etnaviv sync with OpenBSD -current 2024-01-31 02:14:33 +00:00
exynos sync with OpenBSD -current 2024-01-31 02:14:33 +00:00
freedreno sync with OpenBSD -current 2024-01-31 02:14:33 +00:00
generated sync with OpenBSD -current 2024-01-31 02:14:33 +00:00
include/drm sync with OpenBSD -current 2024-01-31 02:14:33 +00:00
intel sync with OpenBSD -current 2024-01-31 02:14:33 +00:00
man sync code with last improvements from OpenBSD 2023-08-28 05:57:34 +00:00
mk sync with OpenBSD -current 2024-01-31 02:14:33 +00:00
nouveau sync with OpenBSD -current 2024-01-31 02:14:33 +00:00
omap sync with OpenBSD -current 2024-01-31 02:14:33 +00:00
radeon sync with OpenBSD -current 2024-01-31 02:14:33 +00:00
tegra sync with OpenBSD -current 2024-01-31 02:14:33 +00:00
tests sync with OpenBSD -current 2024-01-31 02:14:33 +00:00
vc4 sync code with last improvements from OpenBSD 2023-08-28 05:57:34 +00:00
.editorconfig sync code with last improvements from OpenBSD 2023-08-28 05:57:34 +00:00
.gitignore sync code with last improvements from OpenBSD 2023-08-28 05:57:34 +00:00
Android.common.mk sync code with last improvements from OpenBSD 2023-08-28 05:57:34 +00:00
Android.mk sync code with last improvements from OpenBSD 2023-08-28 05:57:34 +00:00
CONTRIBUTING.rst sync code with last improvements from OpenBSD 2023-08-28 05:57:34 +00:00
CleanSpec.mk sync code with last improvements from OpenBSD 2023-08-28 05:57:34 +00:00
Makefile sync code with last improvements from OpenBSD 2023-08-28 05:57:34 +00:00
Makefile.sources sync code with last improvements from OpenBSD 2023-08-28 05:57:34 +00:00
README.rst sync code with last improvements from OpenBSD 2023-08-28 05:57:34 +00:00
RELEASING sync code with last improvements from OpenBSD 2023-08-28 05:57:34 +00:00
core-symbols.txt sync with OpenBSD -current 2024-01-31 02:14:33 +00:00
gen_table_fourcc.py sync code with last improvements from OpenBSD 2023-08-28 05:57:34 +00:00
libdrm.pc.in sync code with last improvements from OpenBSD 2023-08-28 05:57:34 +00:00
libdrm_lists.h sync code with last improvements from OpenBSD 2023-08-28 05:57:34 +00:00
libdrm_macros.h sync code with last improvements from OpenBSD 2023-08-28 05:57:34 +00:00
libsync.h sync code with last improvements from OpenBSD 2023-08-28 05:57:34 +00:00
meson.build sync with OpenBSD -current 2024-01-31 02:14:33 +00:00
meson_options.txt sync code with last improvements from OpenBSD 2023-08-28 05:57:34 +00:00
symbols-check.py sync code with last improvements from OpenBSD 2023-08-28 05:57:34 +00:00
util_double_list.h sync code with last improvements from OpenBSD 2023-08-28 05:57:34 +00:00
util_math.h sync code with last improvements from OpenBSD 2023-08-28 05:57:34 +00:00
xf86atomic.h sync code with last improvements from OpenBSD 2023-08-28 05:57:34 +00:00
xf86drm.c sync with OpenBSD -current 2024-01-31 02:14:33 +00:00
xf86drm.h sync with OpenBSD -current 2024-01-31 02:14:33 +00:00
xf86drmHash.c sync code with last improvements from OpenBSD 2023-08-28 05:57:34 +00:00
xf86drmHash.h sync code with last improvements from OpenBSD 2023-08-28 05:57:34 +00:00
xf86drmMode.c sync with OpenBSD -current 2024-01-31 02:14:33 +00:00
xf86drmMode.h sync with OpenBSD -current 2024-01-31 02:14:33 +00:00
xf86drmRandom.c sync code with last improvements from OpenBSD 2023-08-28 05:57:34 +00:00
xf86drmRandom.h sync code with last improvements from OpenBSD 2023-08-28 05:57:34 +00:00
xf86drmSL.c sync code with last improvements from OpenBSD 2023-08-28 05:57:34 +00:00

README.rst

libdrm - userspace library for drm
----------------------------------

This is libdrm, a userspace library for accessing the DRM, direct rendering
manager, on Linux, BSD and other operating systems that support the ioctl
interface.
The library provides wrapper functions for the ioctls to avoid exposing the
kernel interface directly, and for chipsets with drm memory manager, support
for tracking relocations and buffers.
New functionality in the kernel DRM drivers typically requires a new libdrm,
but a new libdrm will always work with an older kernel.

libdrm is a low-level library, typically used by graphics drivers such as
the Mesa drivers, the X drivers, libva and similar projects.

Syncing with the Linux kernel headers
-------------------------------------

The library should be regularly updated to match the recent changes in the
`include/uapi/drm/`.

libdrm maintains a human-readable version for the token format modifier, with
the simpler ones being extracted automatically from `drm_fourcc.h` header file
with the help of a python script.  This might not always possible, as some of
the vendors require decoding/extracting them programmatically.  For that
reason one can enhance the current vendor functions to include/provide the
newly added token formats, or, in case there's no such decoding
function, to add one that performs the tasks of extracting them.

For simpler format modifier tokens there's a script (gen_table_fourcc.py) that
creates a static table, by going over `drm_fourcc.h` header file. The script
could be further modified if it can't handle new (simpler) token format
modifiers instead of the generated static table.

Compiling
---------

To set up meson:

    meson builddir/

By default this will install into /usr/local, you can change your prefix
with --prefix=/usr (or `meson configure builddir/ -Dprefix=/usr` after 
the initial meson setup).

Then use ninja to build and install:

    ninja -C builddir/ install

If you are installing into a system location you will need to run install
separately, and as root.