[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1475270204-14005-4-git-send-email-javier@osg.samsung.com>
Date: Fri, 30 Sep 2016 17:16:43 -0400
From: Javier Martinez Canillas <javier@....samsung.com>
To: linux-kernel@...r.kernel.org
Cc: Mauro Carvalho Chehab <mchehab@...nel.org>,
Marek Szyprowski <m.szyprowski@...sung.com>,
Krzysztof Kozlowski <krzk@...nel.org>,
Kukjin Kim <kgene@...nel.org>,
Hans Verkuil <hans.verkuil@...co.com>,
Inki Dae <inki.dae@...sung.com>,
linux-samsung-soc@...r.kernel.org,
Sylwester Nawrocki <s.nawrocki@...sung.com>,
Shuah Khan <shuahkh@....samsung.com>,
Nicolas Dufresne <nicolas.dufresne@...labora.com>,
linux-media@...r.kernel.org,
Javier Martinez Canillas <javier@....samsung.com>
Subject: [PATCH 3/4] [media] exynos-gsc: fix supported RGB pixel format
The driver exposes 32-bit A/XRGB 8-8-8-8 as supported format but testing
shows that using this format produces frames with wrong colors. The test
was done with the following GStreamer pipeline:
$ gst-launch-1.0 videotestsrc num-buffers=20 ! video/x-raw,format=UYVY \
! v4l2video3convert ! video/x-raw,format=xRGB ! videoconvert ! kmssink
The manual seems to state that the Pixel Format are in Little Endianness
so instead use the 32-bit BGRA/X 8-8-8-8 pixel format. This format works
correctly when using the following pipeline:
$ gst-launch-1.0 videotestsrc num-buffers=20 ! video/x-raw,format=UYVY \
! v4l2video3convert ! video/x-raw,format=BGRx ! kmssink
This change is similar to commit 7f2816e51ea1 ("[media] s5p-fimc: Changed
RGB32 to BGR32") that fixed the same issue on a different Samsung driver.
Suggested-by: Nicolas Dufresne <nicolas.dufresne@...labora.com>
Signed-off-by: Javier Martinez Canillas <javier@....samsung.com>
---
drivers/media/platform/exynos-gsc/gsc-core.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/media/platform/exynos-gsc/gsc-core.c b/drivers/media/platform/exynos-gsc/gsc-core.c
index fac0c0246ad4..8bb1d2be7234 100644
--- a/drivers/media/platform/exynos-gsc/gsc-core.c
+++ b/drivers/media/platform/exynos-gsc/gsc-core.c
@@ -39,8 +39,8 @@ static const struct gsc_fmt gsc_formats[] = {
.num_planes = 1,
.num_comp = 1,
}, {
- .name = "XRGB-8-8-8-8, 32 bpp",
- .pixelformat = V4L2_PIX_FMT_RGB32,
+ .name = "BGRX-8-8-8-8, 32 bpp",
+ .pixelformat = V4L2_PIX_FMT_BGR32,
.depth = { 32 },
.color = GSC_RGB,
.num_planes = 1,
--
2.7.4
Powered by blists - more mailing lists