diff mbox series

[libdrm,v2,09/10] util: Add pwetty support for big-endian RGB565

Message ID 7956f2485b6d6ea11860736417a2122cf2e2cd6e.1657302103.git.geert@linux-m68k.org (mailing list archive)
State New, archived
Headers show
Series Big-endian fixes | expand

Commit Message

Geert Uytterhoeven July 8, 2022, 6:21 p.m. UTC
Add support for rendering the crosshairs in a buffer using the
big-endian RGB565 format.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
---
v2:
  - New.
---
 tests/util/pattern.c | 1 +
 1 file changed, 1 insertion(+)
diff mbox series

Patch

diff --git a/tests/util/pattern.c b/tests/util/pattern.c
index 627f402be1d02e1c..1222b47ea3f14cd0 100644
--- a/tests/util/pattern.c
+++ b/tests/util/pattern.c
@@ -1178,6 +1178,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);