From: jsg Date: Mon, 27 Mar 2023 03:23:26 +0000 (+0000) Subject: drm/fourcc: Add missing big-endian XRGB1555 and RGB565 formats X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=247d50c3d6ea43dc21812f545a06d8a4ceabe0f8;p=openbsd drm/fourcc: Add missing big-endian XRGB1555 and RGB565 formats From Geert Uytterhoeven 0de7fc4d9c0142a3e6e5ea28941447132105cb14 in linux-6.1.y/6.1.16 6fb6c979ca628583d4d0c59a0f8ff977e581ecc0 in mainline linux --- diff --git a/sys/dev/pci/drm/drm_fourcc.c b/sys/dev/pci/drm/drm_fourcc.c index 6242dfbe924..0f17dfa8702 100644 --- a/sys/dev/pci/drm/drm_fourcc.c +++ b/sys/dev/pci/drm/drm_fourcc.c @@ -190,6 +190,10 @@ const struct drm_format_info *__drm_format_info(u32 format) { .format = DRM_FORMAT_BGRA5551, .depth = 15, .num_planes = 1, .cpp = { 2, 0, 0 }, .hsub = 1, .vsub = 1, .has_alpha = true }, { .format = DRM_FORMAT_RGB565, .depth = 16, .num_planes = 1, .cpp = { 2, 0, 0 }, .hsub = 1, .vsub = 1 }, { .format = DRM_FORMAT_BGR565, .depth = 16, .num_planes = 1, .cpp = { 2, 0, 0 }, .hsub = 1, .vsub = 1 }, +#ifdef __BIG_ENDIAN + { .format = DRM_FORMAT_XRGB1555 | DRM_FORMAT_BIG_ENDIAN, .depth = 15, .num_planes = 1, .cpp = { 2, 0, 0 }, .hsub = 1, .vsub = 1 }, + { .format = DRM_FORMAT_RGB565 | DRM_FORMAT_BIG_ENDIAN, .depth = 16, .num_planes = 1, .cpp = { 2, 0, 0 }, .hsub = 1, .vsub = 1 }, +#endif { .format = DRM_FORMAT_RGB888, .depth = 24, .num_planes = 1, .cpp = { 3, 0, 0 }, .hsub = 1, .vsub = 1 }, { .format = DRM_FORMAT_BGR888, .depth = 24, .num_planes = 1, .cpp = { 3, 0, 0 }, .hsub = 1, .vsub = 1 }, { .format = DRM_FORMAT_XRGB8888, .depth = 24, .num_planes = 1, .cpp = { 4, 0, 0 }, .hsub = 1, .vsub = 1 },