lib: sync i915_pciids.h with kernel
[platform/upstream/libdrm.git] / README.rst
1 libdrm - userspace library for drm
2 ----------------------------------
3
4 This is libdrm, a userspace library for accessing the DRM, direct rendering
5 manager, on Linux, BSD and other operating systems that support the ioctl
6 interface.
7 The library provides wrapper functions for the ioctls to avoid exposing the
8 kernel interface directly, and for chipsets with drm memory manager, support
9 for tracking relocations and buffers.
10 New functionality in the kernel DRM drivers typically requires a new libdrm,
11 but a new libdrm will always work with an older kernel.
12
13 libdrm is a low-level library, typically used by graphics drivers such as
14 the Mesa drivers, the X drivers, libva and similar projects.
15
16 Syncing with the Linux kernel headers
17 -------------------------------------
18
19 The library should be regularly updated to match the recent changes in the
20 `include/uapi/drm/`.
21
22 libdrm maintains a human-readable version for the token format modifier, with
23 the simpler ones being extracted automatically from `drm_fourcc.h` header file
24 with the help of a python script.  This might not always possible, as some of
25 the vendors require decoding/extracting them programmatically.  For that
26 reason one can enhance the current vendor functions to include/provide the
27 newly added token formats, or, in case there's no such decoding
28 function, to add one that performs the tasks of extracting them.
29
30 For simpler format modifier tokens there's a script (gen_table_fourcc.py) that
31 creates a static table, by going over `drm_fourcc.h` header file. The script
32 could be further modified if it can't handle new (simpler) token format
33 modifiers instead of the generated static table.
34
35 Compiling
36 ---------
37
38 To set up meson:
39
40     meson builddir/
41
42 By default this will install into /usr/local, you can change your prefix
43 with --prefix=/usr (or `meson configure builddir/ -Dprefix=/usr` after 
44 the initial meson setup).
45
46 Then use ninja to build and install:
47
48     ninja -C builddir/ install
49
50 If you are installing into a system location you will need to run install
51 separately, and as root.