[igt-dev] [PATCH v8 03/16] fb: Add RGB888 format

Maxime Ripard maxime.ripard at bootlin.com
Thu Oct 4 12:38:56 UTC 2018


The RGB888 format is the one used as the shadow buffer used when a cairo
surface is requested for a format that Cairo cannot handle.

Since we're going to move that buffer representation to a struct igt_fb,
let's add the RGB888 format to the list of formats that igt_fb knows about.

Signed-off-by: Maxime Ripard <maxime.ripard at bootlin.com>
---
 lib/igt_fb.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/lib/igt_fb.c b/lib/igt_fb.c
index aaa90bf74a9a..805a7b737981 100644
--- a/lib/igt_fb.c
+++ b/lib/igt_fb.c
@@ -72,6 +72,10 @@ static const struct format_desc_struct {
 	  .cairo_id = CAIRO_FORMAT_RGB16_565,
 	  .num_planes = 1, .plane_bpp = { 16, },
 	},
+	{ .name = "RGB888", .drm_id = DRM_FORMAT_RGB888,
+	  .cairo_id = CAIRO_FORMAT_INVALID,
+	  .num_planes = 1, .plane_bpp = { 24, },
+	},
 	{ .name = "XRGB8888", .depth = 24, .drm_id = DRM_FORMAT_XRGB8888,
 	  .cairo_id = CAIRO_FORMAT_RGB24,
 	  .num_planes = 1, .plane_bpp = { 32, },
-- 
git-series 0.9.1


More information about the igt-dev mailing list