Re: [PATCH v1] [media] atmel-isi: code cleanup

2017-05-22 Thread Wu, Songjun
onal on your side ? Hi Hugues, Thank you for your explanation. It does not affect the function, but since it is more natural to first enable the clock, then call s_stream, I think this patch has no problem. Best regards, Hugues. On 05/22/2017 07:02 AM, Wu, Songjun wrote: Hi Hugues, Thank y

Re: [PATCH v1] [media] atmel-isi: code cleanup

2017-05-21 Thread Wu, Songjun
Hi Hugues, Thank you for your patch. Is it necessary to ensure ISI is clocked before starting sensor sub device? On 5/19/2017 20:08, Hugues FRUCHET wrote: Adding Songjun and Ludovic as Atmel maintainers, sorry for inconvenience. On 05/19/2017 12:04 PM, Hugues Fruchet wrote: Ensure that ISI

Re: [PATCH] MAINTAINERS: update atmel-isi.c path

2017-04-04 Thread Wu, Songjun
On 4/3/2017 22:54, Hans Verkuil wrote: The driver moved to drivers/media/platform/atmel. Signed-off-by: Hans Verkuil --- After the atmel-isi v6 patch series this atmel-isi entry is no longer correct. Fixed. Songjun, I don't think Ludovic is still maintainer of this

Re: [PATCH] [media] atmel-isc: fix off-by-one comparison and out of bounds read issue

2017-03-13 Thread Wu, Songjun
On 3/13/2017 17:25, Hans Verkuil wrote: On 03/13/2017 06:53 AM, Wu, Songjun wrote: On 3/9/2017 18:57, Hans Verkuil wrote: Hi Songjun, On 08/03/17 03:25, Wu, Songjun wrote: Hi Colin, Thank you for your comment. It is a bug, will be fixed in the next patch. Do you mean that you

Re: [PATCH] [media] atmel-isc: fix off-by-one comparison and out of bounds read issue

2017-03-12 Thread Wu, Songjun
On 3/9/2017 18:57, Hans Verkuil wrote: Hi Songjun, On 08/03/17 03:25, Wu, Songjun wrote: Hi Colin, Thank you for your comment. It is a bug, will be fixed in the next patch. Do you mean that you will provide a new patch for this? Is there anything wrong with this patch? It seems reasonable

Re: [PATCH] [media] atmel-isc: fix off-by-one comparison and out of bounds read issue

2017-03-12 Thread Wu, Songjun
On 3/9/2017 19:50, Colin Ian King wrote: On 09/03/17 11:49, walter harms wrote: Am 09.03.2017 11:57, schrieb Hans Verkuil: Hi Songjun, On 08/03/17 03:25, Wu, Songjun wrote: Hi Colin, Thank you for your comment. It is a bug, will be fixed in the next patch. Do you mean that you

Re: [bug report] [media] atmel-isc: add the isc pipeline function

2017-03-07 Thread Wu, Songjun
Hi Dan, I understand now, thank you very much. On 3/8/2017 12:38, Dan Carpenter wrote: No. Imagine the v4l2_subdev_call() loop exits with "fmt" set to NULL. It will cause a crash. Please re-read my original email because I think you may have meant to reset fmt after that loop. regards, dan

Re: [bug report] [media] atmel-isc: add the isc pipeline function

2017-03-07 Thread Wu, Songjun
Hi Dan, Thank you very much for your bug report. Then I have question about 'error: we previously assumed 'fmt' could be null (see line 1480)' Do you mean that the code should be written like 'if (fmt == NULL)'? On 3/7/2017 08:17, Dan Carpenter wrote: 1476 while

Re: [PATCH] [media] atmel-isc: fix off-by-one comparison and out of bounds read issue

2017-03-07 Thread Wu, Songjun
Hi Colin, Thank you for your comment. It is a bug, will be fixed in the next patch. On 3/7/2017 22:30, Colin King wrote: From: Colin Ian King The are only HIST_ENTRIES worth of entries in hist_entry however the for-loop is iterating one too many times leasing to a

Re: [PATCH] [media] atmel-isc: add the isc pipeline function

2017-01-09 Thread Wu, Songjun
Hi Hans, Thank you for your comments. On 1/9/2017 20:10, Hans Verkuil wrote: + +static int isc_s_ctrl(struct v4l2_ctrl *ctrl) +{ + struct isc_device *isc = container_of(ctrl->handler, +struct isc_device, ctrls.handler); + struct isc_ctrls

Re: [RFC PATCH 6/7] atmel-isi: remove dependency of the soc-camera framework

2016-11-14 Thread Wu, Songjun
On 11/14/2016 16:19, Hans Verkuil wrote: Hi Songjun, On 10/19/2016 09:48 AM, Wu, Songjun wrote: On 10/19/2016 15:46, Hans Verkuil wrote: On 10/19/2016 09:36 AM, Wu, Songjun wrote: On 10/18/2016 18:58, Hans Verkuil wrote: On 10/18/16 11:21, Wu, Songjun wrote: Hi Hans, Do you have any

Re: [PATCH] [media] atmel-isc: release the filehandle if it's not the only one.

2016-11-01 Thread Wu, Songjun
with that? You should always be able to open the device multiple times. v4l2-compliance will fail after this patch. I'm not sure what you intended to do here, but this patch is wrong. Regards, Hans Signed-off-by: Songjun Wu <songjun...@microchip.com> --- drivers/media/platform/atmel

Re: [RFC PATCH 6/7] atmel-isi: remove dependency of the soc-camera framework

2016-10-19 Thread Wu, Songjun
On 10/18/2016 18:58, Hans Verkuil wrote: On 10/18/16 11:21, Wu, Songjun wrote: Hi Hans, Do you have any issue on this patch? ENOTIME :-( Could I give you some help? :) I would certainly help if you can make the requested change to this patch. Let me know if you want to do

Re: [RFC PATCH 6/7] atmel-isi: remove dependency of the soc-camera framework

2016-10-19 Thread Wu, Songjun
On 10/19/2016 15:46, Hans Verkuil wrote: On 10/19/2016 09:36 AM, Wu, Songjun wrote: On 10/18/2016 18:58, Hans Verkuil wrote: On 10/18/16 11:21, Wu, Songjun wrote: Hi Hans, Do you have any issue on this patch? ENOTIME :-( Could I give you some help? :) I would certainly help if you

Re: [RFC PATCH 6/7] atmel-isi: remove dependency of the soc-camera framework

2016-10-18 Thread Wu, Songjun
Hi Hans, Do you have any issue on this patch? Could I give you some help? :) On 9/23/2016 14:05, Wu, Songjun wrote: On 9/21/2016 15:04, Hans Verkuil wrote: On 08/18/2016 07:53 AM, Wu, Songjun wrote: Hi Hans, Thank you for the patch. On 8/17/2016 14:29, Hans Verkuil wrote: From: Hans

Re: [RFC PATCH 6/7] atmel-isi: remove dependency of the soc-camera framework

2016-09-23 Thread Wu, Songjun
On 9/21/2016 15:04, Hans Verkuil wrote: On 08/18/2016 07:53 AM, Wu, Songjun wrote: Hi Hans, Thank you for the patch. On 8/17/2016 14:29, Hans Verkuil wrote: From: Hans Verkuil <hans.verk...@cisco.com> This patch converts the atmel-isi driver from a soc-camera driver to a

Re: [PATCH 2/2] [media] atmel-isc: mark PM functions as __maybe_unused

2016-09-12 Thread Wu, Songjun
Hi Arnd, Thank you for your patch. I think it's better to add switch CONFIG_PM, but the PM feature is a must, or the ISC can not work, maybe the best choice is to add 'depends on PM' in Kconfig. #ifdef CONFIG_PM isc_runtime_suspend { XXX } isc_runtime_resume { XXX } static

Re: [RFC PATCH 6/7] atmel-isi: remove dependency of the soc-camera framework

2016-08-17 Thread Wu, Songjun
Hi Hans, Thank you for the patch. On 8/17/2016 14:29, Hans Verkuil wrote: From: Hans Verkuil This patch converts the atmel-isi driver from a soc-camera driver to a driver that is stand-alone. Signed-off-by: Hans Verkuil ---

Re: [PATCH v9 0/2] [media] atmel-isc: add driver for Atmel ISC

2016-08-15 Thread Wu, Songjun
On 8/15/2016 15:34, Hans Verkuil wrote: On 08/11/2016 09:06 AM, Songjun Wu wrote: The Image Sensor Controller driver includes two parts. 1) Driver code to implement the ISC function. 2) Device tree binding documentation, it describes how to add the ISC in device tree. So close...

Re: [PATCH v9 0/2] [media] atmel-isc: add driver for Atmel ISC

2016-08-15 Thread Wu, Songjun
On 8/15/2016 15:15, Hans Verkuil wrote: On 08/15/2016 08:09 AM, Wu, Songjun wrote: On 8/12/2016 15:32, Hans Verkuil wrote: One quick question: On 08/11/2016 09:06 AM, Songjun Wu wrote: The Image Sensor Controller driver includes two parts. 1) Driver code to implement the ISC function. 2

Re: [PATCH v9 0/2] [media] atmel-isc: add driver for Atmel ISC

2016-08-15 Thread Wu, Songjun
On 8/12/2016 15:32, Hans Verkuil wrote: One quick question: On 08/11/2016 09:06 AM, Songjun Wu wrote: The Image Sensor Controller driver includes two parts. 1) Driver code to implement the ISC function. 2) Device tree binding documentation, it describes how to add the ISC in device tree.

Re: [PATCH v8 1/2] [media] atmel-isc: add the Image Sensor Controller code

2016-08-10 Thread Wu, Songjun
a triple channel direct memory access controller master interface. Signed-off-by: Songjun Wu <songjun...@microchip.com> --- Changes in v8: - Power on the sensor on the first open in function 'isc_open'. - Power off the sensor on the last release in function 'isc_release'. - Remove the

Re: [PATCH v8 1/2] [media] atmel-isc: add the Image Sensor Controller code

2016-08-10 Thread Wu, Songjun
On 8/10/2016 15:12, Hans Verkuil wrote: On 08/10/2016 07:36 AM, Wu, Songjun wrote: On 8/8/2016 17:56, Hans Verkuil wrote: On 08/08/2016 11:37 AM, Hans Verkuil wrote: On 08/03/2016 10:08 AM, Songjun Wu wrote: Add driver for the Image Sensor Controller. It manages incoming data from

Re: [PATCH v8 1/2] [media] atmel-isc: add the Image Sensor Controller code

2016-08-08 Thread Wu, Songjun
a triple channel direct memory access controller master interface. Signed-off-by: Songjun Wu <songjun...@microchip.com> --- Changes in v8: - Power on the sensor on the first open in function 'isc_open'. - Power off the sensor on the last release in function 'isc_release'. - Remove the

Re: [PATCH v8 1/2] [media] atmel-isc: add the Image Sensor Controller code

2016-08-08 Thread Wu, Songjun
master interface. Signed-off-by: Songjun Wu <songjun...@microchip.com> --- Changes in v8: - Power on the sensor on the first open in function 'isc_open'. - Power off the sensor on the last release in function 'isc_release'. - Remove the switch of the pipeline. Changes in v7:

Re: [PATCH v7 1/2] [media] atmel-isc: add the Image Sensor Controller code

2016-08-02 Thread Wu, Songjun
On 8/2/2016 15:32, Hans Verkuil wrote: On 08/02/2016 08:20 AM, Wu, Songjun wrote: +static unsigned int sensor_preferred = 1; +module_param(sensor_preferred, uint, S_IRUGO|S_IWUSR); +MODULE_PARM_DESC(sensor_preferred, +"Sensor is preferred to output the specified form

Re: [PATCH v7 1/2] [media] atmel-isc: add the Image Sensor Controller code

2016-08-02 Thread Wu, Songjun
sensor. It has an internal image processor, also integrates a triple channel direct memory access controller master interface. Signed-off-by: Songjun Wu <songjun...@microchip.com> --- Changes in v7: - Add enum_framesizes and enum_frameintervals. - Call s_stream(0) when stream start fail.

Re: [PATCH v7 2/2] [media] atmel-isc: DT binding for Image Sensor Controller driver

2016-07-31 Thread Wu, Songjun
On 7/30/2016 05:44, Rob Herring wrote: On Fri, Jul 29, 2016 at 03:54:08PM +0800, Songjun Wu wrote: DT binding documentation for ISC driver. Signed-off-by: Songjun Wu <songjun...@microchip.com> --- Changes in v7: None Changes in v6: - Add "iscck" and "gck" to c

Re: [PATCH v6 0/2] [media] atmel-isc: add driver for Atmel ISC

2016-07-21 Thread Wu, Songjun
On 7/21/2016 16:41, Hans Verkuil wrote: On 07/21/2016 10:14 AM, Songjun Wu wrote: The Image Sensor Controller driver includes two parts. 1) Driver code to implement the ISC function. 2) Device tree binding documentation, it describes how to add the ISC in device tree. Test result with

Re: [PATCH v6 1/2] [media] atmel-isc: add the Image Sensor Controller code

2016-07-21 Thread Wu, Songjun
master interface. Signed-off-by: Songjun Wu <songjun...@microchip.com> --- Changes in v6: None Changes in v5: - Modify the macro definition and the related code. Changes in v4: - Modify the isc clock code since the dt is changed. Changes in v3: - Add pm runtime feature. - Modify the isc

Re: [PATCH v5 0/2] [media] atmel-isc: add driver for Atmel ISC

2016-07-03 Thread Wu, Songjun
On 7/1/2016 20:20, Hans Verkuil wrote: Hi Songjun, First of all, please CC patch 2/2 to linux-media as well the next time you post this. I only see 1/2 on the mailinglist, and we need both. Secondly, before I can accept it you need to run the v4l2-compliance test first and I need to see

Re: [PATCH 1/2] [media] atmel-isc: add the Image Sensor Controller code

2016-04-19 Thread Wu, Songjun
On 4/15/2016 00:21, Laurent Pinchart wrote: >+ return -EINVAL; >+ >+ parent_names = kcalloc(num_parents, sizeof(char *), GFP_KERNEL); >+ if (!parent_names) >+ return -ENOMEM; >+ >+ of_clk_parent_fill(np, parent_names, num_parents); >+ >+ init.parent_names =

Re: [PATCH 1/2] [media] atmel-isc: add the Image Sensor Controller code

2016-04-19 Thread Wu, Songjun
master interface. Signed-off-by: Songjun Wu <songjun...@atmel.com> Hi Songjun, Before this driver can be accepted it has to pass the v4l2-compliance test. The v4l2-compliance utility is here: git://linuxtv.org/v4l-utils.git Compile the utility straight from this repository so you're up t

Re: [PATCH 1/2] [media] atmel-isc: add the Image Sensor Controller code

2016-04-19 Thread Wu, Songjun
integrates a triple channel direct memory access controller master interface. Signed-off-by: Songjun Wu <songjun...@atmel.com> --- drivers/media/platform/Kconfig|1 + drivers/media/platform/Makefile |2 + drivers/media/platform/atmel/Kconfig

Re: [PATCH 1/2] [media] atmel-isc: add the Image Sensor Controller code

2016-04-18 Thread Wu, Songjun
On 4/14/2016 22:14, Laurent Pinchart wrote: Hello Songjun, On Thursday 14 Apr 2016 13:44:27 Wu, Songjun wrote: The option 'CONFIG_COMMON_CLK=y' is needed to add to '.config'. But I do not validate, '.config' will be generated automatically and overwritten when it is changed. Your driver's

Re: [PATCH 1/2] [media] atmel-isc: add the Image Sensor Controller code

2016-04-13 Thread Wu, Songjun
The option 'CONFIG_COMMON_CLK=y' is needed to add to '.config'. But I do not validate, '.config' will be generated automatically and overwritten when it is changed. On 4/14/2016 00:01, kbuild test robot wrote: Hi Songjun, [auto build test ERROR on linuxtv-media/master] [also build test ERROR

Re: [PATCH] atmel-isc: fix compare_const_fl.cocci warnings

2016-04-13 Thread Wu, Songjun
Accept. Thank you for your comments. On 4/13/2016 16:49, Julia Lawall wrote: Move constants to the right of binary operators. Generated by: scripts/coccinelle/misc/compare_const_fl.cocci CC: Songjun Wu <songjun...@atmel.com> Signed-off-by: Fengguang Wu <fengguang...@intel.com>

Re: [PATCH] atmel-isc: fix platform_no_drv_owner.cocci warnings

2016-04-13 Thread Wu, Songjun
Accept. Thank you for your comments. On 4/13/2016 16:46, Julia Lawall wrote: Remove .owner field if calls are used which set it automatically Generated by: scripts/coccinelle/api/platform_no_drv_owner.cocci CC: Songjun Wu <songjun...@atmel.com> Signed-off-by: Fengguang Wu <