diff mbox series

[libdrm,v3,8/9] util: add pwetty support for big-endian RGB565

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

Commit Message

Geert Uytterhoeven Oct. 25, 2023, 7:23 a.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>
---
v3:
  - No changes,

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 aeac84a9b0dfed09..4d6e9e32ab0f4e93 100644
--- a/tests/util/pattern.c
+++ b/tests/util/pattern.c
@@ -1188,6 +1188,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);