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