From 5d97031e8aa717c83993fcdaa45b0812ddceb3b0 Mon Sep 17 00:00:00 2001 From: Marius Vlad Date: Thu, 11 Feb 2021 13:08:05 +0200 Subject: [PATCH] README.rst: Include some notes about syncing uapi headers Signed-off-by: Marius Vlad --- README.rst | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/README.rst b/README.rst index da995d0b..74608031 100644 --- a/README.rst +++ b/README.rst @@ -13,6 +13,24 @@ 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 ---------