[PATCH] [media] test

2015-10-19 Thread Valentine Barshak
From: valentine.bars...@cogentembedded.com

test
---
 drivers/media/platform/soc_camera/Kconfig | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/media/platform/soc_camera/Kconfig 
b/drivers/media/platform/soc_camera/Kconfig
index dddca60..6540847 100644
--- a/drivers/media/platform/soc_camera/Kconfig
+++ b/drivers/media/platform/soc_camera/Kconfig
@@ -43,12 +43,14 @@ config VIDEO_RCAR_VIN
 config VIDEO_SH_MOBILE_CSI2
tristate "SuperH Mobile MIPI CSI-2 Interface driver"
depends on VIDEO_DEV && SOC_CAMERA && HAVE_CLK
+   depends on ARCH_SHMOBILE || SUPERH || COMPILE_TEST
---help---
  This is a v4l2 driver for the SuperH MIPI CSI-2 Interface
 
 config VIDEO_SH_MOBILE_CEU
tristate "SuperH Mobile CEU Interface driver"
depends on VIDEO_DEV && SOC_CAMERA && HAS_DMA && HAVE_CLK
+   depends on ARCH_SHMOBILE || SUPERH || COMPILE_TEST
select VIDEOBUF2_DMA_CONTIG
select SOC_CAMERA_SCALE_CROP
---help---
-- 
1.9.3

--
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 V2] media: soc_camera: rcar_vin: Add preliminary R-Car M2 support

2013-12-26 Thread Valentine Barshak
This adds R-Car M2 (R8A7791) VIN support. Both H2 and M2
variants look the same from the driver's point of view,
so use GEN2 id for both.

Changes in V2:
* Used the same (RCAR_GEN2) id for both H2 and M2 variants
  since they are no different from the driver's point of view.

Signed-off-by: Valentine Barshak valentine.bars...@cogentembedded.com
---
 drivers/media/platform/soc_camera/rcar_vin.c | 7 ---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/drivers/media/platform/soc_camera/rcar_vin.c 
b/drivers/media/platform/soc_camera/rcar_vin.c
index 6866bb4..3b1c05a 100644
--- a/drivers/media/platform/soc_camera/rcar_vin.c
+++ b/drivers/media/platform/soc_camera/rcar_vin.c
@@ -106,7 +106,7 @@
 #define VIN_MAX_HEIGHT 2048
 
 enum chip_id {
-   RCAR_H2,
+   RCAR_GEN2,
RCAR_H1,
RCAR_M1,
RCAR_E1,
@@ -302,7 +302,7 @@ static int rcar_vin_setup(struct rcar_vin_priv *priv)
dmr = 0;
break;
case V4L2_PIX_FMT_RGB32:
-   if (priv-chip == RCAR_H2 || priv-chip == RCAR_H1 ||
+   if (priv-chip == RCAR_GEN2 || priv-chip == RCAR_H1 ||
priv-chip == RCAR_E1) {
dmr = VNDMR_EXRGB;
break;
@@ -1384,7 +1384,8 @@ static struct soc_camera_host_ops rcar_vin_host_ops = {
 };
 
 static struct platform_device_id rcar_vin_id_table[] = {
-   { r8a7790-vin,  RCAR_H2 },
+   { r8a7791-vin,  RCAR_GEN2 },
+   { r8a7790-vin,  RCAR_GEN2 },
{ r8a7779-vin,  RCAR_H1 },
{ r8a7778-vin,  RCAR_M1 },
{ uPD35004-vin, RCAR_E1 },
-- 
1.8.3.1

--
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] media: soc_camera: rcar_vin: Add preliminary R-Car M2 support

2013-12-23 Thread Valentine Barshak
This adds R-Car M2 (R8A7791) VIN support.

Signed-off-by: Valentine Barshak valentine.bars...@cogentembedded.com
---
 drivers/media/platform/soc_camera/rcar_vin.c | 6 --
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/media/platform/soc_camera/rcar_vin.c 
b/drivers/media/platform/soc_camera/rcar_vin.c
index 6866bb4..8b79727 100644
--- a/drivers/media/platform/soc_camera/rcar_vin.c
+++ b/drivers/media/platform/soc_camera/rcar_vin.c
@@ -106,6 +106,7 @@
 #define VIN_MAX_HEIGHT 2048
 
 enum chip_id {
+   RCAR_M2,
RCAR_H2,
RCAR_H1,
RCAR_M1,
@@ -302,8 +303,8 @@ static int rcar_vin_setup(struct rcar_vin_priv *priv)
dmr = 0;
break;
case V4L2_PIX_FMT_RGB32:
-   if (priv-chip == RCAR_H2 || priv-chip == RCAR_H1 ||
-   priv-chip == RCAR_E1) {
+   if (priv-chip == RCAR_M2 || priv-chip == RCAR_H2 ||
+   priv-chip == RCAR_H1 || priv-chip == RCAR_E1) {
dmr = VNDMR_EXRGB;
break;
}
@@ -1384,6 +1385,7 @@ static struct soc_camera_host_ops rcar_vin_host_ops = {
 };
 
 static struct platform_device_id rcar_vin_id_table[] = {
+   { r8a7791-vin,  RCAR_M2 },
{ r8a7790-vin,  RCAR_H2 },
{ r8a7779-vin,  RCAR_H1 },
{ r8a7778-vin,  RCAR_M1 },
-- 
1.8.3.1

--
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 V2] media: i2c: Add ADV761X support

2013-11-15 Thread Valentine Barshak
This adds ADV7611/ADV7612 Xpressview  HDMI Receiver base
support. Only one HDMI port is supported on ADV7612.

The code is based on the ADV7604 driver, and ADV7612 patch by
Shinobu Uehara shinobu.uehara...@renesas.com

Changes in version 2:
* Used platform data for I2C addresses setup. The driver
  should work with both SoC and non-SoC camera models.
* Dropped unnecessary code and unsupported callbacks.
* Implemented IRQ handling for format change detection.

Signed-off-by: Valentine Barshak valentine.bars...@cogentembedded.com
---
 drivers/media/i2c/Kconfig   |   11 +
 drivers/media/i2c/Makefile  |1 +
 drivers/media/i2c/adv761x.c | 1009 +++
 include/media/adv761x.h |   38 ++
 4 files changed, 1059 insertions(+)
 create mode 100644 drivers/media/i2c/adv761x.c
 create mode 100644 include/media/adv761x.h

diff --git a/drivers/media/i2c/Kconfig b/drivers/media/i2c/Kconfig
index 75c8a03..2388642 100644
--- a/drivers/media/i2c/Kconfig
+++ b/drivers/media/i2c/Kconfig
@@ -206,6 +206,17 @@ config VIDEO_ADV7604
  To compile this driver as a module, choose M here: the
  module will be called adv7604.
 
+config VIDEO_ADV761X
+   tristate Analog Devices ADV761X decoder
+   depends on VIDEO_V4L2  I2C
+   ---help---
+ Support for the Analog Devices ADV7611/ADV7612 video decoder.
+
+ This is an Analog Devices Xpressview HDMI Receiver.
+
+ To compile this driver as a module, choose M here: the
+ module will be called adv761x.
+
 config VIDEO_ADV7842
tristate Analog Devices ADV7842 decoder
depends on VIDEO_V4L2  I2C  VIDEO_V4L2_SUBDEV_API
diff --git a/drivers/media/i2c/Makefile b/drivers/media/i2c/Makefile
index e03f177..d78d627 100644
--- a/drivers/media/i2c/Makefile
+++ b/drivers/media/i2c/Makefile
@@ -26,6 +26,7 @@ obj-$(CONFIG_VIDEO_ADV7183) += adv7183.o
 obj-$(CONFIG_VIDEO_ADV7343) += adv7343.o
 obj-$(CONFIG_VIDEO_ADV7393) += adv7393.o
 obj-$(CONFIG_VIDEO_ADV7604) += adv7604.o
+obj-$(CONFIG_VIDEO_ADV761X) += adv761x.o
 obj-$(CONFIG_VIDEO_ADV7842) += adv7842.o
 obj-$(CONFIG_VIDEO_AD9389B) += ad9389b.o
 obj-$(CONFIG_VIDEO_ADV7511) += adv7511.o
diff --git a/drivers/media/i2c/adv761x.c b/drivers/media/i2c/adv761x.c
new file mode 100644
index 000..95939f5
--- /dev/null
+++ b/drivers/media/i2c/adv761x.c
@@ -0,0 +1,1009 @@
+/*
+ * adv761x Analog Devices ADV761X HDMI receiver driver
+ *
+ * Copyright (C) 2013 Cogent Embedded, Inc.
+ * Copyright (C) 2013 Renesas Electronics Corporation
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ */
+
+#include linux/errno.h
+#include linux/gpio.h
+#include linux/i2c.h
+#include linux/init.h
+#include linux/interrupt.h
+#include linux/kernel.h
+#include linux/module.h
+#include linux/rwsem.h
+#include linux/slab.h
+#include linux/videodev2.h
+#include media/adv761x.h
+#include media/soc_camera.h
+#include media/v4l2-ctrls.h
+#include media/v4l2-device.h
+#include media/v4l2-ioctl.h
+
+#define ADV761X_DRIVER_NAME adv761x
+
+/* VERT_FILTER_LOCKED and DE_REGEN_FILTER_LOCKED flags */
+#define ADV761X_HDMI_F_LOCKED(v)   (((v)  0xa0) == 0xa0)
+
+/* Maximum supported resolution */
+#define ADV761X_MAX_WIDTH  1920
+#define ADV761X_MAX_HEIGHT 1080
+
+/* Use SoC camera subdev desc private data for platform_data */
+#define ADV761X_SOC_CAM_QUIRK  0x1
+
+static int debug;
+module_param(debug, int, 0644);
+MODULE_PARM_DESC(debug, debug level (0-2));
+
+struct adv761x_color_format {
+   enum v4l2_mbus_pixelcode code;
+   enum v4l2_colorspace colorspace;
+};
+
+/* Supported color format list */
+static const struct adv761x_color_format adv761x_cfmts[] = {
+   {
+   .code   = V4L2_MBUS_FMT_RGB888_1X24,
+   .colorspace = V4L2_COLORSPACE_SRGB,
+   },
+};
+
+/* ADV761X descriptor structure */
+struct adv761x_state {
+   struct v4l2_subdev  sd;
+   struct media_padpad;
+   struct v4l2_ctrl_handlerctrl_hdl;
+
+   u8  edid[256];
+   unsignededid_blocks;
+
+   struct rw_semaphore rwsem;
+   const struct adv761x_color_format   *cfmt;
+   u32 width;
+   u32 height;
+   enum v4l2_field scanmode;
+   u32 status;
+
+   int gpio;
+   int

[PATCH] media: rcar_vin: Add preliminary r8a7790 support

2013-10-04 Thread Valentine Barshak
Signed-off-by: Valentine Barshak valentine.bars...@cogentembedded.com
---
 drivers/media/platform/soc_camera/rcar_vin.c | 5 -
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/drivers/media/platform/soc_camera/rcar_vin.c 
b/drivers/media/platform/soc_camera/rcar_vin.c
index d02a7e0..b21f777 100644
--- a/drivers/media/platform/soc_camera/rcar_vin.c
+++ b/drivers/media/platform/soc_camera/rcar_vin.c
@@ -105,6 +105,7 @@
 #define VIN_MAX_HEIGHT 2048
 
 enum chip_id {
+   RCAR_H2,
RCAR_H1,
RCAR_M1,
RCAR_E1,
@@ -300,7 +301,8 @@ static int rcar_vin_setup(struct rcar_vin_priv *priv)
dmr = 0;
break;
case V4L2_PIX_FMT_RGB32:
-   if (priv-chip == RCAR_H1 || priv-chip == RCAR_E1) {
+   if (priv-chip == RCAR_H2 || priv-chip == RCAR_H1 ||
+   priv-chip == RCAR_E1) {
dmr = VNDMR_EXRGB;
break;
}
@@ -1381,6 +1383,7 @@ static struct soc_camera_host_ops rcar_vin_host_ops = {
 };
 
 static struct platform_device_id rcar_vin_id_table[] = {
+   { r8a7790-vin,  RCAR_H2 },
{ r8a7779-vin,  RCAR_H1 },
{ r8a7778-vin,  RCAR_M1 },
{ uPD35004-vin, RCAR_E1 },
-- 
1.8.3.1

--
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 0/3] media: Add SH-Mobile RCAR-H2 Lager board support

2013-09-24 Thread Valentine Barshak
The following patches add ADV7611/ADV7612 HDMI receiver I2C driver
and add RCAR H2 SOC support along with ADV761x output format support
to rcar_vin soc_camera driver.

These changes are needed for SH-Mobile R8A7790 Lager board
video input support.

Valentine Barshak (3):
  media: i2c: Add ADV761X support
  media: rcar_vin: Add preliminary r8a7790 H2 support
  media: rcar_vin: Add RGB888_1X24 input format support

 drivers/media/i2c/Kconfig|   11 +
 drivers/media/i2c/Makefile   |1 +
 drivers/media/i2c/adv761x.c  | 1060 ++
 drivers/media/platform/soc_camera/rcar_vin.c |   17 +-
 include/media/adv761x.h  |   28 +
 5 files changed, 1114 insertions(+), 3 deletions(-)
 create mode 100644 drivers/media/i2c/adv761x.c
 create mode 100644 include/media/adv761x.h

-- 
1.8.3.1

--
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 1/3] media: i2c: Add ADV761X support

2013-09-24 Thread Valentine Barshak
This adds ADV7611/ADV7612 Dual Port Xpressview
225 MHz HDMI Receiver support.

The code is based on the ADV7604 driver, and ADV7612 patch
by Shinobu Uehara shinobu.uehara...@renesas.com

Signed-off-by: Valentine Barshak valentine.bars...@cogentembedded.com
---
 drivers/media/i2c/Kconfig   |   11 +
 drivers/media/i2c/Makefile  |1 +
 drivers/media/i2c/adv761x.c | 1060 +++
 include/media/adv761x.h |   28 ++
 4 files changed, 1100 insertions(+)
 create mode 100644 drivers/media/i2c/adv761x.c
 create mode 100644 include/media/adv761x.h

diff --git a/drivers/media/i2c/Kconfig b/drivers/media/i2c/Kconfig
index d18be19..8eede00 100644
--- a/drivers/media/i2c/Kconfig
+++ b/drivers/media/i2c/Kconfig
@@ -206,6 +206,17 @@ config VIDEO_ADV7604
  To compile this driver as a module, choose M here: the
  module will be called adv7604.
 
+config VIDEO_ADV761X
+   tristate Analog Devices ADV761X decoder
+   depends on VIDEO_V4L2  I2C
+   ---help---
+ Support for the Analog Devices ADV7611/ADV7612 video decoder.
+
+ This is an Analog Devices Dual Port Xpressview HDMI Receiver.
+
+ To compile this driver as a module, choose M here: the
+ module will be called adv761x.
+
 config VIDEO_ADV7842
tristate Analog Devices ADV7842 decoder
depends on VIDEO_V4L2  I2C  VIDEO_V4L2_SUBDEV_API
diff --git a/drivers/media/i2c/Makefile b/drivers/media/i2c/Makefile
index 9f462df..393eb0c 100644
--- a/drivers/media/i2c/Makefile
+++ b/drivers/media/i2c/Makefile
@@ -26,6 +26,7 @@ obj-$(CONFIG_VIDEO_ADV7183) += adv7183.o
 obj-$(CONFIG_VIDEO_ADV7343) += adv7343.o
 obj-$(CONFIG_VIDEO_ADV7393) += adv7393.o
 obj-$(CONFIG_VIDEO_ADV7604) += adv7604.o
+obj-$(CONFIG_VIDEO_ADV761X) += adv761x.o
 obj-$(CONFIG_VIDEO_ADV7842) += adv7842.o
 obj-$(CONFIG_VIDEO_AD9389B) += ad9389b.o
 obj-$(CONFIG_VIDEO_ADV7511) += adv7511.o
diff --git a/drivers/media/i2c/adv761x.c b/drivers/media/i2c/adv761x.c
new file mode 100644
index 000..bc3dfc3
--- /dev/null
+++ b/drivers/media/i2c/adv761x.c
@@ -0,0 +1,1060 @@
+/*
+ * adv761x Analog Devices ADV761X HDMI receiver driver
+ *
+ * Copyright (C) 2013 Cogent Embedded, Inc.
+ * Copyright (C) 2013 Renesas Electronics Corporation
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include linux/errno.h
+#include linux/i2c.h
+#include linux/init.h
+#include linux/interrupt.h
+#include linux/kernel.h
+#include linux/module.h
+#include linux/slab.h
+#include linux/videodev2.h
+#include media/adv761x.h
+#include media/v4l2-ctrls.h
+#include media/v4l2-device.h
+#include media/v4l2-ioctl.h
+
+#define ADV761X_DRIVER_NAME adv761x
+
+/* VERT_FILTER_LOCKED and DE_REGEN_FILTER_LOCKED flags */
+#define ADV761X_HDMI_F_LOCKED(v)   (((v)  0xa0) == 0xa0)
+
+/* Maximum supported resolution */
+#define ADV761X_MAX_WIDTH  1920
+#define ADV761X_MAX_HEIGHT 1080
+
+static int debug;
+module_param(debug, int, 0644);
+MODULE_PARM_DESC(debug, debug level (0-2));
+
+/* I2C map addresses */
+static u8 i2c_cec = 0x40;
+module_param(i2c_cec, byte, 0644);
+MODULE_PARM_DESC(i2c_cec, CEC map 7-bit I2C address (default: 0x40));
+
+static u8 i2c_inf = 0x3e;
+module_param(i2c_inf, byte, 0644);
+MODULE_PARM_DESC(i2c_inf, InfoFrame map 7-bit I2C address (default: 0x3e));
+
+static u8 i2c_dpll = 0x26;
+module_param(i2c_dpll, byte, 0644);
+MODULE_PARM_DESC(i2c_dpll, DPLL map 7-bit I2C address (default: 0x20));
+
+static u8 i2c_rep = 0x32;
+module_param(i2c_rep, byte, 0644);
+MODULE_PARM_DESC(i2c_rep, Repeater map 7-bit I2C address (default: 0x32));
+
+static u8 i2c_edid = 0x36;
+module_param(i2c_edid, byte, 0644);
+MODULE_PARM_DESC(i2c_edid, EDID map 7-bit I2C address (default: 0x36));
+
+static u8 i2c_hdmi = 0x34;
+module_param(i2c_hdmi, byte, 0644);
+MODULE_PARM_DESC(i2c_hdmi, HDMI map 7-bit I2C address (default: 0x34));
+
+static u8 i2c_cp = 0x22;
+module_param(i2c_cp, byte, 0644);
+MODULE_PARM_DESC(i2c_cp, CP map 7-bit I2C address (default: 0x22));
+
+struct adv761x_color_format {
+   enum v4l2_mbus_pixelcode code;
+   enum v4l2_colorspace colorspace;
+};
+
+/* Supported color format list */
+static const struct adv761x_color_format adv761x_cfmts[] = {
+   {
+   .code   = V4L2_MBUS_FMT_RGB888_1X24,
+   .colorspace = V4L2_COLORSPACE_SRGB,
+   },
+};
+
+/* ADV761X

[PATCH 2/3] media: rcar_vin: Add preliminary r8a7790 H2 support

2013-09-24 Thread Valentine Barshak
Signed-off-by: Valentine Barshak valentine.bars...@cogentembedded.com
---
 drivers/media/platform/soc_camera/rcar_vin.c | 5 -
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/drivers/media/platform/soc_camera/rcar_vin.c 
b/drivers/media/platform/soc_camera/rcar_vin.c
index d02a7e0..cf81e02 100644
--- a/drivers/media/platform/soc_camera/rcar_vin.c
+++ b/drivers/media/platform/soc_camera/rcar_vin.c
@@ -105,6 +105,7 @@
 #define VIN_MAX_HEIGHT 2048
 
 enum chip_id {
+   RCAR_H2,
RCAR_H1,
RCAR_M1,
RCAR_E1,
@@ -300,7 +301,8 @@ static int rcar_vin_setup(struct rcar_vin_priv *priv)
dmr = 0;
break;
case V4L2_PIX_FMT_RGB32:
-   if (priv-chip == RCAR_H1 || priv-chip == RCAR_E1) {
+   if (priv-chip == RCAR_H2 || priv-chip == RCAR_H1 ||
+   priv-chip == RCAR_E1) {
dmr = VNDMR_EXRGB;
break;
}
@@ -1381,6 +1383,7 @@ static struct soc_camera_host_ops rcar_vin_host_ops = {
 };
 
 static struct platform_device_id rcar_vin_id_table[] = {
+   { r8a7790-vin,  RCAR_H2 },
{ r8a7779-vin,  RCAR_H1 },
{ r8a7778-vin,  RCAR_M1 },
{ uPD35004-vin, RCAR_E1 },
-- 
1.8.3.1

--
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 3/3] media: rcar_vin: Add RGB888_1X24 input format support

2013-09-24 Thread Valentine Barshak
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
---
 drivers/media/platform/soc_camera/rcar_vin.c | 12 ++--
 1 file changed, 10 insertions(+), 2 deletions(-)

diff --git a/drivers/media/platform/soc_camera/rcar_vin.c 
b/drivers/media/platform/soc_camera/rcar_vin.c
index cf81e02..0f04cff 100644
--- a/drivers/media/platform/soc_camera/rcar_vin.c
+++ b/drivers/media/platform/soc_camera/rcar_vin.c
@@ -68,6 +68,7 @@
 #define VNMC_INF_YUV8_BT656(0  16)
 #define VNMC_INF_YUV8_BT601(1  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)
@@ -235,7 +236,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:
@@ -269,11 +270,17 @@ static int rcar_vin_setup(struct rcar_vin_priv *priv)
case V4L2_MBUS_FMT_YUYV8_1X16:
/* BT.601/BT.1358 16bit YCbCr422 */
vnmc |= VNMC_INF_YUV16;
+   input_is_yuv = true;
break;
case V4L2_MBUS_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 V4L2_MBUS_FMT_RGB888_1X24:
+   vnmc |= VNMC_INF_RGB888;
+   break;
default:
break;
}
@@ -316,7 +323,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 */
@@ -1002,6 +1009,7 @@ static int rcar_vin_get_formats(struct soc_camera_device 
*icd, unsigned int idx,
switch (code) {
case V4L2_MBUS_FMT_YUYV8_1X16:
case V4L2_MBUS_FMT_YUYV8_2X8:
+   case V4L2_MBUS_FMT_RGB888_1X24:
if (cam-extra_fmt)
break;
 
-- 
1.8.3.1

--
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