modetest: print modifiers in hex as well
authorChia-I Wu <olvaffe@gmail.com>
Fri, 18 Aug 2023 22:48:31 +0000 (15:48 -0700)
committerDmitry Baryshkov <dbaryshkov@gmail.com>
Wed, 13 Sep 2023 16:26:49 +0000 (16:26 +0000)
Print modifiers in hex in addtion to in strings returned by
drmGetFormatModifierName.  In some cases, hex numbers can be more easily
compared visually.

Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
tests/modetest/modetest.c

index a7f69a7..861a06e 100644 (file)
@@ -330,7 +330,7 @@ static void dump_in_formats(struct device *dev, uint32_t blob_id)
                        printf(": ");
                }
 
-               printf(" %s", modifier_to_string(iter.mod));
+               printf(" %s(0x%"PRIx64")", modifier_to_string(iter.mod), iter.mod);
        }
 
        printf("\n");