util: add pwetty support for big-endian RGB565
authorGeert Uytterhoeven <geert@linux-m68k.org>
Thu, 7 Jul 2022 13:52:33 +0000 (15:52 +0200)
committerDmitry Baryshkov <dbaryshkov@gmail.com>
Tue, 31 Oct 2023 13:24:32 +0000 (13:24 +0000)
Add support for rendering the crosshairs in a buffer using the
big-endian RGB565 format.

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:
  - No changes,

v2:
  - New.

tests/util/pattern.c

index 34d9d3e4ddc698f4556e83ab863649725382a6e6..2ff9c033495ca3a23787e330d7196447a5431d2f 100644 (file)
@@ -1337,6 +1337,7 @@ static void make_pwetty(void *data, unsigned int width, unsigned int height,
                cairo_format = CAIRO_FORMAT_ARGB32;
                break;
        case DRM_FORMAT_RGB565:
+       case DRM_FORMAT_RGB565 | DRM_FORMAT_BIG_ENDIAN:
        case DRM_FORMAT_BGR565:
                cairo_format = CAIRO_FORMAT_RGB16_565;
                swap16 = fb_foreign_endian(format);