[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 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] 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 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 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 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 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 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 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: 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: 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] 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 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 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 --- version 2: - typo: remove blank line at the end of stop_streaming() drivers/media/platform/stm32/stm32-dcmi.c | 29 +++-- 1

[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

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

2018-02-28 Thread Hugues Fruchet
Add DCMI JPEG support. Signed-off-by: Hugues Fruchet --- 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 | 193

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

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: 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] 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 --- drivers/media/platform/stm32/stm32-dcmi.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/media/platform/stm32/stm32-dcmi.c b/drivers

[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: add JPEG support

2018-02-22 Thread Hugues Fruchet
Add DCMI JPEG support. Signed-off-by: Hugues Fruchet --- 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/platform/stm32/stm32-dcmi.c index

[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: stm32-dcmi: fix lock scheme

2018-02-22 Thread Hugues Fruchet
Fix lock scheme leading to spurious freeze. Signed-off-by: Hugues Fruchet --- 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/platform/stm

[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: 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 --- version 2: - Minor: remove extra line at end of dcmi_stop_streaming() drivers/media/platform/stm32/stm32-dcmi.c | 29

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

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 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 --- version 2: - Rebase on Hans branch to use new helpers: See https://www.mail-archive.com/linux-media

[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: 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 --- drivers/media/platform/stm32/stm32-dcmi.c | 49 +++ 1 file changed, 49 insertions

[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: 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 --- drivers/media/platform/stm32/stm32-dcmi.c | 30 -- 1 file changed, 12 insertions(+), 18 deletions(-) diff --git a/drivers

[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

[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 --- drivers/media/platform/stm32/stm32-dcmi.c | 57 ++- 1 file changed, 25 insertions(+), 32 deletions(-) diff --git a/drivers/media/platform/stm32/stm32-dcmi.c b/drivers/media/platform/stm32

[PATCH v1 0/3] STM32 DCMI redundant code & trace cleanup

2018-02-07 Thread Hugues Fruchet
Remove some redundant code and fix/enhance some error trace points. Hugues Fruchet (3): media: stm32-dcmi: remove redundant capture enable media: stm32-dcmi: remove redundant clear of interrupt flags media: stm32-dcmi: improve error trace points drivers/media/platform/stm32/stm32-dcmi.c

[PATCH v1 0/3] STM32 DCMI redundant code & trace cleanup

2018-02-07 Thread Hugues Fruchet
Remove some redundant code and fix/enhance some error trace points. Hugues Fruchet (3): media: stm32-dcmi: remove redundant capture enable media: stm32-dcmi: remove redundant clear of interrupt flags media: stm32-dcmi: improve error trace points drivers/media/platform/stm32/stm32-dcmi.c

[PATCH v1 1/3] media: stm32-dcmi: remove redundant capture enable

2018-02-07 Thread Hugues Fruchet
Remove redundant capture enable already done in dcmi_start_capture(). Signed-off-by: Hugues Fruchet <hugues.fruc...@st.com> --- drivers/media/platform/stm32/stm32-dcmi.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/media/platform/stm32/stm32-dcmi.c b/drivers/media/pl

[PATCH v1 1/3] media: stm32-dcmi: remove redundant capture enable

2018-02-07 Thread Hugues Fruchet
Remove redundant capture enable already done in dcmi_start_capture(). Signed-off-by: Hugues Fruchet --- drivers/media/platform/stm32/stm32-dcmi.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/media/platform/stm32/stm32-dcmi.c b/drivers/media/platform/stm32/stm32-dcmi.c index

[PATCH v1 2/3] media: stm32-dcmi: remove redundant clear of interrupt flags

2018-02-07 Thread Hugues Fruchet
It is already cleared in dcmi_irq_callback(). Signed-off-by: Hugues Fruchet <hugues.fruc...@st.com> --- drivers/media/platform/stm32/stm32-dcmi.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/media/platform/stm32/stm32-dcmi.c b/drivers/media/platform/stm32/stm32-dcmi.c

[PATCH v1 2/3] media: stm32-dcmi: remove redundant clear of interrupt flags

2018-02-07 Thread Hugues Fruchet
It is already cleared in dcmi_irq_callback(). Signed-off-by: Hugues Fruchet --- drivers/media/platform/stm32/stm32-dcmi.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/media/platform/stm32/stm32-dcmi.c b/drivers/media/platform/stm32/stm32-dcmi.c index abc79d8..dfab867 100644

[PATCH v1 3/3] media: stm32-dcmi: improve error trace points

2018-02-07 Thread Hugues Fruchet
Fix some missing "\n". Trace error returned by subdev streamon/streamoff. Remove extra "0x" unneeded with %pad formatter. Signed-off-by: Hugues Fruchet <hugues.fruc...@st.com> --- drivers/media/platform/stm32/stm32-dcmi.c | 16 +--- 1 file changed, 9

[PATCH v1 3/3] media: stm32-dcmi: improve error trace points

2018-02-07 Thread Hugues Fruchet
Fix some missing "\n". Trace error returned by subdev streamon/streamoff. Remove extra "0x" unneeded with %pad formatter. Signed-off-by: Hugues Fruchet --- drivers/media/platform/stm32/stm32-dcmi.c | 16 +--- 1 file changed, 9 insertions(+), 7 deletions(-)

Re: [PATCH] Fix read buffer overflow in delta-ipc

2018-01-04 Thread Hugues FRUCHET
ink of this proposal ? Best regards, Hugues. On 01/04/2018 01:19 AM, Andi Kleen wrote: > On Wed, Jan 03, 2018 at 09:40:04AM +, Hugues FRUCHET wrote: >> Hi Andi, >> Thanks for the patch but I would suggest to use strlcpy instead, this >> will guard msg.name overwriting and add the

Re: [PATCH] Fix read buffer overflow in delta-ipc

2018-01-04 Thread Hugues FRUCHET
ink of this proposal ? Best regards, Hugues. On 01/04/2018 01:19 AM, Andi Kleen wrote: > On Wed, Jan 03, 2018 at 09:40:04AM +, Hugues FRUCHET wrote: >> Hi Andi, >> Thanks for the patch but I would suggest to use strlcpy instead, this >> will guard msg.name overwriting and add the

Re: [PATCH] Fix read buffer overflow in delta-ipc

2018-01-03 Thread Hugues FRUCHET
Hi Andi, Thanks for the patch but I would suggest to use strlcpy instead, this will guard msg.name overwriting and add the NULL termination in case of truncation: - memcpy(msg.name, name, sizeof(msg.name)); - msg.name[sizeof(msg.name) - 1] = 0; + strlcpy(msg.name, name,

Re: [PATCH] Fix read buffer overflow in delta-ipc

2018-01-03 Thread Hugues FRUCHET
Hi Andi, Thanks for the patch but I would suggest to use strlcpy instead, this will guard msg.name overwriting and add the NULL termination in case of truncation: - memcpy(msg.name, name, sizeof(msg.name)); - msg.name[sizeof(msg.name) - 1] = 0; + strlcpy(msg.name, name,

Re: [PATCH] media: platform: sti: Adopt SPDX identifier

2017-12-07 Thread Hugues FRUCHET
blished by the Free Software Foundation; either version 2 of > - * the License, or (at your option) any later version. >*/ > #ifndef _C8SECTPFE_DVB_H_ > #define _C8SECTPFE_DVB_H_ > diff --git a/drivers/media/platform/sti/cec/stih-cec.c > b/drivers/media/platform/

Re: [PATCH] media: platform: sti: Adopt SPDX identifier

2017-12-07 Thread Hugues FRUCHET
/media/platform/sti/cec/stih-cec.c > b/drivers/media/platform/sti/cec/stih-cec.c > index 70160df36de9..d34099f75990 100644 > --- a/drivers/media/platform/sti/cec/stih-cec.c > +++ b/drivers/media/platform/sti/cec/stih-cec.c > @@ -1,11 +1,8 @@ > +// SPDX-License-Identifier: GPL-2.0 &g

Re: [PATCH v1 4/5] [media] stm32-dcmi: set default format at open()

2017-08-21 Thread Hugues FRUCHET
On 08/04/2017 02:00 PM, Hans Verkuil wrote: > On 28/07/17 12:05, Hugues Fruchet wrote: >> Ensure that we start with default pixel format and resolution >> when opening a new instance. > > Why? The format is persistent in V4L2 and (re)opening the video device > sho

Re: [PATCH v1 4/5] [media] stm32-dcmi: set default format at open()

2017-08-21 Thread Hugues FRUCHET
On 08/04/2017 02:00 PM, Hans Verkuil wrote: > On 28/07/17 12:05, Hugues Fruchet wrote: >> Ensure that we start with default pixel format and resolution >> when opening a new instance. > > Why? The format is persistent in V4L2 and (re)opening the video device > sho

Re: [PATCH v1 5/5] [media] stm32-dcmi: g_/s_selection crop support

2017-08-21 Thread Hugues FRUCHET
Hi Hans, thanks for reviewing On 08/04/2017 02:26 PM, Hans Verkuil wrote: > On 28/07/17 12:05, Hugues Fruchet wrote: >> Implements g_/s_selection crop support by using DCMI crop >> hardware feature. >> User can first get the maximum supported resolution of the sensor >

Re: [PATCH v1 5/5] [media] stm32-dcmi: g_/s_selection crop support

2017-08-21 Thread Hugues FRUCHET
Hi Hans, thanks for reviewing On 08/04/2017 02:26 PM, Hans Verkuil wrote: > On 28/07/17 12:05, Hugues Fruchet wrote: >> Implements g_/s_selection crop support by using DCMI crop >> hardware feature. >> User can first get the maximum supported resolution of the sensor >

[PATCH v1 0/5] STM32 DCMI camera interface crop support

2017-07-28 Thread Hugues Fruchet
50, Failed: 1, Warnings: 0 Hugues Fruchet (5): [media] stm32-dcmi: catch dma submission error [media] stm32-dcmi: revisit control register handling [media] stm32-dcmi: cleanup variable/fields namings [media] stm32-dcmi: set default format at open() [media] stm32-dcmi: g_/s_selection cr

[PATCH v1 0/5] STM32 DCMI camera interface crop support

2017-07-28 Thread Hugues Fruchet
50, Failed: 1, Warnings: 0 Hugues Fruchet (5): [media] stm32-dcmi: catch dma submission error [media] stm32-dcmi: revisit control register handling [media] stm32-dcmi: cleanup variable/fields namings [media] stm32-dcmi: set default format at open() [media] stm32-dcmi: g_/s_selection cr

[PATCH v1 2/5] [media] stm32-dcmi: revisit control register handling

2017-07-28 Thread Hugues Fruchet
Simplify bits handling of DCMI_CR register. Signed-off-by: Hugues Fruchet <hugues.fruc...@st.com> --- drivers/media/platform/stm32/stm32-dcmi.c | 14 -- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/drivers/media/platform/stm32/stm32-dcmi.c b/drivers/media/pl

[PATCH v1 4/5] [media] stm32-dcmi: set default format at open()

2017-07-28 Thread Hugues Fruchet
Ensure that we start with default pixel format and resolution when opening a new instance. Signed-off-by: Hugues Fruchet <hugues.fruc...@st.com> --- drivers/media/platform/stm32/stm32-dcmi.c | 49 ++- 1 file changed, 28 insertions(+), 21 deletions(-) diff

[PATCH v1 2/5] [media] stm32-dcmi: revisit control register handling

2017-07-28 Thread Hugues Fruchet
Simplify bits handling of DCMI_CR register. Signed-off-by: Hugues Fruchet --- drivers/media/platform/stm32/stm32-dcmi.c | 14 -- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/drivers/media/platform/stm32/stm32-dcmi.c b/drivers/media/platform/stm32/stm32-dcmi.c

[PATCH v1 4/5] [media] stm32-dcmi: set default format at open()

2017-07-28 Thread Hugues Fruchet
Ensure that we start with default pixel format and resolution when opening a new instance. Signed-off-by: Hugues Fruchet --- drivers/media/platform/stm32/stm32-dcmi.c | 49 ++- 1 file changed, 28 insertions(+), 21 deletions(-) diff --git a/drivers/media/platform

[PATCH v1 5/5] [media] stm32-dcmi: g_/s_selection crop support

2017-07-28 Thread Hugues Fruchet
() resolution user request is adjusted to match crop request resolution. Signed-off-by: Hugues Fruchet <hugues.fruc...@st.com> --- drivers/media/platform/stm32/stm32-dcmi.c | 367 +- 1 file changed, 363 insertions(+), 4 deletions(-) diff --git a/drivers/media/platform

[PATCH v1 5/5] [media] stm32-dcmi: g_/s_selection crop support

2017-07-28 Thread Hugues Fruchet
() resolution user request is adjusted to match crop request resolution. Signed-off-by: Hugues Fruchet --- drivers/media/platform/stm32/stm32-dcmi.c | 367 +- 1 file changed, 363 insertions(+), 4 deletions(-) diff --git a/drivers/media/platform/stm32/stm32-dcmi.c b/drivers

[PATCH v1 1/5] [media] stm32-dcmi: catch dma submission error

2017-07-28 Thread Hugues Fruchet
Test cookie return by dmaengine_submit() and return error if any. Signed-off-by: Hugues Fruchet <hugues.fruc...@st.com> --- drivers/media/platform/stm32/stm32-dcmi.c | 4 1 file changed, 4 insertions(+) diff --git a/drivers/media/platform/stm32/stm32-dcmi.c b/drivers/media/platform

[PATCH v1 1/5] [media] stm32-dcmi: catch dma submission error

2017-07-28 Thread Hugues Fruchet
Test cookie return by dmaengine_submit() and return error if any. Signed-off-by: Hugues Fruchet --- drivers/media/platform/stm32/stm32-dcmi.c | 4 1 file changed, 4 insertions(+) diff --git a/drivers/media/platform/stm32/stm32-dcmi.c b/drivers/media/platform/stm32/stm32-dcmi.c index

[PATCH v1 3/5] [media] stm32-dcmi: cleanup variable/fields namings

2017-07-28 Thread Hugues Fruchet
Uniformize "pixfmt" variables to "pix". Change "current_fmt" & "dcmi_fmt" variables to variables with "sd_" prefix to explicitly refer to subdev format. Signed-off-by: Hugues Fruchet <hugues.fruc...@st.com> --- drivers/media/platfor

[PATCH v1 3/5] [media] stm32-dcmi: cleanup variable/fields namings

2017-07-28 Thread Hugues Fruchet
Uniformize "pixfmt" variables to "pix". Change "current_fmt" & "dcmi_fmt" variables to variables with "sd_" prefix to explicitly refer to subdev format. Signed-off-by: Hugues Fruchet --- drivers/media/platform/stm32/stm32-dcmi.c |

[PATCH v1 2/2] [media] ov9655: fix missing mutex_destroy()

2017-07-21 Thread Hugues Fruchet
Fix missing mutex_destroy() when probe fails and when driver is removed. Signed-off-by: Hugues Fruchet <hugues.fruc...@st.com> --- drivers/media/i2c/ov9650.c | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/drivers/media/i2c/ov9650.c b/drivers/media/i2c/ov9650.c

[PATCH v1 2/2] [media] ov9655: fix missing mutex_destroy()

2017-07-21 Thread Hugues Fruchet
Fix missing mutex_destroy() when probe fails and when driver is removed. Signed-off-by: Hugues Fruchet --- drivers/media/i2c/ov9650.c | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/drivers/media/i2c/ov9650.c b/drivers/media/i2c/ov9650.c index e8dea28..6ffb460 100644

[PATCH v1 0/2] OV9650 code cleanup

2017-07-21 Thread Hugues Fruchet
Here is a bunch of small fixes found when upstreaming the OV9655 sensor driver based on OV9650 driver: - Fix coding style (checkpatch --strict) - Fix missing mutex_destroy, see http://www.mail-archive.com/linux-media@vger.kernel.org/msg115245.html Hugues Fruchet (2): [media] ov9650: fix coding

[PATCH v1 0/2] OV9650 code cleanup

2017-07-21 Thread Hugues Fruchet
Here is a bunch of small fixes found when upstreaming the OV9655 sensor driver based on OV9650 driver: - Fix coding style (checkpatch --strict) - Fix missing mutex_destroy, see http://www.mail-archive.com/linux-media@vger.kernel.org/msg115245.html Hugues Fruchet (2): [media] ov9650: fix coding

[PATCH v1 1/2] [media] ov9650: fix coding style

2017-07-21 Thread Hugues Fruchet
Fix a bunch of coding style issues detected by checkpatch --strict. Signed-off-by: Hugues Fruchet <hugues.fruc...@st.com> --- drivers/media/i2c/ov9650.c | 59 ++ 1 file changed, 33 insertions(+), 26 deletions(-) diff --git a/drivers/media/i2c/ov

[PATCH v1 1/2] [media] ov9650: fix coding style

2017-07-21 Thread Hugues Fruchet
Fix a bunch of coding style issues detected by checkpatch --strict. Signed-off-by: Hugues Fruchet --- drivers/media/i2c/ov9650.c | 59 ++ 1 file changed, 33 insertions(+), 26 deletions(-) diff --git a/drivers/media/i2c/ov9650.c b/drivers/media/i2c

Re: [PATCH v2 0/7] Add support of OV9655 camera

2017-07-20 Thread Hugues FRUCHET
On 07/20/2017 10:37 AM, H. Nikolaus Schaller wrote: > Hi, > >> Am 18.07.2017 um 21:52 schrieb Sakari Ailus <sakari.ai...@iki.fi>: >> >> On Tue, Jul 18, 2017 at 12:53:12PM +, Hugues FRUCHET wrote: >>> >>> >>> On 07/18/2017 02:

Re: [PATCH v2 0/7] Add support of OV9655 camera

2017-07-20 Thread Hugues FRUCHET
On 07/20/2017 10:37 AM, H. Nikolaus Schaller wrote: > Hi, > >> Am 18.07.2017 um 21:52 schrieb Sakari Ailus : >> >> On Tue, Jul 18, 2017 at 12:53:12PM +, Hugues FRUCHET wrote: >>> >>> >>> On 07/18/2017 02:17 PM, H. Nikolaus Schaller wrote:

Re: [PATCH v2 0/7] [PATCH v2 0/7] Add support of OV9655 camera

2017-07-18 Thread Hugues FRUCHET
On 07/18/2017 02:17 PM, H. Nikolaus Schaller wrote: > Hi, > >> Am 18.07.2017 um 13:59 schrieb Hans Verkuil <hverk...@xs4all.nl>: >> >> On 12/07/17 22:01, Sylwester Nawrocki wrote: >>> Hi Hugues, >>> >>> On 07/03/2017 11:16 AM, Hugue

Re: [PATCH v2 0/7] [PATCH v2 0/7] Add support of OV9655 camera

2017-07-18 Thread Hugues FRUCHET
On 07/18/2017 02:17 PM, H. Nikolaus Schaller wrote: > Hi, > >> Am 18.07.2017 um 13:59 schrieb Hans Verkuil : >> >> On 12/07/17 22:01, Sylwester Nawrocki wrote: >>> Hi Hugues, >>> >>> On 07/03/2017 11:16 AM, Hugues Fruchet wrote: >>>>

Re: [PATCH v2 3/7] [media] ov9650: add device tree support

2017-07-18 Thread Hugues FRUCHET
Hi Sakari, thks for review. On 07/09/2017 01:06 AM, Sakari Ailus wrote: > Hi Hugues, > > On Mon, Jul 03, 2017 at 11:16:04AM +0200, Hugues Fruchet wrote: >> Allows use of device tree configuration data. >> If no device tree data is there, configuration is taken from platf

Re: [PATCH v2 3/7] [media] ov9650: add device tree support

2017-07-18 Thread Hugues FRUCHET
Hi Sakari, thks for review. On 07/09/2017 01:06 AM, Sakari Ailus wrote: > Hi Hugues, > > On Mon, Jul 03, 2017 at 11:16:04AM +0200, Hugues Fruchet wrote: >> Allows use of device tree configuration data. >> If no device tree data is there, configuration is taken from platf

Re: [PATCH] stm32-dcmi: constify vb2_ops structure

2017-07-07 Thread Hugues FRUCHET
Acked-by: Hugues Fruchet <hugues.fruc...@st.com> On 07/06/2017 10:05 PM, Gustavo A. R. Silva wrote: > Check for vb2_ops structures that are only stored in the ops field of a > vb2_queue structure. That field is declared const, so vb2_ops structures > that have this property

Re: [PATCH] stm32-dcmi: constify vb2_ops structure

2017-07-07 Thread Hugues FRUCHET
Acked-by: Hugues Fruchet On 07/06/2017 10:05 PM, Gustavo A. R. Silva wrote: > Check for vb2_ops structures that are only stored in the ops field of a > vb2_queue structure. That field is declared const, so vb2_ops structures > that have this property can be declared as c

Re: [PATCH] st-delta: constify vb2_ops structures

2017-07-07 Thread Hugues FRUCHET
Acked-by: Hugues Fruchet <hugues.fruc...@st.com> On 07/06/2017 10:14 PM, Gustavo A. R. Silva wrote: > Check for vb2_ops structures that are only stored in the ops field of a > vb2_queue structure. That field is declared const, so vb2_ops structures > that have this property

Re: [PATCH] st-delta: constify vb2_ops structures

2017-07-07 Thread Hugues FRUCHET
Acked-by: Hugues Fruchet On 07/06/2017 10:14 PM, Gustavo A. R. Silva wrote: > Check for vb2_ops structures that are only stored in the ops field of a > vb2_queue structure. That field is declared const, so vb2_ops structures > that have this property can be declared as c

Re: [PATCH v2 0/7] [PATCH v2 0/7] Add support of OV9655 camera

2017-07-06 Thread Hugues FRUCHET
Hi Sylwester, Do you have the possibility to check for non-regression of this patchset on 9650/52 camera ? Best regards, Hugues. On 07/03/2017 11:16 AM, Hugues Fruchet wrote: > This patchset enables OV9655 camera support. > > OV9655 support has been tested using STM32F4DIS-CAM extens

Re: [PATCH v2 0/7] [PATCH v2 0/7] Add support of OV9655 camera

2017-07-06 Thread Hugues FRUCHET
Hi Sylwester, Do you have the possibility to check for non-regression of this patchset on 9650/52 camera ? Best regards, Hugues. On 07/03/2017 11:16 AM, Hugues Fruchet wrote: > This patchset enables OV9655 camera support. > > OV9655 support has been tested using STM32F4DIS-CAM extens

Re: [PATCH v2 1/7] DT bindings: add bindings for ov965x camera module

2017-07-05 Thread Hugues FRUCHET
On 07/05/2017 04:03 PM, Rob Herring wrote: > On Mon, Jul 03, 2017 at 11:16:02AM +0200, Hugues Fruchet wrote: >> From: "H. Nikolaus Schaller" <h...@goldelico.com> >> >> This adds documentation of device tree bindings >> for the OV965X family camera sens

Re: [PATCH v2 1/7] DT bindings: add bindings for ov965x camera module

2017-07-05 Thread Hugues FRUCHET
On 07/05/2017 04:03 PM, Rob Herring wrote: > On Mon, Jul 03, 2017 at 11:16:02AM +0200, Hugues Fruchet wrote: >> From: "H. Nikolaus Schaller" >> >> This adds documentation of device tree bindings >> for the OV965X family camera sensor module. >> >&g

Re: [PATCH v1 0/6] Add support of OV9655 camera

2017-07-03 Thread Hugues FRUCHET
of hsync. Nevertheless seems OK if I check OMAP3 ISP register: CCDC SYN_MODE=0x00071704 #define ISPCCDC_SYN_MODE_VDPOL (1 << 2) #define ISPCCDC_SYN_MODE_HDPOL (1 << 3) seems well that vertical is 1 and horizontal is 0. BR, Hugues. On 07/03/2017 11:14 A

Re: [PATCH v1 0/6] Add support of OV9655 camera

2017-07-03 Thread Hugues FRUCHET
of hsync. Nevertheless seems OK if I check OMAP3 ISP register: CCDC SYN_MODE=0x00071704 #define ISPCCDC_SYN_MODE_VDPOL (1 << 2) #define ISPCCDC_SYN_MODE_HDPOL (1 << 3) seems well that vertical is 1 and horizontal is 0. BR, Hugues. On 07/03/2017 11:14

[PATCH v2 2/7] [media] ov9650: switch i2c device id to lower case

2017-07-03 Thread Hugues Fruchet
Switch i2c device id to lower case as it is done for other omnivision cameras. Signed-off-by: Hugues Fruchet <hugues.fruc...@st.com> --- drivers/media/i2c/ov9650.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/media/i2c/ov9650.c b/drivers/media/i2c/ov

[PATCH v2 2/7] [media] ov9650: switch i2c device id to lower case

2017-07-03 Thread Hugues Fruchet
Switch i2c device id to lower case as it is done for other omnivision cameras. Signed-off-by: Hugues Fruchet --- drivers/media/i2c/ov9650.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/media/i2c/ov9650.c b/drivers/media/i2c/ov9650.c index 2de2fbb..1e4e99e

[PATCH v2 7/7] [media] ov9650: add analog power supply and clock gating

2017-07-03 Thread Hugues Fruchet
Add optional analog power supply and clock gating. Signed-off-by: H. Nikolaus Schaller <h...@goldelico.com> Signed-off-by: Hugues Fruchet <hugues.fruc...@st.com> --- drivers/media/i2c/ov9650.c | 26 ++ 1 file changed, 26 insertions(+) diff --git a/drive

[PATCH v2 7/7] [media] ov9650: add analog power supply and clock gating

2017-07-03 Thread Hugues Fruchet
Add optional analog power supply and clock gating. Signed-off-by: H. Nikolaus Schaller Signed-off-by: Hugues Fruchet --- drivers/media/i2c/ov9650.c | 26 ++ 1 file changed, 26 insertions(+) diff --git a/drivers/media/i2c/ov9650.c b/drivers/media/i2c/ov9650.c index

[PATCH v2 1/7] DT bindings: add bindings for ov965x camera module

2017-07-03 Thread Hugues Fruchet
From: "H. Nikolaus Schaller" <h...@goldelico.com> This adds documentation of device tree bindings for the OV965X family camera sensor module. Signed-off-by: H. Nikolaus Schaller <h...@goldelico.com> Signed-off-by: Hugues Fruchet <hugues.fruc...@st.com> --- .../d

[PATCH v2 1/7] DT bindings: add bindings for ov965x camera module

2017-07-03 Thread Hugues Fruchet
From: "H. Nikolaus Schaller" This adds documentation of device tree bindings for the OV965X family camera sensor module. Signed-off-by: H. Nikolaus Schaller Signed-off-by: Hugues Fruchet --- .../devicetree/bindings/media/i2c/ov965x.txt | 45 ++ 1 file c

<    1   2   3   4   >