All of lore.kernel.org
 help / color / mirror / Atom feed
* [igt-dev] [PATCH i-g-t 1/2] lib/igt_fb: Add XBGR2101010 support via pixman
@ 2019-09-18 13:51 Ville Syrjala
  2019-09-18 13:51 ` [igt-dev] [PATCH i-g-t 2/2] lib/igt_fb: Extract use_convert() Ville Syrjala
                   ` (4 more replies)
  0 siblings, 5 replies; 10+ messages in thread
From: Ville Syrjala @ 2019-09-18 13:51 UTC (permalink / raw)
  To: igt-dev

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

Use pixman to swizzle cairo RGB30 into XBGR2101010.

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

diff --git a/lib/igt_fb.c b/lib/igt_fb.c
index bad3eeca4132..612c25d5baed 100644
--- a/lib/igt_fb.c
+++ b/lib/igt_fb.c
@@ -157,6 +157,12 @@ static const struct format_desc_struct {
 	  .num_planes = 1, .plane_bpp = { 32, },
 	  .hsub = 1, .vsub = 1,
 	},
+	{ .name = "XBGB2101010", .depth = -1, .drm_id = DRM_FORMAT_XBGR2101010,
+	  .cairo_id = CAIRO_FORMAT_INVALID,
+	  .pixman_id = PIXMAN_x2b10g10r10,
+	  .num_planes = 1, .plane_bpp = { 32, },
+	  .hsub = 1, .vsub = 1,
+	},
 	{ .name = "ARGB8888", .depth = 32, .drm_id = DRM_FORMAT_ARGB8888,
 	  .cairo_id = CAIRO_FORMAT_ARGB32,
 	  .pixman_id = PIXMAN_a8r8g8b8,
@@ -3107,6 +3113,9 @@ static void create_cairo_surface__convert(int fd, struct igt_fb *fb)
 	} else if (PIXMAN_FORMAT_A(f->pixman_id)) {
 		cairo_id = CAIRO_FORMAT_ARGB32;
 		drm_format = DRM_FORMAT_ARGB8888;
+	} else if (PIXMAN_FORMAT_R(f->pixman_id) > 8) {
+		cairo_id = CAIRO_FORMAT_RGB30;
+		drm_format = DRM_FORMAT_XRGB2101010;
 	} else {
 		cairo_id = CAIRO_FORMAT_RGB24;
 		drm_format = DRM_FORMAT_XRGB8888;
-- 
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] 10+ messages in thread

end of thread, other threads:[~2019-10-03 15:49 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-09-18 13:51 [igt-dev] [PATCH i-g-t 1/2] lib/igt_fb: Add XBGR2101010 support via pixman Ville Syrjala
2019-09-18 13:51 ` [igt-dev] [PATCH i-g-t 2/2] lib/igt_fb: Extract use_convert() Ville Syrjala
2019-09-30 19:35   ` Chris Wilson
2019-09-18 14:17 ` [igt-dev] ✓ Fi.CI.BAT: success for series starting with [i-g-t,1/2] lib/igt_fb: Add XBGR2101010 support via pixman Patchwork
2019-09-30 19:35 ` [igt-dev] [PATCH i-g-t 1/2] " Chris Wilson
2019-10-01 12:08   ` Ville Syrjälä
2019-10-01 13:26 ` [igt-dev] ✓ Fi.CI.BAT: success for series starting with [i-g-t,1/2] lib/igt_fb: Add XBGR2101010 support via pixman (rev2) Patchwork
2019-10-01 20:27 ` [igt-dev] ✗ Fi.CI.IGT: failure " Patchwork
2019-10-03 15:45   ` Ville Syrjälä
2019-10-03 15:49     ` Chris Wilson

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.