[Letux-kernel] [RFC 20/28] drm/fourcc: add legacy conversion from bpp=32 to depth=16

H. Nikolaus Schaller hns at goldelico.com
Sat Jan 23 17:28:46 CET 2021


This is needed for some SoC, e.g. the jz4730

Signed-off-by: H. Nikolaus Schaller <hns at goldelico.com>
---
 drivers/gpu/drm/drm_fourcc.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/gpu/drm/drm_fourcc.c b/drivers/gpu/drm/drm_fourcc.c
index 03262472059ca..f82a538499c7d 100644
--- a/drivers/gpu/drm/drm_fourcc.c
+++ b/drivers/gpu/drm/drm_fourcc.c
@@ -73,6 +73,9 @@ uint32_t drm_mode_legacy_fb_format(uint32_t bpp, uint32_t depth)
 
 	case 32:
 		switch (depth) {
+		case 16:
+			fmt = DRM_FORMAT_RGB565;
+			break;
 		case 24:
 			fmt = DRM_FORMAT_XRGB8888;
 			break;
-- 
2.26.2



More information about the Letux-kernel mailing list