public inbox for igt-dev@lists.freedesktop.org
 help / color / mirror / Atom feed
* [igt-dev] [PATCH i-g-t 1/2] lib/igt_fb: Add support for C8 pixel format
@ 2019-05-10 17:18 Ville Syrjala
  2019-05-10 17:19 ` [igt-dev] [PATCH i-g-t 2/2] tests/kms_plane: Test " Ville Syrjala
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Ville Syrjala @ 2019-05-10 17:18 UTC (permalink / raw)
  To: igt-dev

From: Ville Syrjälä <ville.syrjala@linux.intel.com>

Expose C8 support by utilizing pixman's rgb332 support.
By using rgb332 we don't have to worry too much about
how to populate the LUT, though for now we still leave
that responsibility to individual tests. If desired we
could make igt_kms generate a suitable LUT when the test
itself didn't bother. But meh for now.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
 lib/igt_fb.c | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/lib/igt_fb.c b/lib/igt_fb.c
index d4929019971c..19523a4def54 100644
--- a/lib/igt_fb.c
+++ b/lib/igt_fb.c
@@ -98,6 +98,12 @@ static const struct format_desc_struct {
 	  .num_planes = 1, .plane_bpp = { 16, },
 	  .hsub = 1, .vsub = 1,
 	},
+	{ .name = "C8", .depth = -1, .drm_id = DRM_FORMAT_C8,
+	  .cairo_id = CAIRO_FORMAT_INVALID,
+	  .pixman_id = PIXMAN_r3g3b2,
+	  .num_planes = 1, .plane_bpp = { 8, },
+	  .hsub = 1, .vsub = 1,
+	},
 	{ .name = "XRGB1555", .depth = -1, .drm_id = DRM_FORMAT_XRGB1555,
 	  .cairo_id = CAIRO_FORMAT_INVALID,
 	  .pixman_id = PIXMAN_x1r5g5b5,
@@ -3248,6 +3254,15 @@ bool igt_fb_supported_format(uint32_t drm_format)
 {
 	const struct format_desc_struct *f;
 
+	/*
+	 * C8 needs a LUT which (at least for the time being)
+	 * is the responsibility of each test. Not all tests
+	 * have the required code so let's keep C8 hidden from
+	 * most eyes.
+	 */
+	if (drm_format == DRM_FORMAT_C8)
+		return false;
+
 	for_each_format(f)
 		if (f->drm_id == drm_format)
 			return (f->cairo_id != CAIRO_FORMAT_INVALID) ||
-- 
2.21.0

_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2019-05-10 21:25 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-05-10 17:18 [igt-dev] [PATCH i-g-t 1/2] lib/igt_fb: Add support for C8 pixel format Ville Syrjala
2019-05-10 17:19 ` [igt-dev] [PATCH i-g-t 2/2] tests/kms_plane: Test " Ville Syrjala
2019-05-10 17:47 ` [igt-dev] ✓ Fi.CI.BAT: success for series starting with [i-g-t,1/2] lib/igt_fb: Add support for " Patchwork
2019-05-10 21:25 ` [igt-dev] ✗ Fi.CI.IGT: failure " Patchwork

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox