modetest: add support for parsing big-endian formats
authorGeert Uytterhoeven <geert@linux-m68k.org>
Sun, 3 Jul 2022 12:35:49 +0000 (14:35 +0200)
committerDmitry Baryshkov <dbaryshkov@gmail.com>
Tue, 31 Oct 2023 13:24:32 +0000 (13:24 +0000)
commitbc37db5c669f850dc785acd723fdd79cdb7c597b
treeb6750a4c73c6237e5cd3cfef21decf9cf0e47c94
parent9d7024218f80c15465314eb9a07ffcffe5beae50
modetest: add support for parsing big-endian formats

When specifying a frame buffer format like "RG16_BE" (big-endian RG16),
modetest still uses the little-endian variant, as the format string is
truncated to four characters.

Fix this by increasing the format string size to 8 bytes (7 characters +
NUL terminator).

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
---
v5:
  - Add Reviewed-by,

v4:
  - No changes,

v3:
  - Update for suffix change from "be" to "_BE", cfr. commit
    ffb9375a505700ad ("xf86drm: handle DRM_FORMAT_BIG_ENDIAN in
    drmGetFormatName()"),
  - Replace hardcoded numbers in code by sizeof(),

v2:
  - New.
tests/modetest/modetest.c