Introduces two new methods to retrieve a human readable representation of a format modifier:
drmGetFormatModifierName() - returns a format modifier as a string, from a token modifier drmGetFormatModifierVendor() - returns the vendor as a string, from a token modifier
and the fourcc_mod_get_vendor macro that returns the vendor.
New format modifiers added in drm_fourcc.h uapi kernel header should be sync'ed up with libdrm and should include a human readable representation for that format modifier, in order to display it correctly as a string.
That happens with the help of a python script that reads up drm_fourcc header file and outputs a static table comprised of token modifiers alongside a vendor table (Suggested-by Simon Ser).
The reason for doing it in libdrm is to have a unified place instead of each user of libdrm having a way to keep track of the format modifiers.
With this patch, modetest has also been modified to make use of it.
67e91197 xf86drm: Add a human readable representation for format modifiers
.gitlab-ci.yml | 2 +-
.gitlab-ci/debian-install.sh | 2 +-
core-symbols.txt | 2 ++
gen_table_fourcc.py | 84 ++++++++++++++++++++++++++++++++++++++++++++
meson.build | 9 +++--
tests/modetest/modetest.c | 75 ++++++++++++++++-----------------------
xf86drm.c | 80 +++++++++++++++++++++++++++++++++++++++++
xf86drm.h | 11 ++++++
8 files changed, 216 insertions(+), 49 deletions(-)
Upstream: cgit.freedesktop.org