linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] [media] exynos-gsc: Fix support for NV21 and NV61 formats
@ 2017-02-01 20:05 Javier Martinez Canillas
  2017-02-01 20:05 ` [PATCH 1/2] [media] exynos-gsc: Do not swap cb/cr for semi planar formats Javier Martinez Canillas
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Javier Martinez Canillas @ 2017-02-01 20:05 UTC (permalink / raw)
  To: linux-kernel
  Cc: Mauro Carvalho Chehab, Andi Shyti, Thibault Saunier, Shuah Khan,
	Inki Dae, Nicolas Dufresne, Javier Martinez Canillas,
	Mauro Carvalho Chehab, Marek Szyprowski, Kukjin Kim,
	linux-samsung-soc, Sylwester Nawrocki, linux-media,
	Krzysztof Kozlowski, linux-arm-kernel, Ulf Hansson

Hello,

Commit 652bb68018a5 ("[media] exynos-gsc: do proper bytesperline and
sizeimage calculation") fixed corrupted frames for most exynos-gsc
formats, but even after that patch two issues were still remaining:

1) Frames were still not correct for NV21 and NV61 formats.
2) Y42B format didn't work when used as output (only as input).

This patch series fixes (1).

Best regards,
Javier


Thibault Saunier (2):
  [media] exynos-gsc: Do not swap cb/cr for semi planar formats
  [media] exynos-gsc: Add support for NV{16,21,61}M pixel formats

 drivers/media/platform/exynos-gsc/gsc-core.c | 29 ++++++++++++++++++++++++++--
 1 file changed, 27 insertions(+), 2 deletions(-)

-- 
2.7.4

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

* [PATCH 1/2] [media] exynos-gsc: Do not swap cb/cr for semi planar formats
  2017-02-01 20:05 [PATCH 0/2] [media] exynos-gsc: Fix support for NV21 and NV61 formats Javier Martinez Canillas
@ 2017-02-01 20:05 ` Javier Martinez Canillas
       [not found]   ` <CGME20170213143524epcas5p1e1fdcf49d5fd9b0c40cc9ffe849f10d9@epcas5p1.samsung.com>
  2017-02-01 20:05 ` [PATCH 2/2] [media] exynos-gsc: Add support for NV{16,21,61}M pixel formats Javier Martinez Canillas
  2017-02-13 12:53 ` [PATCH 0/2] [media] exynos-gsc: Fix support for NV21 and NV61 formats Javier Martinez Canillas
  2 siblings, 1 reply; 8+ messages in thread
From: Javier Martinez Canillas @ 2017-02-01 20:05 UTC (permalink / raw)
  To: linux-kernel
  Cc: Mauro Carvalho Chehab, Andi Shyti, Thibault Saunier, Shuah Khan,
	Inki Dae, Nicolas Dufresne, Javier Martinez Canillas,
	Mauro Carvalho Chehab, Marek Szyprowski, Kukjin Kim,
	linux-samsung-soc, Sylwester Nawrocki, linux-media,
	Krzysztof Kozlowski, linux-arm-kernel, Ulf Hansson

From: Thibault Saunier <thibault.saunier@osg.samsung.com>

In the case of semi planar formats cb and cr are in the same plane
in memory, meaning that will be set to 'cb' whatever the format is,
and whatever the (packed) order of those components are.

Suggested-by: Nicolas Dufresne <nicolas.dufresne@collabora.com>
Signed-off-by: Thibault Saunier <thibault.saunier@osg.samsung.com>
Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com>
---

 drivers/media/platform/exynos-gsc/gsc-core.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/media/platform/exynos-gsc/gsc-core.c b/drivers/media/platform/exynos-gsc/gsc-core.c
index 40aff08dd51d..a846659ae5c1 100644
--- a/drivers/media/platform/exynos-gsc/gsc-core.c
+++ b/drivers/media/platform/exynos-gsc/gsc-core.c
@@ -861,9 +861,7 @@ int gsc_prepare_addr(struct gsc_ctx *ctx, struct vb2_buffer *vb,
 
 	if ((frame->fmt->pixelformat == V4L2_PIX_FMT_VYUY) ||
 		(frame->fmt->pixelformat == V4L2_PIX_FMT_YVYU) ||
-		(frame->fmt->pixelformat == V4L2_PIX_FMT_NV61) ||
 		(frame->fmt->pixelformat == V4L2_PIX_FMT_YVU420) ||
-		(frame->fmt->pixelformat == V4L2_PIX_FMT_NV21) ||
 		(frame->fmt->pixelformat == V4L2_PIX_FMT_YVU420M))
 		swap(addr->cb, addr->cr);
 
-- 
2.7.4

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

* [PATCH 2/2] [media] exynos-gsc: Add support for NV{16,21,61}M pixel formats
  2017-02-01 20:05 [PATCH 0/2] [media] exynos-gsc: Fix support for NV21 and NV61 formats Javier Martinez Canillas
  2017-02-01 20:05 ` [PATCH 1/2] [media] exynos-gsc: Do not swap cb/cr for semi planar formats Javier Martinez Canillas
@ 2017-02-01 20:05 ` Javier Martinez Canillas
       [not found]   ` <CGME20170213143611epcas5p43ef3a577a9f290c8b21d2d5baa8bf099@epcas5p4.samsung.com>
  2017-02-13 12:53 ` [PATCH 0/2] [media] exynos-gsc: Fix support for NV21 and NV61 formats Javier Martinez Canillas
  2 siblings, 1 reply; 8+ messages in thread
From: Javier Martinez Canillas @ 2017-02-01 20:05 UTC (permalink / raw)
  To: linux-kernel
  Cc: Mauro Carvalho Chehab, Andi Shyti, Thibault Saunier, Shuah Khan,
	Inki Dae, Nicolas Dufresne, Javier Martinez Canillas,
	Mauro Carvalho Chehab, Marek Szyprowski, Kukjin Kim,
	linux-samsung-soc, Sylwester Nawrocki, linux-media,
	Krzysztof Kozlowski, linux-arm-kernel, Ulf Hansson

From: Thibault Saunier <thibault.saunier@osg.samsung.com>

Those are useful formats that should be handled.

Signed-off-by: Thibault Saunier <thibault.saunier@osg.samsung.com>
Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com>

---

 drivers/media/platform/exynos-gsc/gsc-core.c | 27 +++++++++++++++++++++++++++
 1 file changed, 27 insertions(+)

diff --git a/drivers/media/platform/exynos-gsc/gsc-core.c b/drivers/media/platform/exynos-gsc/gsc-core.c
index a846659ae5c1..eff636d4502b 100644
--- a/drivers/media/platform/exynos-gsc/gsc-core.c
+++ b/drivers/media/platform/exynos-gsc/gsc-core.c
@@ -112,6 +112,15 @@ static const struct gsc_fmt gsc_formats[] = {
 		.num_planes	= 1,
 		.num_comp	= 2,
 	}, {
+		.name		= "YUV 4:2:2 non-contig, Y/CbCr",
+		.pixelformat	= V4L2_PIX_FMT_NV16M,
+		.depth		= { 8, 8 },
+		.color		= GSC_YUV422,
+		.yorder		= GSC_LSB_Y,
+		.corder		= GSC_CBCR,
+		.num_planes	= 2,
+		.num_comp	= 2,
+	}, {
 		.name		= "YUV 4:2:2 planar, Y/CrCb",
 		.pixelformat	= V4L2_PIX_FMT_NV61,
 		.depth		= { 16 },
@@ -121,6 +130,15 @@ static const struct gsc_fmt gsc_formats[] = {
 		.num_planes	= 1,
 		.num_comp	= 2,
 	}, {
+		.name		= "YUV 4:2:2 non-contig, Y/CrCb",
+		.pixelformat	= V4L2_PIX_FMT_NV61M,
+		.depth		= { 8, 8 },
+		.color		= GSC_YUV422,
+		.yorder		= GSC_LSB_Y,
+		.corder		= GSC_CRCB,
+		.num_planes	= 2,
+		.num_comp	= 2,
+	}, {
 		.name		= "YUV 4:2:0 planar, YCbCr",
 		.pixelformat	= V4L2_PIX_FMT_YUV420,
 		.depth		= { 12 },
@@ -158,6 +176,15 @@ static const struct gsc_fmt gsc_formats[] = {
 		.num_planes	= 1,
 		.num_comp	= 2,
 	}, {
+		.name		= "YUV 4:2:0 non-contig. 2p, Y/CrCb",
+		.pixelformat	= V4L2_PIX_FMT_NV21M,
+		.depth		= { 8, 4 },
+		.color		= GSC_YUV420,
+		.yorder		= GSC_LSB_Y,
+		.corder		= GSC_CRCB,
+		.num_planes	= 2,
+		.num_comp	= 2,
+	}, {
 		.name		= "YUV 4:2:0 non-contig. 2p, Y/CbCr",
 		.pixelformat	= V4L2_PIX_FMT_NV12M,
 		.depth		= { 8, 4 },
-- 
2.7.4

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

* Re: [PATCH 0/2] [media] exynos-gsc: Fix support for NV21 and NV61 formats
  2017-02-01 20:05 [PATCH 0/2] [media] exynos-gsc: Fix support for NV21 and NV61 formats Javier Martinez Canillas
  2017-02-01 20:05 ` [PATCH 1/2] [media] exynos-gsc: Do not swap cb/cr for semi planar formats Javier Martinez Canillas
  2017-02-01 20:05 ` [PATCH 2/2] [media] exynos-gsc: Add support for NV{16,21,61}M pixel formats Javier Martinez Canillas
@ 2017-02-13 12:53 ` Javier Martinez Canillas
       [not found]   ` <CGME20170213143429epcas5p1e9407c814e71352ccb5ec14b082f954e@epcas5p1.samsung.com>
  2 siblings, 1 reply; 8+ messages in thread
From: Javier Martinez Canillas @ 2017-02-13 12:53 UTC (permalink / raw)
  To: Javier Martinez Canillas
  Cc: Linux Kernel, Mauro Carvalho Chehab, Andi Shyti,
	Thibault Saunier, Shuah Khan, Inki Dae, Nicolas Dufresne,
	Mauro Carvalho Chehab, Marek Szyprowski, Kukjin Kim,
	linux-samsung-soc, Sylwester Nawrocki, Linux Media Mailing List,
	Krzysztof Kozlowski, linux-arm-kernel, Ulf Hansson

Hello,

On Wed, Feb 1, 2017 at 5:05 PM, Javier Martinez Canillas
<javier@osg.samsung.com> wrote:
> Hello,
>
> Commit 652bb68018a5 ("[media] exynos-gsc: do proper bytesperline and
> sizeimage calculation") fixed corrupted frames for most exynos-gsc
> formats, but even after that patch two issues were still remaining:
>
> 1) Frames were still not correct for NV21 and NV61 formats.
> 2) Y42B format didn't work when used as output (only as input).
>
> This patch series fixes (1).
>
> Best regards,
> Javier
>
>
> Thibault Saunier (2):
>   [media] exynos-gsc: Do not swap cb/cr for semi planar formats
>   [media] exynos-gsc: Add support for NV{16,21,61}M pixel formats
>
>  drivers/media/platform/exynos-gsc/gsc-core.c | 29 ++++++++++++++++++++++++++--
>  1 file changed, 27 insertions(+), 2 deletions(-)

Any comments on this series?

Best regards,
Javier

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

* Re: [PATCH 0/2] [media] exynos-gsc: Fix support for NV21 and NV61 formats
       [not found]   ` <CGME20170213143429epcas5p1e9407c814e71352ccb5ec14b082f954e@epcas5p1.samsung.com>
@ 2017-02-13 14:34     ` Sylwester Nawrocki
  2017-02-13 14:37       ` Javier Martinez Canillas
  0 siblings, 1 reply; 8+ messages in thread
From: Sylwester Nawrocki @ 2017-02-13 14:34 UTC (permalink / raw)
  To: Javier Martinez Canillas, Javier Martinez Canillas
  Cc: Linux Kernel, Mauro Carvalho Chehab, Andi Shyti,
	Thibault Saunier, Shuah Khan, Inki Dae, Nicolas Dufresne,
	Mauro Carvalho Chehab, Marek Szyprowski, Kukjin Kim,
	linux-samsung-soc, Linux Media Mailing List, Krzysztof Kozlowski,
	linux-arm-kernel, Ulf Hansson

Hi Javier,

On 02/13/2017 01:53 PM, Javier Martinez Canillas wrote:
> Any comments on this series?

The patches look good to me, I will Ack the patches in case
Mauro wants to apply them directly.  Alternatively I will
add them to my tree for v4.12 after the merge window.

-- 
Thanks,
Sylwester

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

* Re: [PATCH 1/2] [media] exynos-gsc: Do not swap cb/cr for semi planar formats
       [not found]   ` <CGME20170213143524epcas5p1e1fdcf49d5fd9b0c40cc9ffe849f10d9@epcas5p1.samsung.com>
@ 2017-02-13 14:35     ` Sylwester Nawrocki
  0 siblings, 0 replies; 8+ messages in thread
From: Sylwester Nawrocki @ 2017-02-13 14:35 UTC (permalink / raw)
  To: Javier Martinez Canillas, linux-kernel
  Cc: Mauro Carvalho Chehab, Andi Shyti, Thibault Saunier, Shuah Khan,
	Inki Dae, Nicolas Dufresne, Mauro Carvalho Chehab,
	Marek Szyprowski, Kukjin Kim, linux-samsung-soc, linux-media,
	Krzysztof Kozlowski, linux-arm-kernel, Ulf Hansson

On 02/01/2017 09:05 PM, Javier Martinez Canillas wrote:
> From: Thibault Saunier <thibault.saunier@osg.samsung.com>
> 
> In the case of semi planar formats cb and cr are in the same plane
> in memory, meaning that will be set to 'cb' whatever the format is,
> and whatever the (packed) order of those components are.
> 
> Suggested-by: Nicolas Dufresne <nicolas.dufresne@collabora.com>
> Signed-off-by: Thibault Saunier <thibault.saunier@osg.samsung.com>
> Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com>

Acked-by: Sylwester Nawrocki <s.nawrocki@samsung.com>

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

* Re: [PATCH 2/2] [media] exynos-gsc: Add support for NV{16,21,61}M pixel formats
       [not found]   ` <CGME20170213143611epcas5p43ef3a577a9f290c8b21d2d5baa8bf099@epcas5p4.samsung.com>
@ 2017-02-13 14:36     ` Sylwester Nawrocki
  0 siblings, 0 replies; 8+ messages in thread
From: Sylwester Nawrocki @ 2017-02-13 14:36 UTC (permalink / raw)
  To: Javier Martinez Canillas, linux-kernel
  Cc: Mauro Carvalho Chehab, Andi Shyti, Thibault Saunier, Shuah Khan,
	Inki Dae, Nicolas Dufresne, Mauro Carvalho Chehab,
	Marek Szyprowski, Kukjin Kim, linux-samsung-soc, linux-media,
	Krzysztof Kozlowski, linux-arm-kernel, Ulf Hansson

On 02/01/2017 09:05 PM, Javier Martinez Canillas wrote:
> From: Thibault Saunier <thibault.saunier@osg.samsung.com>
> 
> Those are useful formats that should be handled.
> 
> Signed-off-by: Thibault Saunier <thibault.saunier@osg.samsung.com>
> Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com>

Acked-by: Sylwester Nawrocki <s.nawrocki@samsung.com>

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

* Re: [PATCH 0/2] [media] exynos-gsc: Fix support for NV21 and NV61 formats
  2017-02-13 14:34     ` Sylwester Nawrocki
@ 2017-02-13 14:37       ` Javier Martinez Canillas
  0 siblings, 0 replies; 8+ messages in thread
From: Javier Martinez Canillas @ 2017-02-13 14:37 UTC (permalink / raw)
  To: Sylwester Nawrocki, Javier Martinez Canillas
  Cc: Linux Kernel, Mauro Carvalho Chehab, Andi Shyti,
	Thibault Saunier, Shuah Khan, Inki Dae, Nicolas Dufresne,
	Mauro Carvalho Chehab, Marek Szyprowski, Kukjin Kim,
	linux-samsung-soc, Linux Media Mailing List, Krzysztof Kozlowski,
	linux-arm-kernel, Ulf Hansson

Hello Sylwester,

On 02/13/2017 11:34 AM, Sylwester Nawrocki wrote:
> Hi Javier,
> 
> On 02/13/2017 01:53 PM, Javier Martinez Canillas wrote:
>> Any comments on this series?
> 
> The patches look good to me, I will Ack the patches in case
> Mauro wants to apply them directly.  Alternatively I will
> add them to my tree for v4.12 after the merge window.
> 

Great, thanks a lot for your help!

Best regards,
-- 
Javier Martinez Canillas
Open Source Group
Samsung Research America

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

end of thread, other threads:[~2017-02-13 14:37 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-02-01 20:05 [PATCH 0/2] [media] exynos-gsc: Fix support for NV21 and NV61 formats Javier Martinez Canillas
2017-02-01 20:05 ` [PATCH 1/2] [media] exynos-gsc: Do not swap cb/cr for semi planar formats Javier Martinez Canillas
     [not found]   ` <CGME20170213143524epcas5p1e1fdcf49d5fd9b0c40cc9ffe849f10d9@epcas5p1.samsung.com>
2017-02-13 14:35     ` Sylwester Nawrocki
2017-02-01 20:05 ` [PATCH 2/2] [media] exynos-gsc: Add support for NV{16,21,61}M pixel formats Javier Martinez Canillas
     [not found]   ` <CGME20170213143611epcas5p43ef3a577a9f290c8b21d2d5baa8bf099@epcas5p4.samsung.com>
2017-02-13 14:36     ` Sylwester Nawrocki
2017-02-13 12:53 ` [PATCH 0/2] [media] exynos-gsc: Fix support for NV21 and NV61 formats Javier Martinez Canillas
     [not found]   ` <CGME20170213143429epcas5p1e9407c814e71352ccb5ec14b082f954e@epcas5p1.samsung.com>
2017-02-13 14:34     ` Sylwester Nawrocki
2017-02-13 14:37       ` Javier Martinez Canillas

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).