Re: [PATCH 5/8] media: rcar_vin: Add RGB888_1X24 input format support

2015-02-01 Thread Guennadi Liakhovetski
Hi Wills,

On Thu, 29 Jan 2015, William Towle wrote:

 This adds V4L2_MBUS_FMT_RGB888_1X24 input format support
 which is used by the ADV7612 chip.
 
 Signed-off-by: Valentine Barshak valentine.bars...@cogentembedded.com
 ---
 URL:http://marc.info/?l=linux-shm=138002993417489q=raw
 FIXMEs required:
 - From: as per URL
 - adapted for lx3.18 by William Towle - add S-o-b **

Yes, please, add your Sob and the original authorship. Which, btw, isn't 
this patch a modified version of 
http://lists.kde.org/?l=linux-shm=141476801629391w=4 ? I.e. shouldn't it 
be

From: Koji Matsuoka koji.matsuoka...@renesas.com

? And yes, I like this version better, because it sets the VNMC_BPS bit in 
one step instead of two.

Thanks
Guennadi

 ---
  drivers/media/platform/soc_camera/rcar_vin.c |   11 +--
  1 file changed, 9 insertions(+), 2 deletions(-)
 
 diff --git a/drivers/media/platform/soc_camera/rcar_vin.c 
 b/drivers/media/platform/soc_camera/rcar_vin.c
 index c4f88c3..e4f60d3 100644
 --- a/drivers/media/platform/soc_camera/rcar_vin.c
 +++ b/drivers/media/platform/soc_camera/rcar_vin.c
 @@ -74,6 +74,7 @@
  #define VNMC_INF_YUV10_BT656 (2  16)
  #define VNMC_INF_YUV10_BT601 (3  16)
  #define VNMC_INF_YUV16   (5  16)
 +#define VNMC_INF_RGB888  (6  16)
  #define VNMC_VUP (1  10)
  #define VNMC_IM_ODD  (0  3)
  #define VNMC_IM_ODD_EVEN (1  3)
 @@ -241,7 +242,7 @@ static int rcar_vin_setup(struct rcar_vin_priv *priv)
   struct soc_camera_device *icd = priv-ici.icd;
   struct rcar_vin_cam *cam = icd-host_priv;
   u32 vnmc, dmr, interrupts;
 - bool progressive = false, output_is_yuv = false;
 + bool progressive = false, output_is_yuv = false, input_is_yuv = false;
  
   switch (priv-field) {
   case V4L2_FIELD_TOP:
 @@ -275,11 +276,16 @@ static int rcar_vin_setup(struct rcar_vin_priv *priv)
   case MEDIA_BUS_FMT_YUYV8_1X16:
   /* BT.601/BT.1358 16bit YCbCr422 */
   vnmc |= VNMC_INF_YUV16;
 + input_is_yuv = true;
   break;
   case MEDIA_BUS_FMT_YUYV8_2X8:
   /* BT.656 8bit YCbCr422 or BT.601 8bit YCbCr422 */
   vnmc |= priv-pdata_flags  RCAR_VIN_BT656 ?
   VNMC_INF_YUV8_BT656 : VNMC_INF_YUV8_BT601;
 + input_is_yuv = true;
 + break;
 + case MEDIA_BUS_FMT_RGB888_1X24:
 + vnmc |= VNMC_INF_RGB888;
   break;
   case MEDIA_BUS_FMT_YUYV10_2X10:
   /* BT.656 10bit YCbCr422 or BT.601 10bit YCbCr422 */
 @@ -328,7 +334,7 @@ static int rcar_vin_setup(struct rcar_vin_priv *priv)
   vnmc |= VNMC_VUP;
  
   /* If input and output use the same colorspace, use bypass mode */
 - if (output_is_yuv)
 + if (input_is_yuv == output_is_yuv)
   vnmc |= VNMC_BPS;
  
   /* progressive or interlaced mode */
 @@ -1015,6 +1021,7 @@ static int rcar_vin_get_formats(struct 
 soc_camera_device *icd, unsigned int idx,
   case MEDIA_BUS_FMT_YUYV8_1X16:
   case MEDIA_BUS_FMT_YUYV8_2X8:
   case MEDIA_BUS_FMT_YUYV10_2X10:
 + case MEDIA_BUS_FMT_RGB888_1X24:
   if (cam-extra_fmt)
   break;
  
 -- 
 1.7.10.4
 
 --
 To unsubscribe from this list: send the line unsubscribe linux-media in
 the body of a message to majord...@vger.kernel.org
 More majordomo info at  http://vger.kernel.org/majordomo-info.html
 
--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 5/8] media: rcar_vin: Add RGB888_1X24 input format support

2015-01-29 Thread Sergei Shtylyov

Hello.

On 01/29/2015 07:19 PM, William Towle wrote:


This adds V4L2_MBUS_FMT_RGB888_1X24 input format support
which is used by the ADV7612 chip.



Signed-off-by: Valentine Barshak valentine.bars...@cogentembedded.com


   I wonder why it hasn't been merged still? It's pending since 2013, and I'm 
seeing no objections to it...


WBR, Sergei

--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 5/8] media: rcar_vin: Add RGB888_1X24 input format support

2015-01-29 Thread Sergei Shtylyov

Hello.

On 01/29/2015 09:18 PM, Guennadi Liakhovetski wrote:


This adds V4L2_MBUS_FMT_RGB888_1X24 input format support
which is used by the ADV7612 chip.



Signed-off-by: Valentine Barshak valentine.bars...@cogentembedded.com



I wonder why it hasn't been merged still? It's pending since 2013, and I'm
seeing no objections to it...



Indeed, strange. I'm saving it for me to look at it for the next merge...
and I'll double-check that series. Maybe the series had some objections,


   Indeed, I'm now seeing the patch #1 was objected to. Patch #2 has been 
merged somewhat later.



Thanks
Guennadi


WBR, Sergei

--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 5/8] media: rcar_vin: Add RGB888_1X24 input format support

2015-01-29 Thread Guennadi Liakhovetski
Hi Sergei,

On Thu, 29 Jan 2015, Sergei Shtylyov wrote:

 Hello.
 
 On 01/29/2015 07:19 PM, William Towle wrote:
 
  This adds V4L2_MBUS_FMT_RGB888_1X24 input format support
  which is used by the ADV7612 chip.
 
  Signed-off-by: Valentine Barshak valentine.bars...@cogentembedded.com
 
I wonder why it hasn't been merged still? It's pending since 2013, and I'm
 seeing no objections to it...

Indeed, strange. I'm saving it for me to look at it for the next merge... 
and I'll double-check that series. Maybe the series had some objections, 
and for that reason this patch hasn't been picked up. I'll double-check 
anyway.

Thanks
Guennadi

 
 WBR, Sergei
 
--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 5/8] media: rcar_vin: Add RGB888_1X24 input format support

2015-01-29 Thread William Towle
This adds V4L2_MBUS_FMT_RGB888_1X24 input format support
which is used by the ADV7612 chip.

Signed-off-by: Valentine Barshak valentine.bars...@cogentembedded.com
---
URL:http://marc.info/?l=linux-shm=138002993417489q=raw
FIXMEs required:
- From: as per URL
- adapted for lx3.18 by William Towle - add S-o-b **
---
 drivers/media/platform/soc_camera/rcar_vin.c |   11 +--
 1 file changed, 9 insertions(+), 2 deletions(-)

diff --git a/drivers/media/platform/soc_camera/rcar_vin.c 
b/drivers/media/platform/soc_camera/rcar_vin.c
index c4f88c3..e4f60d3 100644
--- a/drivers/media/platform/soc_camera/rcar_vin.c
+++ b/drivers/media/platform/soc_camera/rcar_vin.c
@@ -74,6 +74,7 @@
 #define VNMC_INF_YUV10_BT656   (2  16)
 #define VNMC_INF_YUV10_BT601   (3  16)
 #define VNMC_INF_YUV16 (5  16)
+#define VNMC_INF_RGB888(6  16)
 #define VNMC_VUP   (1  10)
 #define VNMC_IM_ODD(0  3)
 #define VNMC_IM_ODD_EVEN   (1  3)
@@ -241,7 +242,7 @@ static int rcar_vin_setup(struct rcar_vin_priv *priv)
struct soc_camera_device *icd = priv-ici.icd;
struct rcar_vin_cam *cam = icd-host_priv;
u32 vnmc, dmr, interrupts;
-   bool progressive = false, output_is_yuv = false;
+   bool progressive = false, output_is_yuv = false, input_is_yuv = false;
 
switch (priv-field) {
case V4L2_FIELD_TOP:
@@ -275,11 +276,16 @@ static int rcar_vin_setup(struct rcar_vin_priv *priv)
case MEDIA_BUS_FMT_YUYV8_1X16:
/* BT.601/BT.1358 16bit YCbCr422 */
vnmc |= VNMC_INF_YUV16;
+   input_is_yuv = true;
break;
case MEDIA_BUS_FMT_YUYV8_2X8:
/* BT.656 8bit YCbCr422 or BT.601 8bit YCbCr422 */
vnmc |= priv-pdata_flags  RCAR_VIN_BT656 ?
VNMC_INF_YUV8_BT656 : VNMC_INF_YUV8_BT601;
+   input_is_yuv = true;
+   break;
+   case MEDIA_BUS_FMT_RGB888_1X24:
+   vnmc |= VNMC_INF_RGB888;
break;
case MEDIA_BUS_FMT_YUYV10_2X10:
/* BT.656 10bit YCbCr422 or BT.601 10bit YCbCr422 */
@@ -328,7 +334,7 @@ static int rcar_vin_setup(struct rcar_vin_priv *priv)
vnmc |= VNMC_VUP;
 
/* If input and output use the same colorspace, use bypass mode */
-   if (output_is_yuv)
+   if (input_is_yuv == output_is_yuv)
vnmc |= VNMC_BPS;
 
/* progressive or interlaced mode */
@@ -1015,6 +1021,7 @@ static int rcar_vin_get_formats(struct soc_camera_device 
*icd, unsigned int idx,
case MEDIA_BUS_FMT_YUYV8_1X16:
case MEDIA_BUS_FMT_YUYV8_2X8:
case MEDIA_BUS_FMT_YUYV10_2X10:
+   case MEDIA_BUS_FMT_RGB888_1X24:
if (cam-extra_fmt)
break;
 
-- 
1.7.10.4

--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 5/8] media: rcar_vin: Add RGB888_1X24 input format support

2015-01-29 Thread Guennadi Liakhovetski
On Thu, 29 Jan 2015, Sergei Shtylyov wrote:

 On 01/29/2015 11:19 PM, Guennadi Liakhovetski wrote:
 
  This adds V4L2_MBUS_FMT_RGB888_1X24 input format support
  which is used by the ADV7612 chip.
 
  Signed-off-by: Valentine Barshak
  valentine.bars...@cogentembedded.com
 
  I wonder why it hasn't been merged still? It's pending since
 2013, and
 I'm
 seeing no objections to it...
 
Indeed, strange. I'm saving it for me to look at it for the next
merge...
and I'll double-check that series. Maybe the series had some objections,
 
   Indeed, I'm now seeing the patch #1 was objected to. Patch #2 has been
   merged somewhat later.
 
  Right, and since this RGB888 format support was needed for the ADV761X
  driver from patch #1, this patch wasn't merged either. Do you need it now
  for something different?
 
No, the same ADV7612 chip, just the different driver this time, it seems.

Right, I see now. [OT] The problem is - this is not the first time this is 
happening - I didn't get that thread in my INBOX, only in the mailing list 
folder. I subscribe the mailing list from a different email address, than 
the one I'm CC'ed at. So, I anyway should be getting 2 copies of all these 
mails. I received 2 copies of Sergei's mails, but the rest only once... 
Not in spam, not in logs - they just disappear. A day or two ago another 
similar thread also missed my INBOX... Investigating...

Thanks
Guennadi
--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 5/8] media: rcar_vin: Add RGB888_1X24 input format support

2015-01-29 Thread Guennadi Liakhovetski
On Thu, 29 Jan 2015, Sergei Shtylyov wrote:

 Hello.
 
 On 01/29/2015 09:18 PM, Guennadi Liakhovetski wrote:
 
This adds V4L2_MBUS_FMT_RGB888_1X24 input format support
which is used by the ADV7612 chip.
 
Signed-off-by: Valentine Barshak valentine.bars...@cogentembedded.com
 
   I wonder why it hasn't been merged still? It's pending since 2013, and
   I'm
   seeing no objections to it...
 
  Indeed, strange. I'm saving it for me to look at it for the next merge...
  and I'll double-check that series. Maybe the series had some objections,
 
Indeed, I'm now seeing the patch #1 was objected to. Patch #2 has been
 merged somewhat later.

Right, and since this RGB888 format support was needed for the ADV761X 
driver from patch #1, this patch wasn't merged either. Do you need it now 
for something different?

Thanks
Guennadi
--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 5/8] media: rcar_vin: Add RGB888_1X24 input format support

2015-01-29 Thread Sergei Shtylyov

On 01/29/2015 11:19 PM, Guennadi Liakhovetski wrote:


This adds V4L2_MBUS_FMT_RGB888_1X24 input format support
which is used by the ADV7612 chip.



Signed-off-by: Valentine Barshak valentine.bars...@cogentembedded.com



 I wonder why it hasn't been merged still? It's pending since 2013, and
I'm
seeing no objections to it...



Indeed, strange. I'm saving it for me to look at it for the next merge...
and I'll double-check that series. Maybe the series had some objections,



Indeed, I'm now seeing the patch #1 was objected to. Patch #2 has been
merged somewhat later.



Right, and since this RGB888 format support was needed for the ADV761X
driver from patch #1, this patch wasn't merged either. Do you need it now
for something different?


   No, the same ADV7612 chip, just the different driver this time, it seems.


Thanks
Guennadi


WBR, Sergei

--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html