Skip to contentSkip to conversation

V4L2: soc_camera: Renesas R-Car VIN driver

PATCH Superseded Sergei Shtylyov 4 participants 12 messages Jul 19, 2013 – Jul 30, 2013

Subsystems (3)

v8 of 9 Superseded Latest is v9 →

lore
Share & tools
lore
#0 lore raw

PATCH v8 1/1 V4L2: soc_camera: Renesas R-Car VIN driver

From: Vladimir Barinov <[email protected]>

Add Renesas R-Car VIN (Video In) V4L2 driver.

Based on the patch by Phil Edworthy <[email protected]>.

[Sergei: removed deprecated IRQF_DISABLED flag, reordered/renamed 'enum chip_id' values, reordered rcar_vin_id_table[] entries, removed senseless parens from to_buf_list() macro, used ALIGN() macro in rcar_vin_setup(), added {} to the *if* statement and used 'bool' values instead of 0/1 where necessary, removed unused macros, done some reformatting and clarified some comments.]

---
This patch is against the 'media_tree.git' repo.

Changes since version 7:
- remove 'icd' field from 'struct rcar_vin_priv' in accordance with the commit f7f6ce2d09c86bd80ee11bd654a1ac1e8f5dfe13 ([media] soc-camera: move common code to soc_camera.c);
- added mandatory clock_{start|stop}() methods in accordance with the commit a78fcc11264b824d9651b55abfeedd16d5cd8415 ([media] soc-camera: make .clock_ {start,stop} compulsory, .add / .remove optional).

Changes since version 6:
- sorted #include's alphabetically once again;
- BUG() on invalid format in rcar_vin_setup();
- used 'icd->sizeimage' instead of frame size calculation;
- moved WARN_ON() into the *if* condition and removed setting 'vb' to NULL in rcar_vin_remove_device();
- fixed 'packing' and 'layout' field values for 'fourcc' V4L2_PIX_FMT_NV16 in rcar_vin_formats[];
- made result handling logic more accurate in case subdevice does not support cropping;
- fixed scaling capability for pass-through pixel formats;
- resolved reject in the Makefile, refreshed the patch.

Changes since version 5:
- handled subdevice's inability to support cropping;
- set the field format depending on a video standard.

Changes since version 4:
- added "select SOC_CAMERA_SCALE_CROP" to Kconfig entry;
- added #include "soc_scale_crop.h", made use of the functions declared there instead of the analogous functions originally copied from the SH-Mobile CEU driver now that they have been placed in a module of their own, removing now unused private functions.

Changes since version 3:
- removed the driver's dependency on R-Car M1A/H1 SoCs from Kconfig;
- made the driver aware of the differences between R-Car E1/M1/H1 SoCs by having different platform device IDs for different SoCs, introcduced 'enum chips_id' to be used as the 'driver_data' field of 'struct platform_device_id' and then copied to the 'chip' field of 'struct rcar_vin_priv';
- sorted #include's alphabetically, added a number of #includes <media/v4l2-*>;
- removed the 'data_through' field of the 'struct rcar_vin_priv' and the pass- through logic from set_fmt() method;
- simplified is_continuous_transfer(), used it where applicable;
- removed senseless parens from to_buf_list() macro;
- removed the 'code' field from the 'struct rcar_vin_cam';
- largely rewrote the queue_setup() method;
- removed 'input_is_yuv' variable from rcar_vin_setup(), made 'progressive' and 'output_is_yuv' variables 'bool', and made setting VnDMR.EXRGB bit only happen on R-Car E1/H1 there;
- made use of ALIGN() macro in rcar_vin_setup() and rcar_vin_set_rect();
- fixed missing {} on one branch of the *if* statement in several places, added {} to the *if* statement where necessary;
- stopped saving/restoring flags when grabbing/dropping a spinlock in the buf_queue() and buf_cleanup() methods;
- made 'dsize' variable calculation depend on R-Car E1 in rcar_vin_set_rect()
- fix the continuous capturing to stop when there is no buffer to be set into the VnMBm registers in rcar_vin_irq();
- replaced BUG_ON() with WARN_ON() and *return* in the remove() method, also replaced pm_runtime_put_sync() with pm_runtime_put() there;
- removed size_dst() and calc_scale() as the calls to calc_scale() were also removed from the set_fmt() method;
- removed the VnMC register value check from capture_restore();
- removed 'cfg' variable initializers from set_bus_param() method and rcar_vin_try_bus_param();
- added bus width check to rcar_vin_try_bus_param();
- removed V4L2_PIX_FMT_YUYV format from rcar_vin_formats[], initialize 'layout' field of every element in this table;
- changed dev_err() call and *return* -EINVAL to dev_warn() and *return* 0 in the get_formats() method,
- added rcar_vin_packing_supported() and started handling pass-through mode in the get_formats() method;
- constified the parameters of is_smaller() and is_inside();
- redid the scaling logic so that it can't scale RGB32 data on R-Car E1 in the set_fmt() method, also stopped assigning to 'cam->code' there;
- started selecting the current format if soc_camera_xlate_by_fourcc() call failed in the try_fmt() method, also started letting 'soc-camera' calculate bytes-per-line and image size there;
- removed pm_runtime_resume() call from the driver's probe() method
- added setting of the 'timestamp_type' field to the init_videobuf2() method.

Changes since version 2:
- replaced Cyrillic characters in comments with the proper Latinic ones.

Changes since the original posting:
- added IRQF_SHARED flag in devm_request_irq() call (since on R8A7778 VIN0/1 share the same IRQ) and removed deprecated IRQF_DISABLED flag.

 drivers/media/platform/soc_camera/Kconfig    |    8 
 drivers/media/platform/soc_camera/Makefile   |    1 
 drivers/media/platform/soc_camera/rcar_vin.c | 1474 +++++++++++++++++++++++++++
 include/linux/platform_data/camera-rcar.h    |   25 
 4 files changed, 1508 insertions(+)
drivers/media/platform/soc_camera/Kconfig +8 -0
Index: media_tree/drivers/media/platform/soc_camera/Kconfig
===================================================================
@@ -44,6 +44,14 @@ config VIDEO_PXA27x
 	---help---
 	  This is a v4l2 driver for the PXA27x Quick Capture Interface
 
+config VIDEO_RCAR_VIN
+	tristate "R-Car Video Input (VIN) support"
+	depends on VIDEO_DEV && SOC_CAMERA
+	select VIDEOBUF2_DMA_CONTIG
+	select SOC_CAMERA_SCALE_CROP
+	---help---
+	  This is a v4l2 driver for the R-Car VIN Interface
+
 config VIDEO_SH_MOBILE_CSI2
 	tristate "SuperH Mobile MIPI CSI-2 Interface driver"
 	depends on VIDEO_DEV && SOC_CAMERA && HAVE_CLK
drivers/media/platform/soc_camera/Makefile +1 -0
Index: media_tree/drivers/media/platform/soc_camera/Makefile
===================================================================
@@ -14,3 +14,4 @@ obj-$(CONFIG_VIDEO_OMAP1)		+= omap1_came
 obj-$(CONFIG_VIDEO_PXA27x)		+= pxa_camera.o
 obj-$(CONFIG_VIDEO_SH_MOBILE_CEU)	+= sh_mobile_ceu_camera.o
 obj-$(CONFIG_VIDEO_SH_MOBILE_CSI2)	+= sh_mobile_csi2.o
+obj-$(CONFIG_VIDEO_RCAR_VIN)		+= rcar_vin.o
drivers/media/platform/soc_camera/rcar_vin.c new file +1474 -0

1,474 lines not on this page · raw message

include/linux/platform_data/camera-rcar.h new file +25 -0
Index: media_tree/include/linux/platform_data/camera-rcar.h
===================================================================
@@ -0,0 +1,25 @@
+/*
+ * Platform data for Renesas R-Car VIN soc-camera driver
+ *
+ * Copyright (C) 2011-2013 Renesas Solutions Corp.
+ * Copyright (C) 2013 Cogent Embedded, Inc., <[email protected]>
+ *
+ * This program is free software; you can redistribute  it and/or modify it
+ * under  the terms of  the GNU General  Public License as published by the
+ * Free Software Foundation;  either version 2 of the  License, or (at your
+ * option) any later version.
+ */
+
+#ifndef __CAMERA_RCAR_H_
+#define __CAMERA_RCAR_H_
+
+#define RCAR_VIN_HSYNC_ACTIVE_LOW	(1 << 0)
+#define RCAR_VIN_VSYNC_ACTIVE_LOW	(1 << 1)
+#define RCAR_VIN_BT601			(1 << 2)
+#define RCAR_VIN_BT656			(1 << 3)
+
+struct rcar_vin_platform_data {
+	unsigned int flags;
+};
+
+#endif /* __CAMERA_RCAR_H_ */
#1 lore raw

Hi Sergei, Vladimir

So, looks like we're almost there. checkpatch.pl looks pretty good too, I don't care about > 80 chars, Kconfig seems to be a dull one, have a look at msleep(1) warning whether it bothers you.

Quoted 25 lines · Sergei Shtylyov

From: Vladimir Barinov <[email protected]>

Add Renesas R-Car VIN (Video In) V4L2 driver.

Based on the patch by Phil Edworthy <[email protected]>.

[Sergei: removed deprecated IRQF_DISABLED flag, reordered/renamed 'enum chip_id' values, reordered rcar_vin_id_table[] entries, removed senseless parens from to_buf_list() macro, used ALIGN() macro in rcar_vin_setup(), added {} to the *if* statement and used 'bool' values instead of 0/1 where necessary, removed unused macros, done some reformatting and clarified some comments.]

---
This patch is against the 'media_tree.git' repo.

Changes since version 7:
- remove 'icd' field from 'struct rcar_vin_priv' in accordance with the commit f7f6ce2d09c86bd80ee11bd654a1ac1e8f5dfe13 ([media] soc-camera: move common code to soc_camera.c);
- added mandatory clock_{start|stop}() methods in accordance with the commit a78fcc11264b824d9651b55abfeedd16d5cd8415 ([media] soc-camera: make .clock_ {start,stop} compulsory, .add / .remove optional).

Quoted 3 lines

Changes since version 6:
- sorted #include's alphabetically once again;
- BUG() on invalid format in rcar_vin_setup();

No, please don't. I think I commented on the use of BUG() in this driver already. It shall only be used if the machine cannot continue to run. I don't think this is the sace here.

[snip]

Quoted 4 lines

Index: media_tree/drivers/media/platform/soc_camera/rcar_vin.c =================================> --- /dev/null
+++ media_tree/drivers/media/platform/soc_camera/rcar_vin.c

(quoted diff) +0 -0
@@ -0,0 +1,1474 @@

[snip]

Quoted 19 lines
drivers/media/platform/soc_camera/rcar_vin.c new file +19 -0
+	/* output format */
+	switch (icd->current_fmt->host_fmt->fourcc) {
+	case V4L2_PIX_FMT_NV16:
+		iowrite32(ALIGN(cam->width * cam->height, 0x80),
+			  priv->base + VNUVAOF_REG);
+		dmr = VNDMR_DTMD_YCSEP;
+		output_is_yuv = true;
+		break;
+	case V4L2_PIX_FMT_YUYV:
+		dmr = VNDMR_BPSM;
+		output_is_yuv = true;
+		break;
+	case V4L2_PIX_FMT_UYVY:
+		dmr = 0;
+		output_is_yuv = true;
+		break;
+	case V4L2_PIX_FMT_RGB555X:
+		dmr = VNDMR_DTMD_ARGB1555;
+		break;

drivers/media/platform/soc_camera/rcar_vin.c line 308

Quoted 10 lines
drivers/media/platform/soc_camera/rcar_vin.c new file +10 -0
+	case V4L2_PIX_FMT_RGB565:
+		dmr = 0;
+		break;
+	case V4L2_PIX_FMT_RGB32:
+		if (priv->chip = RCAR_H1 || priv->chip = RCAR_E1) {
+			dmr = VNDMR_EXRGB;
+			break;
+		}
+	default:
+		BUG();

as commented above, please, remove

[snip]

drivers/media/platform/soc_camera/rcar_vin.c line 638

Quoted 3 lines
drivers/media/platform/soc_camera/rcar_vin.c new file +3 -0
+/* Called with .host_lock held */
+static int rcar_vin_clock_start(struct soc_camera_host *ici)
+{

Ok, this looks suspicious to me, because all other drivers activate their master clock output here. Looking at the datasheet though it does look like VIN doesn't have a master clock output. In such a case maybe you could add a clarifying comment here. It might even be worth making these two callbacks optional too, but this is the only driver so far, that doesn't use them, so, let's keep it this way for now, just, please, add a comment.

Quoted 7 lines
drivers/media/platform/soc_camera/rcar_vin.c new file +7 -0
+	return 0;
+}
+
+/* Called with .host_lock held */
+static void rcar_vin_clock_stop(struct soc_camera_host *ici)
+{
+}

[snip]

drivers/media/platform/soc_camera/rcar_vin.c line 855

Quoted 6 lines
drivers/media/platform/soc_camera/rcar_vin.c new file +6 -0
+static const struct soc_mbus_pixelfmt rcar_vin_formats[] = {
+	{
+		.fourcc			= V4L2_PIX_FMT_NV16,
+		.name			= "NV16",
+		.bits_per_sample	= 16,
+		.packing		= SOC_MBUS_PACKING_2X8_PADHI,

ehem... you sample 16 bits and you say you have to sample 2 x 8 bits, something seems wrong to me.

Quoted 3 lines
drivers/media/platform/soc_camera/rcar_vin.c new file +3 -0
+		.order			= SOC_MBUS_ORDER_LE,
+		.layout			= SOC_MBUS_LAYOUT_PLANAR_Y_C,
+	},

[snip]

drivers/media/platform/soc_camera/rcar_vin.c line 1202

Quoted 10 lines
drivers/media/platform/soc_camera/rcar_vin.c new file +10 -0
+	ret = soc_camera_client_scale(icd, &cam->rect, &cam->subrect,
+				      &mf, &vin_sub_width, &vin_sub_height,
+				      can_scale, 12);
+
+	/* Done with the camera. Now see if we can improve the result */
+	dev_dbg(dev, "Camera %d fmt %ux%u, requested %ux%u\n",
+		ret, mf.width, mf.height, pix->width, pix->height);
+
+	if (ret = -ENOIOCTLCMD)
+		dev_dbg(dev, "Sensor doesn't support cropping\n");

You mean "scaling"

Thanks
Guennadi
---
Guennadi Liakhovetski, Ph.D.
Freelance Open-Source Software Developer
http://www.open-technology.de/

#2 lore raw

Hi Guennadi,

Thank you for the v8 review.

Quoted 23 lines · Guennadi Liakhovetski

[snip]

Quoted 22 lines
drivers/media/platform/soc_camera/rcar_vin.c new file +22 -0
+	/* output format */
+	switch (icd->current_fmt->host_fmt->fourcc) {
+	case V4L2_PIX_FMT_NV16:
+		iowrite32(ALIGN(cam->width * cam->height, 0x80),
+			  priv->base + VNUVAOF_REG);
+		dmr = VNDMR_DTMD_YCSEP;
+		output_is_yuv = true;
+		break;
+	case V4L2_PIX_FMT_YUYV:
+		dmr = VNDMR_BPSM;
+		output_is_yuv = true;
+		break;
+	case V4L2_PIX_FMT_UYVY:
+		dmr = 0;
+		output_is_yuv = true;
+		break;
+	case V4L2_PIX_FMT_RGB555X:
+		dmr = VNDMR_DTMD_ARGB1555;
+		break;
+	case V4L2_PIX_FMT_RGB565:
+		dmr = 0;
+		break;
Quoted 8 lines

drivers/media/platform/soc_camera/rcar_vin.c line 308

Quoted 7 lines
drivers/media/platform/soc_camera/rcar_vin.c new file +7 -0
+	case V4L2_PIX_FMT_RGB32:
+		if (priv->chip = RCAR_H1 || priv->chip = RCAR_E1) {
+			dmr = VNDMR_EXRGB;
+			break;
+		}
+	default:
+		BUG();

as commented above, please, remove

Does WARN_ON(1) work instead of removal?

Regards,
Vladimir

#3 lore raw

Hi Vladimir

Quoted 36 lines · Vladimir Barinov

Hi Guennadi,

Thank you for the v8 review.

Quoted 23 lines · Guennadi Liakhovetski

[snip]

Quoted 22 lines
drivers/media/platform/soc_camera/rcar_vin.c new file +22 -0
+	/* output format */
+	switch (icd->current_fmt->host_fmt->fourcc) {
+	case V4L2_PIX_FMT_NV16:
+		iowrite32(ALIGN(cam->width * cam->height, 0x80),
+			  priv->base + VNUVAOF_REG);
+		dmr = VNDMR_DTMD_YCSEP;
+		output_is_yuv = true;
+		break;
+	case V4L2_PIX_FMT_YUYV:
+		dmr = VNDMR_BPSM;
+		output_is_yuv = true;
+		break;
+	case V4L2_PIX_FMT_UYVY:
+		dmr = 0;
+		output_is_yuv = true;
+		break;
+	case V4L2_PIX_FMT_RGB555X:
+		dmr = VNDMR_DTMD_ARGB1555;
+		break;
+	case V4L2_PIX_FMT_RGB565:
+		dmr = 0;
+		break;
Quoted 8 lines

drivers/media/platform/soc_camera/rcar_vin.c line 308

Quoted 7 lines
drivers/media/platform/soc_camera/rcar_vin.c new file +7 -0
+	case V4L2_PIX_FMT_RGB32:
+		if (priv->chip = RCAR_H1 || priv->chip = RCAR_E1) {
+			dmr = VNDMR_EXRGB;
+			break;
+		}
+	default:
+		BUG();

as commented above, please, remove

Quoted 1 line

Does WARN_ON(1) work instead of removal?

Sorry, by "remove" I certainly meant replace with a proper handling, not just delete. In principle the above condition should never be entered, right? Also for fmt = V4L2_PIX_FMT_RGB32 but chip not one of RCAR_H1 or RCAR_E1? Well, this function is called from your driver's .buf_queue(), which doesn't return an error. But yes, I would make rcar_vin_setup() issue a warning and return an error and then, back in rcar_vin_videobuf_queue() return the buffer with an error code (goto error).

Thanks
Guennadi
---
Guennadi Liakhovetski, Ph.D.
Freelance Open-Source Software Developer
http://www.open-technology.de/

#4 lore raw
In reply to Guennadi Liakhovetski

Hello.

Quoted 25 lines · Guennadi Liakhovetski
Quoted 24 lines

From: Vladimir Barinov <[email protected]>

Add Renesas R-Car VIN (Video In) V4L2 driver.

Based on the patch by Phil Edworthy <[email protected]>.

[Sergei: removed deprecated IRQF_DISABLED flag, reordered/renamed 'enum chip_id' values, reordered rcar_vin_id_table[] entries, removed senseless parens from to_buf_list() macro, used ALIGN() macro in rcar_vin_setup(), added {} to the *if* statement and used 'bool' values instead of 0/1 where necessary, removed unused macros, done some reformatting and clarified some comments.]

---
This patch is against the 'media_tree.git' repo.

Changes since version 7:
- remove 'icd' field from 'struct rcar_vin_priv' in accordance with the commit f7f6ce2d09c86bd80ee11bd654a1ac1e8f5dfe13 ([media] soc-camera: move common code to soc_camera.c);
- added mandatory clock_{start|stop}() methods in accordance with the commit a78fcc11264b824d9651b55abfeedd16d5cd8415 ([media] soc-camera: make .clock_ {start,stop} compulsory, .add / .remove optional).

Quoted 7 lines
Quoted 3 lines

Changes since version 6:
- sorted #include's alphabetically once again;
- BUG() on invalid format in rcar_vin_setup();

No, please don't. I think I commented on the use of BUG() in this driver already. It shall only be used if the machine cannot continue to run. I don't think this is the sace here.

Note that sh_mobile_ceu_camera.c has BUG() in almost the same case.

WBR, Sergei

#5 lore raw
Quoted 41 lines · Sergei Shtylyov

Hello.

Quoted 36 lines · Guennadi Liakhovetski
Quoted 36 lines

From: Vladimir Barinov <[email protected]>

Add Renesas R-Car VIN (Video In) V4L2 driver.

Based on the patch by Phil Edworthy <[email protected]>.

[Sergei: removed deprecated IRQF_DISABLED flag, reordered/renamed 'enum chip_id'
values, reordered rcar_vin_id_table[] entries, removed senseless parens from
to_buf_list() macro, used ALIGN() macro in rcar_vin_setup(), added {} to the
*if* statement and used 'bool' values instead of 0/1 where necessary, removed
unused macros, done some reformatting and clarified some comments.]

---
This patch is against the 'media_tree.git' repo.

Changes since version 7:
- remove 'icd' field from 'struct rcar_vin_priv' in accordance with the commit
f7f6ce2d09c86bd80ee11bd654a1ac1e8f5dfe13 ([media] soc-camera: move
common code
to soc_camera.c);
- added mandatory clock_{start|stop}() methods in accordance with the commit
a78fcc11264b824d9651b55abfeedd16d5cd8415 ([media] soc-camera: make
.clock_
{start,stop} compulsory, .add / .remove optional).

Changes since version 6:
- sorted #include's alphabetically once again;
- BUG() on invalid format in rcar_vin_setup();

Quoted 5 lines
Quoted 3 lines

No, please don't. I think I commented on the use of BUG() in this driver already. It shall only be used if the machine cannot continue to run. I don't think this is the sace here.

Note that sh_mobile_ceu_camera.c has BUG() in almost the same case.

Yes, I know. Unfortunately, back then neither the author nor any of the reviewers realised, that that wasn't a good idea. That doesn't mean though we have to repeat old mistakes. Would be good to fix that (and probably multiple other) such occurrences.

Thanks
Guennadi
---
Guennadi Liakhovetski, Ph.D.
Freelance Open-Source Software Developer
http://www.open-technology.de/

#6 lore raw
In reply to Sergei Shtylyov

Hi Vladimir,

Thank you for the revised patch.

From: Sergei Shtylyov <[email protected]>
Date: Sat, 20 Jul 2013 03:14:34 +0400

Quoted 17 lines

From: Vladimir Barinov <[email protected]>

Add Renesas R-Car VIN (Video In) V4L2 driver.

Based on the patch by Phil Edworthy <[email protected]>.

[Sergei: removed deprecated IRQF_DISABLED flag, reordered/renamed 'enum chip_id' values, reordered rcar_vin_id_table[] entries, removed senseless parens from to_buf_list() macro, used ALIGN() macro in rcar_vin_setup(), added {} to the *if* statement and used 'bool' values instead of 0/1 where necessary, removed unused macros, done some reformatting and clarified some comments.]

---
This patch is against the 'media_tree.git' repo.

Quoted 7 lines

Changes since version 7:
- remove 'icd' field from 'struct rcar_vin_priv' in accordance with the commit f7f6ce2d09c86bd80ee11bd654a1ac1e8f5dfe13 ([media] soc-camera: move common code to soc_camera.c);
- added mandatory clock_{start|stop}() methods in accordance with the commit a78fcc11264b824d9651b55abfeedd16d5cd8415 ([media] soc-camera: make .clock_ {start,stop} compulsory, .add / .remove optional).

From: Vladimir Barinov <[email protected]>
Subject: Re: [PATCH v6] V4L2: soc_camera: Renesas R-Car VIN driver
Date: Sat, 22 Jun 2013 15:45:10 +0400

Quoted 5 lines
Quoted 3 lines

But, captured images are still incorrect that means wrong order of fields desite '_BT' chosen for V4L2_STD_525_60.

I've ordered the NTSC camera.
I will return once I get it.

Did you get an NTSC camera and see the field order issue occurs on your BOCK-W board?
You may want to consider adding a workaround into the VIN driver if the issue remains in the latest patch.

Thanks,
---
Katsuya Matsubara / IGEL Co., Ltd
[email protected]

#7 lore raw

Hi Matsubara-san,

Quoted 35 lines · Katsuya MATSUBARA

Hi Vladimir,

Thank you for the revised patch.

From: Sergei Shtylyov<[email protected]>
Date: Sat, 20 Jul 2013 03:14:34 +0400

Quoted 17 lines

From: Vladimir Barinov<[email protected]>

Add Renesas R-Car VIN (Video In) V4L2 driver.

Based on the patch by Phil Edworthy<[email protected]>.

[Sergei: removed deprecated IRQF_DISABLED flag, reordered/renamed 'enum chip_id' values, reordered rcar_vin_id_table[] entries, removed senseless parens from to_buf_list() macro, used ALIGN() macro in rcar_vin_setup(), added {} to the *if* statement and used 'bool' values instead of 0/1 where necessary, removed unused macros, done some reformatting and clarified some comments.]

---
This patch is against the 'media_tree.git' repo.

Quoted 7 lines

Changes since version 7:
- remove 'icd' field from 'struct rcar_vin_priv' in accordance with the commit f7f6ce2d09c86bd80ee11bd654a1ac1e8f5dfe13 ([media] soc-camera: move common code to soc_camera.c);
- added mandatory clock_{start|stop}() methods in accordance with the commit a78fcc11264b824d9651b55abfeedd16d5cd8415 ([media] soc-camera: make .clock_ {start,stop} compulsory, .add / .remove optional).

From: Vladimir Barinov<[email protected]>
Subject: Re: [PATCH v6] V4L2: soc_camera: Renesas R-Car VIN driver
Date: Sat, 22 Jun 2013 15:45:10 +0400

Quoted 7 lines
Quoted 5 lines
Quoted 3 lines

But, captured images are still incorrect that means wrong order of fields desite '_BT' chosen for V4L2_STD_525_60.

I've ordered the NTSC camera.
I will return once I get it.

Did you get an NTSC camera and see the field order issue occurs on your BOCK-W board?

Yes I did.

Quoted 2 lines

You may want to consider adding a workaround into the VIN driver if the issue remains in the latest patch.

Have you seen this patch https://linuxtv.org/patch/19278/ ?

Regards,
Vladimir

#8 lore raw

Hi Vladimir,

From: Vladimir Barinov <[email protected]>
Date: Thu, 25 Jul 2013 10:55:51 +0400

Quoted 49 lines

Hi Matsubara-san,

Quoted 46 lines · Katsuya MATSUBARA

Hi Vladimir,

Thank you for the revised patch.

From: Sergei Shtylyov<[email protected]>
Date: Sat, 20 Jul 2013 03:14:34 +0400

Quoted 21 lines

From: Vladimir Barinov<[email protected]>

Add Renesas R-Car VIN (Video In) V4L2 driver.

Based on the patch by Phil Edworthy<[email protected]>.

[Sergei: removed deprecated IRQF_DISABLED flag, reordered/renamed 'enum chip_id'
values, reordered rcar_vin_id_table[] entries, removed senseless parens from
to_buf_list() macro, used ALIGN() macro in rcar_vin_setup(), added {} to the
*if* statement and used 'bool' values instead of 0/1 where necessary, *removed
unused macros, done some reformatting and clarified some comments.]

---
This patch is against the 'media_tree.git' repo.

Quoted 11 lines

Changes since version 7:
- remove 'icd' field from 'struct rcar_vin_priv' in accordance with the
- commit
f7f6ce2d09c86bd80ee11bd654a1ac1e8f5dfe13 ([media] soc-camera: move common code
to soc_camera.c);
- added mandatory clock_{start|stop}() methods in accordance with the
- commit
a78fcc11264b824d9651b55abfeedd16d5cd8415 ([media] soc-camera: make .clock_
{start,stop} compulsory, .add / .remove optional).

From: Vladimir Barinov<[email protected]>
Subject: Re: [PATCH v6] V4L2: soc_camera: Renesas R-Car VIN driver
Date: Sat, 22 Jun 2013 15:45:10 +0400

Quoted 3 lines
Quoted 3 lines

But, captured images are still incorrect that means wrong order of fields desite '_BT' chosen for V4L2_STD_525_60.

Quoted 8 lines
Quoted 4 lines
Quoted 2 lines

I've ordered the NTSC camera.
I will return once I get it.

Did you get an NTSC camera and see the field order issue occurs on your BOCK-W board?

Yes I did.

Quoted 2 lines

You may want to consider adding a workaround into the VIN driver if the issue remains in the latest patch.

Have you seen this patch https://linuxtv.org/patch/19278/ ?

Oh, I missed the mail.
I tested it now and confirmed the issue has gone!

Thank you for fixing it.
---
Katsuya Matsubara / IGEL Co., Ltd
[email protected]

#9 lore raw

Hello Matsubara-san

Quoted 59 lines · Katsuya MATSUBARA

Hi Vladimir,

From: Vladimir Barinov <[email protected]>
Date: Thu, 25 Jul 2013 10:55:51 +0400

Quoted 53 lines

Hi Matsubara-san,

Quoted 50 lines · Katsuya MATSUBARA

Hi Vladimir,

Thank you for the revised patch.

From: Sergei Shtylyov<[email protected]>
Date: Sat, 20 Jul 2013 03:14:34 +0400

Quoted 21 lines

From: Vladimir Barinov<[email protected]>

Add Renesas R-Car VIN (Video In) V4L2 driver.

Based on the patch by Phil Edworthy<[email protected]>.

[Sergei: removed deprecated IRQF_DISABLED flag, reordered/renamed 'enum chip_id'
values, reordered rcar_vin_id_table[] entries, removed senseless parens from
to_buf_list() macro, used ALIGN() macro in rcar_vin_setup(), added {} to the
*if* statement and used 'bool' values instead of 0/1 where necessary, *removed
unused macros, done some reformatting and clarified some comments.]

---
This patch is against the 'media_tree.git' repo.

Quoted 11 lines

Changes since version 7:
- remove 'icd' field from 'struct rcar_vin_priv' in accordance with the
- commit
f7f6ce2d09c86bd80ee11bd654a1ac1e8f5dfe13 ([media] soc-camera: move common code
to soc_camera.c);
- added mandatory clock_{start|stop}() methods in accordance with the
- commit
a78fcc11264b824d9651b55abfeedd16d5cd8415 ([media] soc-camera: make .clock_
{start,stop} compulsory, .add / .remove optional).

From: Vladimir Barinov<[email protected]>
Subject: Re: [PATCH v6] V4L2: soc_camera: Renesas R-Car VIN driver
Date: Sat, 22 Jun 2013 15:45:10 +0400

Quoted 5 lines
Quoted 3 lines

But, captured images are still incorrect that means wrong order of fields desite '_BT' chosen for V4L2_STD_525_60.

I've ordered the NTSC camera.
I will return once I get it.

Did you get an NTSC camera and see the field order issue occurs on your BOCK-W board?

Quoted 7 lines
Quoted 4 lines

Yes I did.

Quoted 2 lines

You may want to consider adding a workaround into the VIN driver if the issue remains in the latest patch.

Have you seen this patch https://linuxtv.org/patch/19278/ ?

Oh, I missed the mail.
I tested it now and confirmed the issue has gone!

Does this mean I can add your Tested-by to v9 of this driver?

Quoted 4 lines

Thank you for fixing it.
---
Katsuya Matsubara / IGEL Co., Ltd
[email protected]

Thanks
Guennadi
---
Guennadi Liakhovetski, Ph.D.
Freelance Open-Source Software Developer
http://www.open-technology.de/

#10 lore raw

Hi Guennadi,

From: Guennadi Liakhovetski <[email protected]>
Date: Fri, 26 Jul 2013 13:11:52 +0200 (CEST)

Quoted 64 lines

Hello Matsubara-san

Quoted 60 lines · Katsuya MATSUBARA

Hi Vladimir,

From: Vladimir Barinov <[email protected]>
Date: Thu, 25 Jul 2013 10:55:51 +0400

Quoted 54 lines

Hi Matsubara-san,

Quoted 43 lines · Katsuya MATSUBARA

Hi Vladimir,

Thank you for the revised patch.

From: Sergei Shtylyov<[email protected]>
Date: Sat, 20 Jul 2013 03:14:34 +0400

Quoted 21 lines

From: Vladimir Barinov<[email protected]>

Add Renesas R-Car VIN (Video In) V4L2 driver.

Based on the patch by Phil Edworthy<[email protected]>.

[Sergei: removed deprecated IRQF_DISABLED flag, reordered/renamed 'enum chip_id'
values, reordered rcar_vin_id_table[] entries, removed senseless parens from
to_buf_list() macro, used ALIGN() macro in rcar_vin_setup(), added {} to the
*if* statement and used 'bool' values instead of 0/1 where necessary, *removed
unused macros, done some reformatting and clarified some comments.]

---
This patch is against the 'media_tree.git' repo.

Quoted 11 lines

Changes since version 7:
- remove 'icd' field from 'struct rcar_vin_priv' in accordance with the
- commit
f7f6ce2d09c86bd80ee11bd654a1ac1e8f5dfe13 ([media] soc-camera: move common code
to soc_camera.c);
- added mandatory clock_{start|stop}() methods in accordance with the
- commit
a78fcc11264b824d9651b55abfeedd16d5cd8415 ([media] soc-camera: make .clock_
{start,stop} compulsory, .add / .remove optional).

From: Vladimir Barinov<[email protected]>
Subject: Re: [PATCH v6] V4L2: soc_camera: Renesas R-Car VIN driver
Date: Sat, 22 Jun 2013 15:45:10 +0400

Quoted 7 lines
Quoted 5 lines
Quoted 3 lines

But, captured images are still incorrect that means wrong order of fields desite '_BT' chosen for V4L2_STD_525_60.

I've ordered the NTSC camera.
I will return once I get it.

Did you get an NTSC camera and see the field order issue occurs on your BOCK-W board?

Yes I did.

Quoted 8 lines
Quoted 6 lines
Quoted 3 lines
Quoted 2 lines

You may want to consider adding a workaround into the VIN driver if the issue remains in the latest patch.

Have you seen this patch https://linuxtv.org/patch/19278/ ?

Oh, I missed the mail.
I tested it now and confirmed the issue has gone!

Does this mean I can add your Tested-by to v9 of this driver?

Sure.

Unfortunately my marzen board has gone from my office. But I made sure that the v9 VIN driver and the fixed ml86v7667 sensor driver work fine on a BOCK-W board with a NTSC camera.

Thanks,
---
Katsuya Matsubara / IGEL Co. Ltd
[email protected]

#11 lore raw

Hi Matsubara-san,

Quoted 12 lines · Katsuya MATSUBARA

Hi Guennadi,

From: Guennadi Liakhovetski <[email protected]>
Date: Fri, 26 Jul 2013 13:11:52 +0200 (CEST)

Quoted 6 lines

Hello Matsubara-san

Quoted 2 lines · Katsuya MATSUBARA

Hi Vladimir,

[snip]

Quoted 11 lines
Quoted 3 lines
Quoted 1 line

I tested it now and confirmed the issue has gone!

Does this mean I can add your Tested-by to v9 of this driver?

Sure.

Unfortunately my marzen board has gone from my office. But I made sure that the v9 VIN driver and the fixed ml86v7667 sensor driver work fine on a BOCK-W board with a NTSC camera.

Thanks!

Regards
Guennadi
---
Guennadi Liakhovetski, Ph.D.
Freelance Open-Source Software Developer
http://www.open-technology.de/