From e761875fc5d29080316029b7c174797751d82a97 Mon Sep 17 00:00:00 2001 From: Simon Ser Date: Sun, 21 Aug 2022 14:18:28 +0200 Subject: tests/modetest: use drmGetFormatName() Signed-off-by: Simon Ser Reviewed-by: Marius Vlad Reviewed-by: Eric Engestrom --- tests/modetest/modetest.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'tests') 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) -- cgit v1.2.1