public inbox for igt-dev@lists.freedesktop.org
 help / color / mirror / Atom feed
* [igt-dev] [PATCH i-g-t 1/4] lib/igt_fb: Fix the pixman converter
@ 2018-11-02 19:06 Ville Syrjala
  2018-11-02 19:06 ` [igt-dev] [PATCH i-g-t 2/4] lib/igt_fb: Assert converted formats harder Ville Syrjala
                   ` (4 more replies)
  0 siblings, 5 replies; 16+ messages in thread
From: Ville Syrjala @ 2018-11-02 19:06 UTC (permalink / raw)
  To: igt-dev

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

Cairo doesn't do RGB888. The shadow buffer must be in XRGB888 (which
is what our YUV converters also assume). We did calculate the shadow
stride/size with four bytes per pixel, but we just put the wrong
format in the fb metadata.

Cc: Maxime Ripard <maxime.ripard@bootlin.com>
Cc: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
Cc: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com>
Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
 lib/igt_fb.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/lib/igt_fb.c b/lib/igt_fb.c
index fe0c99b9f0f3..ac43f15803ce 100644
--- a/lib/igt_fb.c
+++ b/lib/igt_fb.c
@@ -1464,7 +1464,7 @@ static void *igt_fb_create_cairo_shadow_buffer(int fd,
 	igt_assert(shadow);
 
 	fb_init(shadow, fd, width, height,
-		DRM_FORMAT_RGB888, LOCAL_DRM_FORMAT_MOD_NONE,
+		DRM_FORMAT_XRGB8888, LOCAL_DRM_FORMAT_MOD_NONE,
 		IGT_COLOR_YCBCR_BT709, IGT_COLOR_YCBCR_LIMITED_RANGE);
 
 	shadow->strides[0] = ALIGN(width * 4, 16);
@@ -1899,7 +1899,7 @@ static void fb_convert(struct fb_convert *cvt)
 	    (drm_format_to_pixman(cvt->dst.fb->drm_format) != PIXMAN_invalid)) {
 		convert_pixman(cvt);
 		return;
-	} else if (cvt->dst.fb->drm_format == DRM_FORMAT_RGB888) {
+	} else if (cvt->dst.fb->drm_format == DRM_FORMAT_XRGB8888) {
 		switch (cvt->src.fb->drm_format) {
 		case DRM_FORMAT_NV12:
 			convert_nv12_to_rgb24(cvt);
@@ -1911,7 +1911,7 @@ static void fb_convert(struct fb_convert *cvt)
 			convert_yuyv_to_rgb24(cvt);
 			return;
 		}
-	} else if (cvt->src.fb->drm_format == DRM_FORMAT_RGB888) {
+	} else if (cvt->src.fb->drm_format == DRM_FORMAT_XRGB8888) {
 		switch (cvt->dst.fb->drm_format) {
 		case DRM_FORMAT_NV12:
 			convert_rgb24_to_nv12(cvt);
-- 
2.18.1

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

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

end of thread, other threads:[~2018-11-05 17:14 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-11-02 19:06 [igt-dev] [PATCH i-g-t 1/4] lib/igt_fb: Fix the pixman converter Ville Syrjala
2018-11-02 19:06 ` [igt-dev] [PATCH i-g-t 2/4] lib/igt_fb: Assert converted formats harder Ville Syrjala
2018-11-02 19:06 ` [igt-dev] [PATCH i-g-t 3/4] lib/igt_fb: Use linear.fb in the converter Ville Syrjala
2018-11-02 19:06 ` [igt-dev] [PATCH i-g-t 4/4] lib/igt_fb: Generalize the slow read from gtt mmap handling Ville Syrjala
2018-11-02 19:17   ` Chris Wilson
2018-11-02 19:30     ` Ville Syrjälä
2018-11-02 19:32       ` Chris Wilson
2018-11-02 19:37         ` Ville Syrjälä
2018-11-02 19:37   ` [igt-dev] [PATCH i-g-t v2 " Ville Syrjala
2018-11-05 15:19     ` Maxime Ripard
2018-11-05 15:33       ` Maarten Lankhorst
2018-11-05 15:41         ` Maxime Ripard
2018-11-05 16:07           ` Ville Syrjälä
2018-11-05 17:14           ` Maarten Lankhorst
2018-11-02 20:21 ` [igt-dev] ✓ Fi.CI.BAT: success for series starting with [i-g-t,1/4] lib/igt_fb: Fix the pixman converter (rev2) Patchwork
2018-11-03  0:48 ` [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