Re: [PATCH 1/4] media: ov5640: fix resolution update

2018-10-16 Thread Hugues FRUCHET
Hi Jacopo, On 10/15/2018 05:24 PM, jacopo mondi wrote: > Hi Hugues, > > On Mon, Oct 15, 2018 at 03:13:12PM +0000, Hugues FRUCHET wrote: >> Hi Laurent, Jacopo, Sam, >> >> I'm also OK to change to a simpler alternative; >> - drop the "restore" step &

Re: [PATCH v4 12/12] ov5640: Enforce a mode change when changing the framerate

2018-10-16 Thread Hugues FRUCHET
You're welcome ;) On 10/16/2018 09:10 AM, Maxime Ripard wrote: > Hi Hugues, > > On Mon, Oct 15, 2018 at 01:57:40PM +0000, Hugues FRUCHET wrote: >> This is already fixed in media tree: >> 0929983e49c81c1d413702cd9b83bb06c4a2555c media: ov5640: fix framerate update >

Re: [PATCH 1/4] media: ov5640: fix resolution update

2018-10-15 Thread Hugues FRUCHET
Hi Laurent, Jacopo, Sam, I'm also OK to change to a simpler alternative; - drop the "restore" step - send the whole init register sequence + mode changes + format changes at streamon is this what you have in mind Laurent ? On 10/10/2018 02:41 PM, Laurent Pinchart wrote: > Hi Jacopo, > > On

Re: [PATCH v4 01/12] media: ov5640: Adjust the clock based on the expected rate

2018-10-15 Thread Hugues FRUCHET
Hi Maxime, I've recently found a problem around JPEG framerate, see below: On 10/11/2018 11:20 AM, Maxime Ripard wrote: > The clock structure for the PCLK is quite obscure in the documentation, and > was hardcoded through the bytes array of each and every mode. > > This is troublesome, since we

Re: [PATCH v4 12/12] ov5640: Enforce a mode change when changing the framerate

2018-10-15 Thread Hugues FRUCHET
Hi Maxime, This is already fixed in media tree: 0929983e49c81c1d413702cd9b83bb06c4a2555c media: ov5640: fix framerate update On 10/11/2018 11:21 AM, Maxime Ripard wrote: > The current logic only requires to call ov5640_set_mode, which will in turn > change the clock rates according to the mode

Re: [PATCH v3 00/12] media: ov5640: Misc cleanup and improvements

2018-10-04 Thread Hugues FRUCHET
Hi Maxime, On 10/04/2018 05:04 PM, Maxime Ripard wrote: > Hi! > > On Mon, Oct 01, 2018 at 02:12:31PM +0000, Hugues FRUCHET wrote: >>>> This is working perfectly fine on my parallel setup and allows me to >>>> well support VGA@30fps (instead 27) and also suppor

[PATCH] media: ov5640: fix framerate update

2018-10-04 Thread Hugues Fruchet
Changing framerate right before streamon had no effect, the new framerate value was taken into account only at next streamon, fix this. Signed-off-by: Hugues Fruchet --- drivers/media/i2c/ov5640.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers/media/i2c

Re: [PATCH 3/4] media: dt-bindings: media: Document pclk-max-frequency property

2018-10-01 Thread Hugues FRUCHET
Hi Sakari, On 09/28/2018 09:03 AM, Sakari Ailus wrote: > Hi Hugues, > > On Thu, Sep 27, 2018 at 04:46:06PM +0200, Hugues Fruchet wrote: >> This optional property aims to inform parallel video devices >> of the maximum pixel clock frequency admissible by host video >&

Re: [PATCH v3 00/12] media: ov5640: Misc cleanup and improvements

2018-10-01 Thread Hugues FRUCHET
Hi Maxime, On 09/28/2018 06:05 PM, Maxime Ripard wrote: > Hi Hugues, > > On Thu, Sep 27, 2018 at 03:59:04PM +0000, Hugues FRUCHET wrote: >> Hi Maxime & all OV5640 stakeholders, >> >> I've just pushed a new patchset also related to rate/pixel clock >> hand

Re: [PATCH v3 00/12] media: ov5640: Misc cleanup and improvements

2018-09-27 Thread Hugues FRUCHET
Hi Maxime & all OV5640 stakeholders, I've just pushed a new patchset also related to rate/pixel clock handling [1], based on your V3 great work: >media: ov5640: Adjust the clock based on the expected rate >media: ov5640: Remove the clocks registers initialization >media: ov5640:

[PATCH 2/4] media: v4l2-core: add pixel clock max frequency parallel port property

2018-09-27 Thread Hugues Fruchet
Add pclk-max-frequency property in parallel port endpoint in order to inform sensor of the maximum pixel clock frequency admissible by camera interface that is connected on. Signed-off-by: Hugues Fruchet --- drivers/media/v4l2-core/v4l2-fwnode.c | 3 +++ include/media/v4l2-fwnode.h

[PATCH 1/4] media: ov5640: move parallel port pixel clock divider out of registers set

2018-09-27 Thread Hugues Fruchet
Set DVP_PCLK_DIVIDER (0x3824) and VFIFO_CTRL0C (0x460c) registers in ov5640_set_dvp_pclk() according to mode selected. Signed-off-by: Hugues Fruchet --- drivers/media/i2c/ov5640.c | 66 -- 1 file changed, 46 insertions(+), 20 deletions(-) diff --git

[PATCH 0/4] OV5640: reduce rate according to maximum pixel clock

2018-09-27 Thread Hugues Fruchet
rchive.com/linux-media@vger.kernel.org/msg131655.html Hugues Fruchet (4): media: ov5640: move parallel port pixel clock divider out of registers set media: v4l2-core: add pixel clock max frequency parallel port property media: dt-bindings: media: Document pclk-max-frequency property med

[PATCH 4/4] media: ov5640: reduce rate according to maximum pixel clock frequency

2018-09-27 Thread Hugues Fruchet
Reduce parallel port rate according to maximum pixel clock frequency admissible by camera interface. This allows to support any resolutions/framerate requests by decreasing the framerate according to maximum camera interface capabilities. Signed-off-by: Hugues Fruchet --- drivers/media/i2c

[PATCH 3/4] media: dt-bindings: media: Document pclk-max-frequency property

2018-09-27 Thread Hugues Fruchet
this constraint. Signed-off-by: Hugues Fruchet --- Documentation/devicetree/bindings/media/video-interfaces.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Documentation/devicetree/bindings/media/video-interfaces.txt b/Documentation/devicetree/bindings/media/video-interfaces.txt index

[PATCH] media: ov5640: use JPEG mode 3 for 720p

2018-09-24 Thread Hugues Fruchet
Change 720p JPEG mode to mode 3 as per other resolutions. Signed-off-by: Hugues Fruchet --- drivers/media/i2c/ov5640.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/media/i2c/ov5640.c b/drivers/media/i2c/ov5640.c index 30b15e9..664ffac 100644 --- a/drivers/media

Re: [PATCH v3 0/5] Fix OV5640 exposure & gain

2018-09-24 Thread Hugues FRUCHET
Hi Sakari, >> thanks for handling this >> >> On Sun, Sep 16, 2018 at 02:02:30AM +0300, Sakari Ailus wrote: >>> Hi Jacopo, Hugues, >>> >>> On Fri, Sep 14, 2018 at 06:07:12PM +0200, jacopo mondi wrote: >>>> Hi Sakari, >>>> >>>> On

[PATCH v3 4/5] media: ov5640: fix auto controls values when switching to manual mode

2018-09-11 Thread Hugues Fruchet
When switching from auto to manual mode, V4L2 core is calling g_volatile_ctrl() in manual mode in order to get the manual initial value. Remove the manual mode check/return to not break this behaviour. Signed-off-by: Hugues Fruchet --- drivers/media/i2c/ov5640.c | 4 1 file changed, 4

[PATCH v3 0/5] Fix OV5640 exposure & gain

2018-09-11 Thread Hugues Fruchet
/linux-media/msg139457.html version 2: - Fix patch 3/5 commit comment and rename binning function as per jacopo' suggestion: https://www.mail-archive.com/linux-media@vger.kernel.org/msg133272.html Hugues Fruchet (5): media: ov5640: fix exposure regression media: ov5640: fix auto gain &am

[PATCH v3 2/5] media: ov5640: fix auto gain & exposure when changing mode

2018-09-11 Thread Hugues Fruchet
Ensure that auto gain and auto exposure are well restored when changing mode. Signed-off-by: Hugues Fruchet --- drivers/media/i2c/ov5640.c | 96 ++ 1 file changed, 54 insertions(+), 42 deletions(-) diff --git a/drivers/media/i2c/ov5640.c b/drivers

[PATCH v3 3/5] media: ov5640: fix wrong binning value in exposure calculation

2018-09-11 Thread Hugues Fruchet
ov5640_set_mode_exposure_calc() is checking binning value but binning value read is buggy, fix this. Rename ov5640_binning_on() to ov5640_get_binning() as per other similar functions. Signed-off-by: Hugues Fruchet Reviewed-by: Laurent Pinchart --- drivers/media/i2c/ov5640.c | 8 1

[PATCH v3 1/5] media: ov5640: fix exposure regression

2018-09-11 Thread Hugues Fruchet
fixes: bf4a4b518c20 ("media: ov5640: Don't force the auto exposure state at start time"). Symptom was black image when capturing HD or 5Mp picture due to manual exposure set to 1 while it was intended to set autoexposure to "manual", fix this. Signed-off-by: Hugues Fruchet

[PATCH v3 5/5] media: ov5640: fix restore of last mode set

2018-09-11 Thread Hugues Fruchet
-by: Hugues Fruchet --- drivers/media/i2c/ov5640.c | 12 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/drivers/media/i2c/ov5640.c b/drivers/media/i2c/ov5640.c index c110a6a..427c2e7 100644 --- a/drivers/media/i2c/ov5640.c +++ b/drivers/media/i2c/ov5640.c @@ -225,6 +225,7

Re: [PATCH v6 0/3] Add support for MPEG-2 in DELTA video decoder

2018-09-11 Thread Hugues FRUCHET
Hi Hans, On 09/09/2018 11:38 AM, Hans Verkuil wrote: > Hi Hugues, > > On 04/28/2017 03:25 PM, Hugues Fruchet wrote: >> The patchset implements the MPEG-2 part of V4L2 unified low-level decoder >> API RFC [0] needed by stateless video decoders, ie decoders which require

Re: [PATCH v2 5/5] media: ov5640: fix restore of last mode set

2018-09-11 Thread Hugues FRUCHET
Hi Laurent, On 09/10/2018 10:56 PM, Laurent Pinchart wrote: > Hi Hugues, > > On Monday, 10 September 2018 18:14:45 EEST Hugues FRUCHET wrote: >> On 09/07/2018 04:18 PM, Laurent Pinchart wrote: >>> On Thursday, 16 August 2018 18:07:54 EEST Hugues FRUCHET wrote: >>>

Re: [PATCH v2 5/5] media: ov5640: fix restore of last mode set

2018-09-11 Thread Hugues FRUCHET
Hi Jacopo, On 08/25/2018 04:53 PM, jacopo mondi wrote: > Hi Hugues, > one more comment on this patch.. > > On Mon, Aug 13, 2018 at 12:19:46PM +0200, Hugues Fruchet wrote: >> Mode setting depends on last mode set, in particular >> because of exposure calculation when

Re: [PATCH v2 5/5] media: ov5640: fix restore of last mode set

2018-09-10 Thread Hugues FRUCHET
Hi Laurent, Steve, On 09/07/2018 04:18 PM, Laurent Pinchart wrote: > Hello Hugues, > > On Thursday, 16 August 2018 18:07:54 EEST Hugues FRUCHET wrote: >> On 08/16/2018 12:10 PM, jacopo mondi wrote: >>> On Mon, Aug 13, 2018 at 12:19:46PM +0200, Hugues Fruchet wrote: >&

Re: [PATCH v2 4/5] media: ov5640: fix auto controls values when switching to manual mode

2018-09-10 Thread Hugues FRUCHET
Hi Laurent, On 09/10/2018 12:46 PM, Laurent Pinchart wrote: > Hi Hugues, > > On Monday, 10 September 2018 13:23:41 EEST Hugues FRUCHET wrote: >> On 09/06/2018 03:31 PM, Laurent Pinchart wrote: >>> On Monday, 13 August 2018 13:19:45 EEST Hugues Fruchet wrote: >>&

Re: [PATCH v2 4/5] media: ov5640: fix auto controls values when switching to manual mode

2018-09-10 Thread Hugues FRUCHET
Hi Laurent, On 09/06/2018 03:31 PM, Laurent Pinchart wrote: > Hi Hugues, > > Thank you for the patch. > > On Monday, 13 August 2018 13:19:45 EEST Hugues Fruchet wrote: >> When switching from auto to manual mode, V4L2 core is calling >> g_volatile_ctrl() in manual mode

Re: [PATCH v2 5/5] media: ov5640: fix restore of last mode set

2018-08-16 Thread Hugues FRUCHET
Hi Jacopo, On 08/16/2018 12:10 PM, jacopo mondi wrote: > Hi Hugues, > thanks for the patch > > On Mon, Aug 13, 2018 at 12:19:46PM +0200, Hugues Fruchet wrote: >> Mode setting depends on last mode set, in particular >> because of exposure calculation when downscal

Re: [PATCH v2] media: ov5640: do not change mode if format or frame interval is unchanged

2018-08-16 Thread Hugues FRUCHET
Hi all, Please ignore this v2, the v1 was merged. I've just pushed a new patch which fixes the regression observed, see: https://www.mail-archive.com/linux-media@vger.kernel.org/msg134413.html Sorry for inconvenience. Best regards, Hugues. On 08/13/2018 11:21 AM, Hugues Fruchet wrote: > S

[PATCH] media: ov5640: fix mode change regression

2018-08-16 Thread Hugues Fruchet
initial value was set to JPEG, fix this. Signed-off-by: Hugues Fruchet --- drivers/media/i2c/ov5640.c | 21 - 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/drivers/media/i2c/ov5640.c b/drivers/media/i2c/ov5640.c index 071f4bc..2ddd86d 100644 --- a/drivers/media

[PATCH v2 1/5] media: ov5640: fix exposure regression

2018-08-13 Thread Hugues Fruchet
fixes: bf4a4b518c20 ("media: ov5640: Don't force the auto exposure state at start time"). Symptom was black image when capturing HD or 5Mp picture due to manual exposure set to 1 while it was intended to set autoexposure to "manual", fix this. Signed-off-by: Hugues Fruchet

[PATCH v2 0/5] Fix OV5640 exposure & gain

2018-08-13 Thread Hugues Fruchet
gain (int): min=0 max=1023 step=1 default=0 value=22 flags=inactive, volatile Note the "0" for auto exposure. === = history = === version 2: - Fix patch 3/5 commit comment and rename binning function as per jacopo' suggestion: https://www.mail-archive.com/linux-me

[PATCH v2 3/5] media: ov5640: fix wrong binning value in exposure calculation

2018-08-13 Thread Hugues Fruchet
ov5640_set_mode_exposure_calc() is checking binning value but binning value read is buggy, fix this. Rename ov5640_binning_on() to ov5640_get_binning() as per other similar functions. Signed-off-by: Hugues Fruchet --- drivers/media/i2c/ov5640.c | 8 1 file changed, 4 insertions(+), 4

[PATCH v2 4/5] media: ov5640: fix auto controls values when switching to manual mode

2018-08-13 Thread Hugues Fruchet
When switching from auto to manual mode, V4L2 core is calling g_volatile_ctrl() in manual mode in order to get the manual initial value. Remove the manual mode check/return to not break this behaviour. Signed-off-by: Hugues Fruchet --- drivers/media/i2c/ov5640.c | 4 1 file changed, 4

[PATCH v2 2/5] media: ov5640: fix auto gain & exposure when changing mode

2018-08-13 Thread Hugues Fruchet
Ensure that auto gain and auto exposure are well restored when changing mode. Signed-off-by: Hugues Fruchet --- drivers/media/i2c/ov5640.c | 96 ++ 1 file changed, 54 insertions(+), 42 deletions(-) diff --git a/drivers/media/i2c/ov5640.c b/drivers

[PATCH v2 5/5] media: ov5640: fix restore of last mode set

2018-08-13 Thread Hugues Fruchet
-by: Hugues Fruchet --- drivers/media/i2c/ov5640.c | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/drivers/media/i2c/ov5640.c b/drivers/media/i2c/ov5640.c index c110a6a..923cc30 100644 --- a/drivers/media/i2c/ov5640.c +++ b/drivers/media/i2c/ov5640.c @@ -225,6 +225,7 @@ struct

[PATCH v2] media: ov5640: do not change mode if format or frame interval is unchanged

2018-08-13 Thread Hugues Fruchet
Save load of mode registers array when V4L2 client sets a format or a frame interval which selects the same mode than the current one. Signed-off-by: Hugues Fruchet --- Version 2: - Fix fuzzy image because of JPEG default format not being changed according to new format selected, fix

Re: [PATCH 1/2] media: ov5640: Fix timings setup code

2018-08-07 Thread Hugues FRUCHET
Hi Jacopo, Thanks for this patch, when testing on my side I don't see special regression or enhancement with that fix, particularly on image quality (exposure, ...), do you have a test procedure that underline the issue ? For example on my side when I do 5Mp then QVGA capture, pictures are

Re: [PATCH 2/2] media: ov5640: Fix auto-exposure disabling

2018-08-07 Thread Hugues FRUCHET
Hi Jacopo, In serie "[PATCH 0/5] Fix OV5640 exposure & gain" https://www.mail-archive.com/linux-media@vger.kernel.org/msg133269.html I've tried to collect fixes around exposure/gain, not only the exposure regression and I would prefer to keep it consistent with the associated procedure test.

Re: [PATCH 3/5] media: ov5640: fix wrong binning value in exposure calculation

2018-07-04 Thread Hugues FRUCHET
: > Hi Hugues, > > On Wed, Jul 04, 2018 at 02:58:41PM +0200, Hugues Fruchet wrote: >> ov5640_set_mode_exposure_calc() is checking binning value but >> binning value read is buggy and binning value set is done >> after calling ov5640_set_mo

[PATCH] media: ov5640: do not change mode if format or frame interval is unchanged

2018-07-04 Thread Hugues Fruchet
Save load of mode registers array when V4L2 client sets a format or a frame interval which selects the same mode than the current one. Signed-off-by: Hugues Fruchet --- drivers/media/i2c/ov5640.c | 14 +- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/drivers/media

[PATCH 4/5] media: ov5640: fix auto controls values when switching to manual mode

2018-07-04 Thread Hugues Fruchet
When switching from auto to manual mode, V4L2 core is calling g_volatile_ctrl() in manual mode in order to get the manual initial value. Remove the manual mode check/return to not break this behaviour. Signed-off-by: Hugues Fruchet --- drivers/media/i2c/ov5640.c | 4 1 file changed, 4

[PATCH 3/5] media: ov5640: fix wrong binning value in exposure calculation

2018-07-04 Thread Hugues Fruchet
ov5640_set_mode_exposure_calc() is checking binning value but binning value read is buggy and binning value set is done after calling ov5640_set_mode_exposure_calc(), fix all of this. Signed-off-by: Hugues Fruchet --- drivers/media/i2c/ov5640.c | 4 ++-- 1 file changed, 2 insertions(+), 2

[PATCH 0/5] Fix OV5640 exposure & gain

2018-07-04 Thread Hugues Fruchet
t: $> v4l2-ctl --set-ctrl=gain_automatic=1 $> v4l2-ctl --set-ctrl=auto_exposure=0 $> v4l2-ctl --all | grep -e exposure -e gain | grep "(int)" exposure (int): min=0 max=65535 step=1 default=0 value=330 flags=inactive, volatile gain

[PATCH 5/5] media: ov5640: fix restore of last mode set

2018-07-04 Thread Hugues Fruchet
-by: Hugues Fruchet --- drivers/media/i2c/ov5640.c | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/drivers/media/i2c/ov5640.c b/drivers/media/i2c/ov5640.c index a307f1e..f3fb140 100644 --- a/drivers/media/i2c/ov5640.c +++ b/drivers/media/i2c/ov5640.c @@ -225,6 +225,7 @@ struct

[PATCH 2/5] media: ov5640: fix auto gain & exposure when changing mode

2018-07-04 Thread Hugues Fruchet
Ensure that auto gain and auto exposure are well restored when changing mode. Signed-off-by: Hugues Fruchet --- drivers/media/i2c/ov5640.c | 96 ++ 1 file changed, 54 insertions(+), 42 deletions(-) diff --git a/drivers/media/i2c/ov5640.c b/drivers

[PATCH 1/5] media: ov5640: fix exposure regression

2018-07-04 Thread Hugues Fruchet
fixes: bf4a4b518c20 ("media: ov5640: Don't force the auto exposure state at start time"). Symptom was black image when capturing HD or 5Mp picture due to manual exposure set to 1 while it was intended to set autoexposure to "manual", fix this. Signed-off-by: Hugues Fruchet

Re: [PATCH] v4l2-ctrls.c: fix broken auto cluster handling

2018-07-02 Thread Hugues FRUCHET
. However, has_changed was never set to > true, so new_to_cur didn't actually copy this value. > > Signed-off-by: Hans Verkuil > Reported-by: Hugues FRUCHET Tested-by: Hugues FRUCHET > --- > diff --git a/drivers/media/v4l2-core/v4l2-ctrls.c > b/drivers/media/v4l2-core/v4l

[PATCH v4] media: ov5640: fix frame interval enumeration

2018-06-21 Thread Hugues Fruchet
): found frame intervals for invalid size 177x144 test VIDIOC_ENUM_FMT/FRAMESIZES/FRAMEINTERVALS: FAIL Signed-off-by: Hugues Fruchet --- version 2: - revisit patch according to Mauro comments: See https://www.mail-archive.com/linux-media@vger.kernel.org/msg127380.html version 3

[PATCH v3] media: ov5640: fix frame interval enumeration

2018-06-20 Thread Hugues Fruchet
): found frame intervals for invalid size 177x144 test VIDIOC_ENUM_FMT/FRAMESIZES/FRAMEINTERVALS: FAIL Signed-off-by: Hugues Fruchet --- version 2: - revisit patch according to Mauro comments: See https://www.mail-archive.com/linux-media@vger.kernel.org/msg127380.html version 3

[PATCH v2 0/3] OV5640 hflip, vflip and module orientation support

2018-06-18 Thread Hugues Fruchet
- Fix remarks from Rob Hering on devicetree part (new commit for binding and reference to video-interfaces.txt common bindings): https://www.spinics.net/lists/linux-media/msg136048.html Hugues Fruchet (3): media: ov5640: add HFLIP/VFLIP controls support dt-bindings: ov5640: Add &qu

[PATCH v2 1/3] media: ov5640: add HFLIP/VFLIP controls support

2018-06-18 Thread Hugues Fruchet
logic is so inversed in REG21 register to cancel this effect. Signed-off-by: Hugues Fruchet --- drivers/media/i2c/ov5640.c | 103 + 1 file changed, 85 insertions(+), 18 deletions(-) diff --git a/drivers/media/i2c/ov5640.c b/drivers/media/i2c/ov5640.c

[PATCH v2 3/3] media: ov5640: add support of module orientation

2018-06-18 Thread Hugues Fruchet
Add support of module being physically mounted upside down. In this case, mirror and flip are enabled to fix captured images orientation. Signed-off-by: Hugues Fruchet --- drivers/media/i2c/ov5640.c | 28 ++-- 1 file changed, 26 insertions(+), 2 deletions(-) diff --git

[PATCH v2 2/3] dt-bindings: ov5640: Add "rotation" property

2018-06-18 Thread Hugues Fruchet
Add the rotation property to the list of optional properties for the OV5640 camera sensor. Signed-off-by: Hugues Fruchet --- Documentation/devicetree/bindings/media/i2c/ov5640.txt | 5 + 1 file changed, 5 insertions(+) diff --git a/Documentation/devicetree/bindings/media/i2c/ov5640.txt b

Re: [PATCH 2/2] media: ov5640: add support of module orientation

2018-06-13 Thread Hugues FRUCHET
Hi Sakari, Rob, Find a new proposal below: On 06/13/2018 10:24 AM, Sakari Ailus wrote: > On Wed, Jun 13, 2018 at 08:10:02AM +0000, Hugues FRUCHET wrote: >> Hi Rob, thanks for review, >> >> On 06/13/2018 12:06 AM, Rob Herring wrote: >>> On Mon, Jun 11, 2018 at 11

Re: [PATCH 2/2] media: ov5640: add support of module orientation

2018-06-13 Thread Hugues FRUCHET
Hi Rob, thanks for review, On 06/13/2018 12:06 AM, Rob Herring wrote: > On Mon, Jun 11, 2018 at 11:29:17AM +0200, Hugues Fruchet wrote: >> Add support of module being physically mounted upside down. >> In this case, mirror and flip are enabled to fix captured images >> orie

Re: [PATCH 2/2] media: ov5640: add support of module orientation

2018-06-11 Thread Hugues FRUCHET
Hi Sakari, I'm fine with the change to dev_fwnode(>dev). Many thanks Sakari, Hugues. On 06/11/2018 12:10 PM, Sakari Ailus wrote: > On Mon, Jun 11, 2018 at 11:29:17AM +0200, Hugues Fruchet wrote: >> Add support of module being physically mounted upside down. >> In this cas

[PATCH] media: stm32-dcmi: revisit stop streaming ops

2018-06-11 Thread Hugues Fruchet
Do not wait for interrupt completion when stopping streaming, stopping sensor and disabling interruptions are enough. Signed-off-by: Hugues Fruchet --- drivers/media/platform/stm32/stm32-dcmi.c | 29 + 1 file changed, 1 insertion(+), 28 deletions(-) diff --git

[PATCH 3/4] media: stm32-dcmi: clarify state logic on buffer starvation

2018-06-11 Thread Hugues Fruchet
Introduce WAIT_FOR_BUFFER state instead of "active" field checking to manage buffer starvation case. Signed-off-by: Hugues Fruchet --- drivers/media/platform/stm32/stm32-dcmi.c | 11 --- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/drivers/media/platform/s

[PATCH] media: stm32-dcmi: code cleanup

2018-06-11 Thread Hugues Fruchet
Minor non-functional fixes around comments, variable namings and trace point enhancement. Signed-off-by: Hugues Fruchet --- drivers/media/platform/stm32/stm32-dcmi.c | 18 -- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/drivers/media/platform/stm32/stm32-dcmi.c

[PATCH 0/4] Revisit and fix DCMI buffers handling

2018-06-11 Thread Hugues Fruchet
Revisit and fix DCMI buffers handling. Hugues Fruchet (4): media: stm32-dcmi: do not fall into error on buffer starvation media: stm32-dcmi: return buffer in error state on dma error media: stm32-dcmi: clarify state logic on buffer starvation media: stm32-dcmi: revisit buffer list

[PATCH 1/4] media: stm32-dcmi: do not fall into error on buffer starvation

2018-06-11 Thread Hugues Fruchet
Return silently instead of falling into error when running out of available buffers when restarting capture. Capture will be restarted when new buffers will be provided by V4L2 client. Signed-off-by: Hugues Fruchet --- drivers/media/platform/stm32/stm32-dcmi.c | 7 ++- 1 file changed, 2

[PATCH 2/4] media: stm32-dcmi: return buffer in error state on dma error

2018-06-11 Thread Hugues Fruchet
Return buffer to V4L2 in error state if DMA error occurs. Signed-off-by: Hugues Fruchet --- drivers/media/platform/stm32/stm32-dcmi.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/media/platform/stm32/stm32-dcmi.c b/drivers/media/platform/stm32/stm32-dcmi.c index a3fbfac

[PATCH 4/4] media: stm32-dcmi: revisit buffer list management

2018-06-11 Thread Hugues Fruchet
Cleanup "active" field usage and enhance list management to avoid exceptions when releasing buffers on error or stopping streaming. Signed-off-by: Hugues Fruchet --- drivers/media/platform/stm32/stm32-dcmi.c | 65 +++ 1 file changed, 31 insertions(+), 34

[PATCH] media: stm32-dcmi: increase max width/height to 2592

2018-06-11 Thread Hugues Fruchet
DCMI can capture 5Mp raw frames, increase limit accordingly. Signed-off-by: Hugues Fruchet --- drivers/media/platform/stm32/stm32-dcmi.c | 19 --- 1 file changed, 4 insertions(+), 15 deletions(-) diff --git a/drivers/media/platform/stm32/stm32-dcmi.c b/drivers/media/platform

[PATCH] media: stm32-dcmi: add power saving support

2018-06-11 Thread Hugues Fruchet
Implements runtime & system sleep power management ops. Signed-off-by: Hugues Fruchet --- drivers/media/platform/stm32/stm32-dcmi.c | 80 --- 1 file changed, 64 insertions(+), 16 deletions(-) diff --git a/drivers/media/platform/stm32/stm32-dcmi.c b/drivers/m

[PATCH 2/2] media: ov5640: add support of module orientation

2018-06-11 Thread Hugues Fruchet
Add support of module being physically mounted upside down. In this case, mirror and flip are enabled to fix captured images orientation. Signed-off-by: Hugues Fruchet --- .../devicetree/bindings/media/i2c/ov5640.txt | 3 +++ drivers/media/i2c/ov5640.c | 28

[PATCH 0/2] OV5640 hflip, vflip and module orientation support

2018-06-11 Thread Hugues Fruchet
orm driver of the physical orientation of the sensor module through devicetree "rotation" optional properties as defined by Sakari in media/video-interfaces.txt: https://www.mail-archive.com/linux-media@vger.kernel.org/msg132345.html Hugues Fruchet (2): media: ov5640: add HFLIP/VFLIP cont

[PATCH 1/2] media: ov5640: add HFLIP/VFLIP controls support

2018-06-11 Thread Hugues Fruchet
logic is so inversed in REG21 register to cancel this effect. Signed-off-by: Hugues Fruchet --- drivers/media/i2c/ov5640.c | 103 + 1 file changed, 85 insertions(+), 18 deletions(-) diff --git a/drivers/media/i2c/ov5640.c b/drivers/media/i2c/ov5640.c

Re: [PATCH v2 11/12] media: ov5640: Add 60 fps support

2018-05-17 Thread Hugues FRUCHET
Hi Maxime, Thanks for fixes ! No special modification of v4l2-ctl, I'm using currently v4l-utils 1.12.3. What output do you have ? Best regards, Hugues. On 05/17/2018 10:52 AM, Maxime Ripard wrote: > Hi Hugues, > > On Tue, May 15, 2018 at 01:33:55PM +0000, Hugues FRUCHET wrote: >

Re: [PATCH v2 11/12] media: ov5640: Add 60 fps support

2018-05-15 Thread Hugues FRUCHET
Hi Maxime, I've taken the whole serie and made some tests on STM32 platform using DVP parallel interface. Now JPEG is OK and I've not seen any regressions appart on framerate control linked to this current patchset. Here are issues observed around framerate control: 1) Framerate enumeration is

Re: [PATCH 10/12] media: ov5640: Enhance FPS handling

2018-03-13 Thread Hugues FRUCHET
Hi Maxime, See below comments related to format compliance failing. On 03/02/2018 03:34 PM, Maxime Ripard wrote: > Now that we have moved the clock generation logic out of the bytes array, > these arrays are identical between the 15fps and 30fps variants. > > Remove the duplicate entries, and

Re: [PATCH 11/12] media: ov5640: Add 60 fps support

2018-03-13 Thread Hugues FRUCHET
Hi Maxime, See below rest of comments regarding framerate and compliance failure. On 03/02/2018 03:34 PM, Maxime Ripard wrote: > Now that we have everything in place to compute the clock rate at runtime, > we can enable the 60fps framerate for the mode we tested it with. > > Signed-off-by:

Re: [PATCH 00/12] media: ov5640: Misc cleanup and improvements

2018-03-13 Thread Hugues FRUCHET
Thanks Maxime for this great series ! I've tested this series successfully on STM32 platform, I had a regression on JPEG capture linked to revisit of clocking, but easy to fix. I had another problem claimed by v4l2-compliance on format tests: v4l2-test-formats.cpp(961): Video Capture:

Re: [PATCH 09/12] media: ov5640: Compute the clock rate at runtime

2018-03-13 Thread Hugues FRUCHET
Hi Maxime, Below comments about JPEG issue. On 03/02/2018 03:34 PM, Maxime Ripard wrote: > The clock rate, while hardcoded until now, is actually a function of the > resolution, framerate and bytes per pixel. Now that we have an algorithm to > adjust our clock rate, we can select it dynamically

Re: [PATCH] media: ov5640: add missing output pixel format setting

2018-03-12 Thread Hugues FRUCHET
s the missing output pixel format setting in the > ov5640_restore_mode() that is called when the device is powered on. > > Cc: Steve Longerbeam <slongerb...@gmail.com> > Cc: Hugues Fruchet <hugues.fruc...@st.com> > Cc: Sakari Ailus <sakari.ai...@linux.intel.com> &

Re: [PATCH] media: ov5640: fix frame interval enumeration

2018-03-08 Thread Hugues FRUCHET
Hi Mauro, Thanks for review, I've just sent a v2 to rearrange code as per your suggestion and also add a NULL test case for mode even if this should not happen. Best regards, Hugues. On 03/08/2018 11:46 AM, Mauro Carvalho Chehab wrote: > Em Thu, 8 Mar 2018 07:39:09 -0300 > Mauro Carvalho

[PATCH v2] media: ov5640: fix frame interval enumeration

2018-03-08 Thread Hugues Fruchet
): found frame intervals for invalid size 177x144 test VIDIOC_ENUM_FMT/FRAMESIZES/FRAMEINTERVALS: FAIL Signed-off-by: Hugues Fruchet <hugues.fruc...@st.com> --- version 2: - revisit patch according to Mauro comments: See https://www.mail-archive.com/linux-media@vger.kernel.org/msg

[PATCH v2] media: stm32-dcmi: rework overrun/error case

2018-03-08 Thread Hugues Fruchet
, this slows down system and lead to more overrun errors. Use a counter instead and log errors at stop streaming. Signed-off-by: Hugues Fruchet <hugues.fruc...@st.com> --- version 2: - typo: remove blank line at the end of stop_streaming() drivers/media/platform/stm32/stm32-dcmi.

[PATCH] media: ov5640: fix frame interval enumeration

2018-03-08 Thread Hugues Fruchet
): found frame intervals for invalid size 177x144 test VIDIOC_ENUM_FMT/FRAMESIZES/FRAMEINTERVALS: FAIL Signed-off-by: Hugues Fruchet <hugues.fruc...@st.com> --- drivers/media/i2c/ov5640.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/media/i2c/ov5640.c b/drivers/media/i2c/ov

Re: [PATCH] media: ov5640: fix get_/set_fmt colorspace related fields

2018-03-08 Thread Hugues FRUCHET
Hi Sakari, This is the right one and it's OK to swap the lines for local variables, I'll keep this in mind for next changes. Best regards, Hugues. On 03/07/2018 09:13 AM, Sakari Ailus wrote: > Hi Hugues, > > On Tue, Mar 06, 2018 at 06:04:39PM +0100, Hugues Fruchet wrote: >> Fix

[PATCH] media: ov5640: fix get_/set_fmt colorspace related fields

2018-03-06 Thread Hugues Fruchet
Fix set of missing colorspace related fields in get_/set_fmt. Detected by v4l2-compliance tool. Signed-off-by: Hugues Fruchet <hugues.fruc...@st.com> --- drivers/media/i2c/ov5640.c | 29 + 1 file changed, 21 insertions(+), 8 deletions(-) diff --git a/drivers

[PATCH] media: ov5640: fix colorspace compliance

2018-03-06 Thread Hugues Fruchet
Fix format ioctl colorspace related fields. Detected by v4l2-compliance tool. Signed-off-by: Hugues Fruchet <hugues.fruc...@st.com> --- drivers/media/i2c/ov5640.c | 29 + 1 file changed, 21 insertions(+), 8 deletions(-) diff --git a/drivers/media/i2c/ov56

[PATCH] media: ov5640: fix colorspace compliance

2018-03-06 Thread Hugues Fruchet
Fix format ioctl colorspace related fields. Detected by v4l2-compliance tool. Change-Id: I645138297033bc409751a3c7fc63e014650b8417 Signed-off-by: Hugues Fruchet <hugues.fruc...@st.com> --- drivers/media/i2c/ov5640.c | 29 + 1 file changed, 21 insertions

[PATCH v2] media: stm32-dcmi: add JPEG support

2018-02-28 Thread Hugues Fruchet
Add DCMI JPEG support. Signed-off-by: Hugues Fruchet <hugues.fruc...@st.com> --- version 2: - Removed V4L2_FMT_FLAG_COMPRESSED flag setting already set by V4L2 core See https://www.mail-archive.com/linux-media@vger.kernel.org/msg126825.html drivers/media/platform/stm32/stm32-dcmi.c

Re: [PATCH] media: stm32-dcmi: add JPEG support

2018-02-28 Thread Hugues FRUCHET
Hi Hans, Yes depends on 'fix lock scheme', I'll send a v2 of this jpeg commit for unneeded V4L2_FMT_FLAG_COMPRESSED. Best regards, Hugues. On 02/26/2018 03:17 PM, Hans Verkuil wrote: > On 02/22/2018 10:51 AM, Hugues Fruchet wrote: >> Add DCMI JPEG support. > > Does th

Re: [PATCH v2] media: stm32-dcmi: fix lock scheme

2018-02-28 Thread Hugues FRUCHET
lock management. On 02/26/2018 02:56 PM, Hans Verkuil wrote: > On 02/22/2018 10:49 AM, Hugues Fruchet wrote: >> Fix lock scheme leading to spurious freeze. > > Can you elaborate a bit more? It's hard to review since you don't > describe what was wrong and why this fixes the

[PATCH] media: stm32-dcmi: add JPEG support

2018-02-22 Thread Hugues Fruchet
Add DCMI JPEG support. Signed-off-by: Hugues Fruchet <hugues.fruc...@st.com> --- drivers/media/platform/stm32/stm32-dcmi.c | 195 +++--- 1 file changed, 148 insertions(+), 47 deletions(-) diff --git a/drivers/media/platform/stm32/stm32-dcmi.c b/drivers/media/pl

[PATCH] media: stm32-dcmi: fix unnecessary parentheses

2018-02-22 Thread Hugues Fruchet
Fix unnecessary parentheses in if conditions. Detected by checkpatch.pl --strict. Signed-off-by: Hugues Fruchet <hugues.fruc...@st.com> --- drivers/media/platform/stm32/stm32-dcmi.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/media/platform

[PATCH v2] media: stm32-dcmi: rework overrun/error case

2018-02-22 Thread Hugues Fruchet
, this slows down system and lead to more overrun errors. Use a counter instead and log errors at stop streaming. Signed-off-by: Hugues Fruchet <hugues.fruc...@st.com> --- version 2: - Minor: remove extra line at end of dcmi_stop_streaming() drivers/media/platform/stm32/stm32-dcmi.

[PATCH v2] media: stm32-dcmi: fix lock scheme

2018-02-22 Thread Hugues Fruchet
Fix lock scheme leading to spurious freeze. Signed-off-by: Hugues Fruchet <hugues.fruc...@st.com> --- version 2: - dcmi_buf_queue() refactor to avoid to have "else" after "return" (warning detected by checkpatch.pl --strict -f stm32-dcmi.c) drivers/media/platfo

[PATCH v2] media: ov5640: fix framerate update

2018-02-08 Thread Hugues Fruchet
After a framerate update through s_frame_interval(), the new framerate was not taken into account when streaming, but was taken into account on next session. This was due to sensor->current_mode not updated accordingly to new framerate setting in ov5640_s_frame_interval(). Signed-off-by: Hug

[PATCH] media: ov5640: fix framerate update

2018-02-08 Thread Hugues Fruchet
-Id: I6d62510b708c181ec0310601b6e4fa1be06ffe90 Signed-off-by: Hugues Fruchet <hugues.fruc...@st.com> --- drivers/media/i2c/ov5640.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/media/i2c/ov5640.c b/drivers/media/i2c/ov5640.c index 3e7b43c..03940f0 100644 --- a/drivers/media/i2c/ov564

Re: [PATCH] media: stm32-dcmi: add g/s_parm framerate support

2018-02-08 Thread Hugues FRUCHET
Thanks Hans, v2 sent, rebased on your helpers ! Best regards, Hugues. On 02/07/2018 06:52 PM, Hans Verkuil wrote: > On 02/07/2018 06:43 PM, Hugues Fruchet wrote: >> Add g/s_parm framerate support by calling subdev >> g/s_frame_interval ops. >> This allows user to con

[PATCH v2] media: stm32-dcmi: add g/s_parm framerate support

2018-02-08 Thread Hugues Fruchet
Add g/s_parm framerate support by calling subdev g/s_frame_interval ops. This allows user to control sensor framerate by calling ioctl G/S_PARM. Signed-off-by: Hugues Fruchet <hugues.fruc...@st.com> --- version 2: - Rebase on Hans branch to use new helpers: See https://www.mail-archi

[PATCH] media: stm32-dcmi: add g/s_parm framerate support

2018-02-07 Thread Hugues Fruchet
Add g/s_parm framerate support by calling subdev g/s_frame_interval ops. This allows user to control sensor framerate by calling ioctl G/S_PARM. Signed-off-by: Hugues Fruchet <hugues.fruc...@st.com> --- drivers/media/platform/stm32/stm32-dcmi.c | 49 +++

[PATCH] media: stm32-dcmi: rework overrun/error case

2018-02-07 Thread Hugues Fruchet
, this slows down system and lead to more overrun errors. Use a counter instead and log errors at stop streaming. Signed-off-by: Hugues Fruchet <hugues.fruc...@st.com> --- drivers/media/platform/stm32/stm32-dcmi.c | 30 -- 1 file changed, 12 insertions(+), 18 del

[PATCH] media: stm32-dcmi: fix lock scheme

2018-02-07 Thread Hugues Fruchet
Fix lock scheme leading to spurious freeze. Signed-off-by: Hugues Fruchet <hugues.fruc...@st.com> --- drivers/media/platform/stm32/stm32-dcmi.c | 57 ++- 1 file changed, 25 insertions(+), 32 deletions(-) diff --git a/drivers/media/platform/stm32/stm32-dcm

  1   2   3   4   5   >