summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Ser <contact@emersion.fr>2022-08-21 14:18:28 +0200
committerSimon Ser <contact@emersion.fr>2022-08-31 06:40:49 +0000
commite761875fc5d29080316029b7c174797751d82a97 (patch)
tree991394b7b39dfa8b071014dcbbe7fe0cbbf645de
parentbaa4b8cafca0d52189bfd6e7cda9c558a261ae71 (diff)
tests/modetest: use drmGetFormatName()
Signed-off-by: Simon Ser <contact@emersion.fr> Reviewed-by: Marius Vlad <marius.vlad@collabora.com> Reviewed-by: Eric Engestrom <eric@igalia.com>
-rw-r--r--tests/modetest/modetest.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/tests/modetest/modetest.c b/tests/modetest/modetest.c
index 8ff6c80d..42e2d1f4 100644
--- a/tests/modetest/modetest.c
+++ b/tests/modetest/modetest.c
@@ -187,11 +187,9 @@ static bit_name_fn(mode_flag)
static void dump_fourcc(uint32_t fourcc)
{
- printf(" %c%c%c%c",
- fourcc,
- fourcc >> 8,
- fourcc >> 16,
- fourcc >> 24);
+ char *name = drmGetFormatName(fourcc);
+ printf(" %s", name);
+ free(name);
}
static void dump_encoders(struct device *dev)