[PATCH v7 00/11] Renesas Capture Engine Unit (CEU) V4L2 driver

2018-01-26 Thread Jacopo Mondi
Hello,
  7th round for CEU driver

This series includes 2 new patches compared to v6 and it is now based on
top of Hans' series:
[PATCHv2 0/9] media: replace g/s_parm by g/s_frame_interval
and makes use of newly introduced v4l2_g/s_parm_cap() functions from v4l2-common
in CEU's g/s_parm() callbacks.

A branch for testing is available at:
git://jmondi.org/linux ceu/media-tree-parm/base
with few patches for Migo-R and GR-Peach applied on top of Hans' media-tree/parm
branch.

The 2 new patches in the series:
[11/11] has been added to silence a v4l2-compliance error, and modifies
ov7670 driver to set all fields of 'struct v4l2_mbus_format' during set_format
operation, including ycbcr_enc, quantization and xfer_func. As the patch commit
reports, this suppresses the following v4l2-compliance error:
fail: v4l2-test-formats.cpp(335): ycbcr_enc >= 0xff

[7/11] has been required by Hans to add frame interval handling to ov772x
driver. As this is quite a big change I kept it in a separate patch to ease
review, it can eventually be squashed on [6/11] if accepted.

If for TW9910 video decoder the same is required (frame interval handling) I'm
in favour of moving that driver to staging as it was proposed for ov772x before
this series.

v4l2-compliance now reports a 0 error count:
Total: 43, Succeeded: 43, Failed: 0, Warnings: 0

Hans, you asked me to run v4l2-compliance with the -f option, I cannot do
that on my tiny GR-Peach as with its limited available system memory it cannot
allocate the number of requested buffers for that test. I can try to tweak that
if necessary. I won't stress here why I cannot do that on Migo-R, long story
short, I need a special compiler with DSP support to run anything but the little
initramfs I have received for SH7722. I've been able to tweak yavta to work and
test capture and frame rate handling with it, but v4l2-compliance is much more
complex and I don't think I'll be able run it on that platform.

Below, v4l2-compliance output:

---
v4l2-compliance SHA   : 20b6624f4bb84353e690d897688fd7ac12d6a881

Driver Info:
Driver name   : renesas-ceu
Card type : Renesas CEU e821.ceu
Bus info  : platform:renesas-ceu-e821.c
Driver version: 4.15.0
Capabilities  : 0x84201000
Video Capture Multiplanar
Streaming
Extended Pix Format
Device Capabilities
Device Caps   : 0x04201000
Video Capture Multiplanar
Streaming
Extended Pix Format

Compliance test for device /dev/video0 (not using libv4l2):

Required ioctls:
test VIDIOC_QUERYCAP: OK

Allow for multiple opens:
test second video open: OK
test VIDIOC_QUERYCAP: OK
test VIDIOC_G/S_PRIORITY: OK
test for unlimited opens: OK

Debug ioctls:
test VIDIOC_DBG_G/S_REGISTER: OK
test VIDIOC_LOG_STATUS: OK (Not Supported)

Input ioctls:
test VIDIOC_G/S_TUNER/ENUM_FREQ_BANDS: OK (Not Supported)
test VIDIOC_G/S_FREQUENCY: OK (Not Supported)
test VIDIOC_S_HW_FREQ_SEEK: OK (Not Supported)
test VIDIOC_ENUMAUDIO: OK (Not Supported)
test VIDIOC_G/S/ENUMINPUT: OK
test VIDIOC_G/S_AUDIO: OK (Not Supported)
Inputs: 1 Audio Inputs: 0 Tuners: 0

Output ioctls:
test VIDIOC_G/S_MODULATOR: OK (Not Supported)
test VIDIOC_G/S_FREQUENCY: OK (Not Supported)
test VIDIOC_ENUMAUDOUT: OK (Not Supported)
test VIDIOC_G/S/ENUMOUTPUT: OK (Not Supported)
test VIDIOC_G/S_AUDOUT: OK (Not Supported)
Outputs: 0 Audio Outputs: 0 Modulators: 0

Input/Output configuration ioctls:
test VIDIOC_ENUM/G/S/QUERY_STD: OK (Not Supported)
test VIDIOC_ENUM/G/S/QUERY_DV_TIMINGS: OK (Not Supported)
test VIDIOC_DV_TIMINGS_CAP: OK (Not Supported)
test VIDIOC_G/S_EDID: OK (Not Supported)

Test input 0:

Control ioctls:
test VIDIOC_QUERY_EXT_CTRL/QUERYMENU: OK
test VIDIOC_QUERYCTRL: OK
test VIDIOC_G/S_CTRL: OK
test VIDIOC_G/S/TRY_EXT_CTRLS: OK
test VIDIOC_(UN)SUBSCRIBE_EVENT/DQEVENT: OK
test VIDIOC_G/S_JPEGCOMP: OK (Not Supported)
Standard Controls: 12 Private Controls: 0

Format ioctls:
test VIDIOC_ENUM_FMT/FRAMESIZES/FRAMEINTERVALS: OK
fail: v4l2-test-formats.cpp(1162): ret && node->has_frmintervals
test VIDIOC_G/S_PARM: OK
test VIDIOC_G_FBUF: OK (Not Supported)
test VIDIOC_G_FMT: OK
test VIDIOC_TRY_FMT: OK
test VIDIOC_S_FMT: OK
test VIDIOC_G_SLICED_VBI_CAP: OK (Not Supported)
test Cropping: OK (Not Supported)
test Composing: OK (Not Supported)
test Scaling: OK (Not Supported)

 

Re: [PATCH v7 00/11] Renesas Capture Engine Unit (CEU) V4L2 driver

2018-01-26 Thread Geert Uytterhoeven
Hi Jacopo,

On Fri, Jan 26, 2018 at 2:54 PM, jacopo mondi  wrote:
> UUUPS
>
> please ignore this submission as it contains patches from a previous
> version (you may have noticed some patches in the series reports
> [xx/09] in the subject).
>
> I will resend.

Good. So there's still time to fix e.g. "RZ/A1-H" to "RZ/A1H" (same
for M and L).

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- ge...@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds


Re: [PATCH v7 00/11] Renesas Capture Engine Unit (CEU) V4L2 driver

2018-01-26 Thread jacopo mondi
UUUPS

please ignore this submission as it contains patches from a previous
version (you may have noticed some patches in the series reports
[xx/09] in the subject).

I will resend.

Sorry for the noise

On Fri, Jan 26, 2018 at 02:48:32PM +0100, Jacopo Mondi wrote:
> Hello,
>   7th round for CEU driver
>
> This series includes 2 new patches compared to v6 and it is now based on
> top of Hans' series:
> [PATCHv2 0/9] media: replace g/s_parm by g/s_frame_interval
> and makes use of newly introduced v4l2_g/s_parm_cap() functions from 
> v4l2-common
> in CEU's g/s_parm() callbacks.
>
> A branch for testing is available at:
> git://jmondi.org/linux ceu/media-tree-parm/base
> with few patches for Migo-R and GR-Peach applied on top of Hans' 
> media-tree/parm
> branch.
>
> The 2 new patches in the series:
> [11/11] has been added to silence a v4l2-compliance error, and modifies
> ov7670 driver to set all fields of 'struct v4l2_mbus_format' during set_format
> operation, including ycbcr_enc, quantization and xfer_func. As the patch 
> commit
> reports, this suppresses the following v4l2-compliance error:
> fail: v4l2-test-formats.cpp(335): ycbcr_enc >= 0xff
>
> [7/11] has been required by Hans to add frame interval handling to ov772x
> driver. As this is quite a big change I kept it in a separate patch to ease
> review, it can eventually be squashed on [6/11] if accepted.
>
> If for TW9910 video decoder the same is required (frame interval handling) I'm
> in favour of moving that driver to staging as it was proposed for ov772x 
> before
> this series.
>
> v4l2-compliance now reports a 0 error count:
> Total: 43, Succeeded: 43, Failed: 0, Warnings: 0
>
> Hans, you asked me to run v4l2-compliance with the -f option, I cannot do
> that on my tiny GR-Peach as with its limited available system memory it cannot
> allocate the number of requested buffers for that test. I can try to tweak 
> that
> if necessary. I won't stress here why I cannot do that on Migo-R, long story
> short, I need a special compiler with DSP support to run anything but the 
> little
> initramfs I have received for SH7722. I've been able to tweak yavta to work 
> and
> test capture and frame rate handling with it, but v4l2-compliance is much more
> complex and I don't think I'll be able run it on that platform.
>
> Below, v4l2-compliance output:
>
> ---
> v4l2-compliance SHA   : 20b6624f4bb84353e690d897688fd7ac12d6a881
>
> Driver Info:
>   Driver name   : renesas-ceu
>   Card type : Renesas CEU e821.ceu
>   Bus info  : platform:renesas-ceu-e821.c
>   Driver version: 4.15.0
>   Capabilities  : 0x84201000
>   Video Capture Multiplanar
>   Streaming
>   Extended Pix Format
>   Device Capabilities
>   Device Caps   : 0x04201000
>   Video Capture Multiplanar
>   Streaming
>   Extended Pix Format
>
> Compliance test for device /dev/video0 (not using libv4l2):
>
> Required ioctls:
>   test VIDIOC_QUERYCAP: OK
>
> Allow for multiple opens:
>   test second video open: OK
>   test VIDIOC_QUERYCAP: OK
>   test VIDIOC_G/S_PRIORITY: OK
>   test for unlimited opens: OK
>
> Debug ioctls:
>   test VIDIOC_DBG_G/S_REGISTER: OK
>   test VIDIOC_LOG_STATUS: OK (Not Supported)
>
> Input ioctls:
>   test VIDIOC_G/S_TUNER/ENUM_FREQ_BANDS: OK (Not Supported)
>   test VIDIOC_G/S_FREQUENCY: OK (Not Supported)
>   test VIDIOC_S_HW_FREQ_SEEK: OK (Not Supported)
>   test VIDIOC_ENUMAUDIO: OK (Not Supported)
>   test VIDIOC_G/S/ENUMINPUT: OK
>   test VIDIOC_G/S_AUDIO: OK (Not Supported)
>   Inputs: 1 Audio Inputs: 0 Tuners: 0
>
> Output ioctls:
>   test VIDIOC_G/S_MODULATOR: OK (Not Supported)
>   test VIDIOC_G/S_FREQUENCY: OK (Not Supported)
>   test VIDIOC_ENUMAUDOUT: OK (Not Supported)
>   test VIDIOC_G/S/ENUMOUTPUT: OK (Not Supported)
>   test VIDIOC_G/S_AUDOUT: OK (Not Supported)
>   Outputs: 0 Audio Outputs: 0 Modulators: 0
>
> Input/Output configuration ioctls:
>   test VIDIOC_ENUM/G/S/QUERY_STD: OK (Not Supported)
>   test VIDIOC_ENUM/G/S/QUERY_DV_TIMINGS: OK (Not Supported)
>   test VIDIOC_DV_TIMINGS_CAP: OK (Not Supported)
>   test VIDIOC_G/S_EDID: OK (Not Supported)
>
> Test input 0:
>
>   Control ioctls:
>   test VIDIOC_QUERY_EXT_CTRL/QUERYMENU: OK
>   test VIDIOC_QUERYCTRL: OK
>   test VIDIOC_G/S_CTRL: OK
>   test VIDIOC_G/S/TRY_EXT_CTRLS: OK
>   test VIDIOC_(UN)SUBSCRIBE_EVENT/DQEVENT: OK
>   test VIDIOC_G/S_JPEGCOMP: OK (Not Supported)
>   Standard Controls: 12 Private Controls: 0
>
>   Format ioctls:
>   test VIDIOC_ENUM_FMT/FRAMESIZES/FRAMEINTERVALS: OK
>   fail: v4l2-test-formats.cpp(1162): ret && node->has_frmintervals
>   test 

[PATCH v7 00/11] Renesas Capture Engine Unit (CEU) V4L2 driver

2018-01-26 Thread Jacopo Mondi
Hello,
  7th round for CEU driver

This series includes 2 new patches compared to v6 and it is now based on
top of Hans' series:
[PATCHv2 0/9] media: replace g/s_parm by g/s_frame_interval
and makes use of newly introduced v4l2_g/s_parm_cap() functions from v4l2-common
in CEU's g/s_parm() callbacks.

A branch for testing is available at:
git://jmondi.org/linux ceu/media-tree-parm/base
with few patches for Migo-R and GR-Peach applied on top of Hans' media-tree/parm
branch.

The 2 new patches in the series:
[11/11] has been added to silence a v4l2-compliance error, and modifies
ov7670 driver to set all fields of 'struct v4l2_mbus_format' during set_format
operation, including ycbcr_enc, quantization and xfer_func. As the patch commit
reports, this suppresses the following v4l2-compliance error:
fail: v4l2-test-formats.cpp(335): ycbcr_enc >= 0xff

[7/11] has been required by Hans to add frame interval handling to ov772x
driver. As this is quite a big change I kept it in a separate patch to ease
review, it can eventually be squashed on [6/11] if accepted.

If for TW9910 video decoder the same is required (frame interval handling) I'm
in favour of moving that driver to staging as it was proposed for ov772x before
this series.

v4l2-compliance now reports a 0 error count:
Total: 43, Succeeded: 43, Failed: 0, Warnings: 0

Hans, you asked me to run v4l2-compliance with the -f option, I cannot do
that on my tiny GR-Peach as with its limited available system memory it cannot
allocate the number of requested buffers for that test. I can try to tweak that
if necessary. I won't stress here why I cannot do that on Migo-R, long story
short, I need a special compiler with DSP support to run anything but the little
initramfs I have received for SH7722. I've been able to tweak yavta to work and
test capture and frame rate handling with it, but v4l2-compliance is much more
complex and I don't think I'll be able run it on that platform.

Below, v4l2-compliance output:

---
v4l2-compliance SHA   : 20b6624f4bb84353e690d897688fd7ac12d6a881

Driver Info:
Driver name   : renesas-ceu
Card type : Renesas CEU e821.ceu
Bus info  : platform:renesas-ceu-e821.c
Driver version: 4.15.0
Capabilities  : 0x84201000
Video Capture Multiplanar
Streaming
Extended Pix Format
Device Capabilities
Device Caps   : 0x04201000
Video Capture Multiplanar
Streaming
Extended Pix Format

Compliance test for device /dev/video0 (not using libv4l2):

Required ioctls:
test VIDIOC_QUERYCAP: OK

Allow for multiple opens:
test second video open: OK
test VIDIOC_QUERYCAP: OK
test VIDIOC_G/S_PRIORITY: OK
test for unlimited opens: OK

Debug ioctls:
test VIDIOC_DBG_G/S_REGISTER: OK
test VIDIOC_LOG_STATUS: OK (Not Supported)

Input ioctls:
test VIDIOC_G/S_TUNER/ENUM_FREQ_BANDS: OK (Not Supported)
test VIDIOC_G/S_FREQUENCY: OK (Not Supported)
test VIDIOC_S_HW_FREQ_SEEK: OK (Not Supported)
test VIDIOC_ENUMAUDIO: OK (Not Supported)
test VIDIOC_G/S/ENUMINPUT: OK
test VIDIOC_G/S_AUDIO: OK (Not Supported)
Inputs: 1 Audio Inputs: 0 Tuners: 0

Output ioctls:
test VIDIOC_G/S_MODULATOR: OK (Not Supported)
test VIDIOC_G/S_FREQUENCY: OK (Not Supported)
test VIDIOC_ENUMAUDOUT: OK (Not Supported)
test VIDIOC_G/S/ENUMOUTPUT: OK (Not Supported)
test VIDIOC_G/S_AUDOUT: OK (Not Supported)
Outputs: 0 Audio Outputs: 0 Modulators: 0

Input/Output configuration ioctls:
test VIDIOC_ENUM/G/S/QUERY_STD: OK (Not Supported)
test VIDIOC_ENUM/G/S/QUERY_DV_TIMINGS: OK (Not Supported)
test VIDIOC_DV_TIMINGS_CAP: OK (Not Supported)
test VIDIOC_G/S_EDID: OK (Not Supported)

Test input 0:

Control ioctls:
test VIDIOC_QUERY_EXT_CTRL/QUERYMENU: OK
test VIDIOC_QUERYCTRL: OK
test VIDIOC_G/S_CTRL: OK
test VIDIOC_G/S/TRY_EXT_CTRLS: OK
test VIDIOC_(UN)SUBSCRIBE_EVENT/DQEVENT: OK
test VIDIOC_G/S_JPEGCOMP: OK (Not Supported)
Standard Controls: 12 Private Controls: 0

Format ioctls:
test VIDIOC_ENUM_FMT/FRAMESIZES/FRAMEINTERVALS: OK
fail: v4l2-test-formats.cpp(1162): ret && node->has_frmintervals
test VIDIOC_G/S_PARM: OK
test VIDIOC_G_FBUF: OK (Not Supported)
test VIDIOC_G_FMT: OK
test VIDIOC_TRY_FMT: OK
test VIDIOC_S_FMT: OK
test VIDIOC_G_SLICED_VBI_CAP: OK (Not Supported)
test Cropping: OK (Not Supported)
test Composing: OK (Not Supported)
test Scaling: OK (Not Supported)