Commit Graph

3 Commits (1aa800d4644cd2ac8ab7683ffe8a1265108fcc7f)

Author SHA1 Message Date
Simon Ser 3bede5dbbc gen_table_fourcc: strip _MODIFIER suffix for INVALID
This is the only modifier printed with a "_MODIFIER" suffix. It
looks inconsistent when callers already print this word (e.g.
"modifier: INVALID_MODIFIER").

Signed-off-by: Simon Ser <contact@emersion.fr>
Reviewed-by: Marius Vlad <marius.vlad@collabora.com>
2022-06-08 14:02:48 +02:00
Dennis Tsiang bd26b61cff xf86drm: Update drmGetFormatModifierNameFromArm to handle AFRC
Update drmGetFormatModifierNameFromArm function to handle AFRC
modifiers.

Signed-off-by: Dennis Tsiang <dennis.tsiang@arm.com>
2021-10-04 10:18:41 +00:00
Marius Vlad 67e911977f xf86drm: Add a human readable representation for format modifiers
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 <contact@emersion.fr>).

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.

Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
2021-06-22 11:16:04 +00:00