Re: [PATCH 2/3] soc-camera/rcar-vin: remove obsolete driver

2016-08-15 Thread Hans Verkuil
On 08/02/2016 09:35 AM, Hans Verkuil wrote:
> 
> 
> On 08/01/2016 10:41 PM, Niklas Söderlund wrote:
>> On 2016-08-01 11:31:11 +0300, Laurent Pinchart wrote:
>>> Hi Hans,
>>>
>>> Thank you for the patch.
>>>
>>> On Monday 01 Aug 2016 09:54:24 Hans Verkuil wrote:
 From: Hans Verkuil 

 This driver has been replaced by the non-soc-camera rcar-vin driver.
 The soc-camera framework is being deprecated, so drop this older
 rcar-vin driver in favor of the newer version that does not rely on
 this deprecated framework.

 Signed-off-by: Hans Verkuil 
 Cc: Laurent Pinchart 
 Cc: Guennadi Liakhovetski 
 Cc: Niklas Söderlund 
>>>
>>> I'm all for removal of dead code :-)
>>>
>>> Acked-by: Laurent Pinchart 
>>>
>>> But please get Niklas' ack to confirm that the new driver supports all the 
>>> feature available in the old one.
>>
>> I'm all for removing this code. And I do believe the new driver supports 
>> (almost, see 1) all features this one do. There are however two known 
>> issues with the new driver which maybe should be resolved before the old 
>> one is removed.
>>
>> 1. The soc-camera driver call g_std to determine video standard if field 
>>is V4L2_FIELD_INTERLACED. The new driver dose not.
>>
>>I'm preparing a patch which restores this functionality and hope to 
>>post it soon.
> 
> Shouldn't be a problem to get that in for 4.9.
> 
>>
>> 2. There is a error in the DT parsing code where of_node_put() is called 
>>twice resulting in a nice backtrace while booting if the debug config 
>>options are enabled.
>>
>>There is a fix for this in the Gen3 enablement series but maybe I 
>>should break it out from there and post it separately?
> 
> Yes please. It sounds as if this should be backported to 4.8-rcX as well?

Just to be certain: no patches for these two issues have been posted yet,
right?

We're getting very close to being able to drop soc-camera as a framework, and
I'd love to finish that for 4.9.

Regards,

Hans

> 
>>
>> I would like to solve issue no 1 before we remove the soc-camera driver, 
>> hopefully we can do so shortly.
> 
> The removal of the old driver is for 4.9, so there is a lot of time.
> 
> Regards,
> 
>   Hans
> --
> 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 2/3] soc-camera/rcar-vin: remove obsolete driver

2016-08-02 Thread Hans Verkuil


On 08/01/2016 10:41 PM, Niklas Söderlund wrote:
> On 2016-08-01 11:31:11 +0300, Laurent Pinchart wrote:
>> Hi Hans,
>>
>> Thank you for the patch.
>>
>> On Monday 01 Aug 2016 09:54:24 Hans Verkuil wrote:
>>> From: Hans Verkuil 
>>>
>>> This driver has been replaced by the non-soc-camera rcar-vin driver.
>>> The soc-camera framework is being deprecated, so drop this older
>>> rcar-vin driver in favor of the newer version that does not rely on
>>> this deprecated framework.
>>>
>>> Signed-off-by: Hans Verkuil 
>>> Cc: Laurent Pinchart 
>>> Cc: Guennadi Liakhovetski 
>>> Cc: Niklas Söderlund 
>>
>> I'm all for removal of dead code :-)
>>
>> Acked-by: Laurent Pinchart 
>>
>> But please get Niklas' ack to confirm that the new driver supports all the 
>> feature available in the old one.
> 
> I'm all for removing this code. And I do believe the new driver supports 
> (almost, see 1) all features this one do. There are however two known 
> issues with the new driver which maybe should be resolved before the old 
> one is removed.
> 
> 1. The soc-camera driver call g_std to determine video standard if field 
>is V4L2_FIELD_INTERLACED. The new driver dose not.
> 
>I'm preparing a patch which restores this functionality and hope to 
>post it soon.

Shouldn't be a problem to get that in for 4.9.

> 
> 2. There is a error in the DT parsing code where of_node_put() is called 
>twice resulting in a nice backtrace while booting if the debug config 
>options are enabled.
> 
>There is a fix for this in the Gen3 enablement series but maybe I 
>should break it out from there and post it separately?

Yes please. It sounds as if this should be backported to 4.8-rcX as well?

> 
> I would like to solve issue no 1 before we remove the soc-camera driver, 
> hopefully we can do so shortly.

The removal of the old driver is for 4.9, so there is a lot of time.

Regards,

Hans
--
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 2/3] soc-camera/rcar-vin: remove obsolete driver

2016-08-01 Thread Niklas Söderlund
On 2016-08-01 11:31:11 +0300, Laurent Pinchart wrote:
> Hi Hans,
> 
> Thank you for the patch.
> 
> On Monday 01 Aug 2016 09:54:24 Hans Verkuil wrote:
> > From: Hans Verkuil 
> > 
> > This driver has been replaced by the non-soc-camera rcar-vin driver.
> > The soc-camera framework is being deprecated, so drop this older
> > rcar-vin driver in favor of the newer version that does not rely on
> > this deprecated framework.
> > 
> > Signed-off-by: Hans Verkuil 
> > Cc: Laurent Pinchart 
> > Cc: Guennadi Liakhovetski 
> > Cc: Niklas Söderlund 
> 
> I'm all for removal of dead code :-)
> 
> Acked-by: Laurent Pinchart 
> 
> But please get Niklas' ack to confirm that the new driver supports all the 
> feature available in the old one.

I'm all for removing this code. And I do believe the new driver supports 
(almost, see 1) all features this one do. There are however two known 
issues with the new driver which maybe should be resolved before the old 
one is removed.

1. The soc-camera driver call g_std to determine video standard if field 
   is V4L2_FIELD_INTERLACED. The new driver dose not.

   I'm preparing a patch which restores this functionality and hope to 
   post it soon.

2. There is a error in the DT parsing code where of_node_put() is called 
   twice resulting in a nice backtrace while booting if the debug config 
   options are enabled.

   There is a fix for this in the Gen3 enablement series but maybe I 
   should break it out from there and post it separately?

I would like to solve issue no 1 before we remove the soc-camera driver, 
hopefully we can do so shortly.

> 
> > ---
> >  drivers/media/platform/soc_camera/Kconfig|   10 -
> >  drivers/media/platform/soc_camera/Makefile   |1 -
> >  drivers/media/platform/soc_camera/rcar_vin.c | 1970 ---
> >  3 files changed, 1981 deletions(-)
> >  delete mode 100644 drivers/media/platform/soc_camera/rcar_vin.c
> 
> -- 
> Regards,
> 
> Laurent Pinchart
> 

-- 
Regards,
Niklas Söderlund
--
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 2/3] soc-camera/rcar-vin: remove obsolete driver

2016-08-01 Thread Laurent Pinchart
Hi Hans,

Thank you for the patch.

On Monday 01 Aug 2016 09:54:24 Hans Verkuil wrote:
> From: Hans Verkuil 
> 
> This driver has been replaced by the non-soc-camera rcar-vin driver.
> The soc-camera framework is being deprecated, so drop this older
> rcar-vin driver in favor of the newer version that does not rely on
> this deprecated framework.
> 
> Signed-off-by: Hans Verkuil 
> Cc: Laurent Pinchart 
> Cc: Guennadi Liakhovetski 
> Cc: Niklas Söderlund 

I'm all for removal of dead code :-)

Acked-by: Laurent Pinchart 

But please get Niklas' ack to confirm that the new driver supports all the 
feature available in the old one.

> ---
>  drivers/media/platform/soc_camera/Kconfig|   10 -
>  drivers/media/platform/soc_camera/Makefile   |1 -
>  drivers/media/platform/soc_camera/rcar_vin.c | 1970 ---
>  3 files changed, 1981 deletions(-)
>  delete mode 100644 drivers/media/platform/soc_camera/rcar_vin.c

-- 
Regards,

Laurent Pinchart

--
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 2/3] soc-camera/rcar-vin: remove obsolete driver

2016-08-01 Thread Hans Verkuil
From: Hans Verkuil 

This driver has been replaced by the non-soc-camera rcar-vin driver.
The soc-camera framework is being deprecated, so drop this older
rcar-vin driver in favor of the newer version that does not rely on
this deprecated framework.

Signed-off-by: Hans Verkuil 
Cc: Laurent Pinchart 
Cc: Guennadi Liakhovetski 
Cc: Niklas Söderlund 
---
 drivers/media/platform/soc_camera/Kconfig|   10 -
 drivers/media/platform/soc_camera/Makefile   |1 -
 drivers/media/platform/soc_camera/rcar_vin.c | 1970 --
 3 files changed, 1981 deletions(-)
 delete mode 100644 drivers/media/platform/soc_camera/rcar_vin.c

diff --git a/drivers/media/platform/soc_camera/Kconfig 
b/drivers/media/platform/soc_camera/Kconfig
index 39f6641..694cead 100644
--- a/drivers/media/platform/soc_camera/Kconfig
+++ b/drivers/media/platform/soc_camera/Kconfig
@@ -25,16 +25,6 @@ config VIDEO_PXA27x
---help---
  This is a v4l2 driver for the PXA27x Quick Capture Interface
 
-config VIDEO_RCAR_VIN_OLD
-   tristate "R-Car Video Input (VIN) support (DEPRECATED)"
-   depends on VIDEO_DEV && SOC_CAMERA
-   depends on ARCH_RENESAS || COMPILE_TEST
-   depends on HAS_DMA
-   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
diff --git a/drivers/media/platform/soc_camera/Makefile 
b/drivers/media/platform/soc_camera/Makefile
index 7703cb7..4407a9b 100644
--- a/drivers/media/platform/soc_camera/Makefile
+++ b/drivers/media/platform/soc_camera/Makefile
@@ -10,4 +10,3 @@ obj-$(CONFIG_VIDEO_ATMEL_ISI) += atmel-isi.o
 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_OLD)   += rcar_vin.o
diff --git a/drivers/media/platform/soc_camera/rcar_vin.c 
b/drivers/media/platform/soc_camera/rcar_vin.c
deleted file mode 100644
index 9c13752..000
--- a/drivers/media/platform/soc_camera/rcar_vin.c
+++ /dev/null
@@ -1,1970 +0,0 @@
-/*
- * SoC-camera host driver for Renesas R-Car VIN unit
- *
- * Copyright (C) 2011-2013 Renesas Solutions Corp.
- * Copyright (C) 2013 Cogent Embedded, Inc., 
- *
- * Based on V4L2 Driver for SuperH Mobile CEU interface 
"sh_mobile_ceu_camera.c"
- *
- * Copyright (C) 2008 Magnus Damm
- *
- * 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.
- */
-
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-
-#include "soc_scale_crop.h"
-
-#define DRV_NAME "rcar_vin"
-
-/* Register offsets for R-Car VIN */
-#define VNMC_REG   0x00/* Video n Main Control Register */
-#define VNMS_REG   0x04/* Video n Module Status Register */
-#define VNFC_REG   0x08/* Video n Frame Capture Register */
-#define VNSLPRC_REG0x0C/* Video n Start Line Pre-Clip Register */
-#define VNELPRC_REG0x10/* Video n End Line Pre-Clip Register */
-#define VNSPPRC_REG0x14/* Video n Start Pixel Pre-Clip Register */
-#define VNEPPRC_REG0x18/* Video n End Pixel Pre-Clip Register */
-#define VNSLPOC_REG0x1C/* Video n Start Line Post-Clip Register */
-#define VNELPOC_REG0x20/* Video n End Line Post-Clip Register */
-#define VNSPPOC_REG0x24/* Video n Start Pixel Post-Clip Register */
-#define VNEPPOC_REG0x28/* Video n End Pixel Post-Clip Register */
-#define VNIS_REG   0x2C/* Video n Image Stride Register */
-#define VNMB_REG(m)(0x30 + ((m) << 2)) /* Video n Memory Base m Register */
-#define VNIE_REG   0x40/* Video n Interrupt Enable Register */
-#define VNINTS_REG 0x44/* Video n Interrupt Status Register */
-#define VNSI_REG   0x48/* Video n Scanline Interrupt Register */
-#define VNMTC_REG  0x4C/* Video n Memory Transfer Control Register */
-#define VNYS_REG   0x50/* Video n Y Scale Register */
-#define VNXS_REG   0x54/* Video n X Scale Register */
-#define VNDMR_REG  0x58/* Video n Data Mode Register */
-#define VNDMR2_REG 0x5C/* Video n Data Mode Register 2 */
-#define VNUVAOF_REG0x60/* Video n UV Address Offset Register */
-#define VNC1A_REG  0x80/* Video n Coefficient Set C1A Register