mbox series

[v4,0/6] media: Introduce Allwinner H3 deinterlace driver

Message ID 20191017183738.68069-1-jernej.skrabec@siol.net
Headers show
Series media: Introduce Allwinner H3 deinterlace driver | expand

Message

Jernej Škrabec Oct. 17, 2019, 6:37 p.m. UTC
Starting with H3, Allwinner began to include standalone deinterlace
core in multimedia oriented SoCs. This patch series introduces support
for it. Note that new SoCs, like H6, have radically different (updated)
deinterlace core, which will need a new driver.

v4l2-compliance report:
v4l2-compliance SHA: dece02f862f38d8f866230ca9f1015cb93ddfac4, 32 bits

Compliance test for sun8i-di device /dev/video0:

Driver Info:
        Driver name      : sun8i-di
        Card type        : sun8i-di
        Bus info         : platform:sun8i-di
        Driver version   : 5.3.0
        Capabilities     : 0x84208000
                Video Memory-to-Memory
                Streaming
                Extended Pix Format
                Device Capabilities
        Device Caps      : 0x04208000
                Video Memory-to-Memory
                Streaming
                Extended Pix Format

Required ioctls:
        test VIDIOC_QUERYCAP: OK

Allow for multiple opens:
        test second /dev/video0 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 (Not Supported)
        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 (Not Supported)
        test VIDIOC_G/S_AUDIO: OK (Not Supported)
        Inputs: 0 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)

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

Format ioctls:
        test VIDIOC_ENUM_FMT/FRAMESIZES/FRAMEINTERVALS: OK
        test VIDIOC_G/S_PARM: OK (Not Supported)
        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

Codec ioctls:
        test VIDIOC_(TRY_)ENCODER_CMD: OK (Not Supported)
        test VIDIOC_G_ENC_INDEX: OK (Not Supported)
        test VIDIOC_(TRY_)DECODER_CMD: OK (Not Supported)

Buffer ioctls:
        test VIDIOC_REQBUFS/CREATE_BUFS/QUERYBUF: OK
        test VIDIOC_EXPBUF: OK
        test Requests: OK (Not Supported)

Total for sun8i-di device /dev/video0: 44, Succeeded: 44, Failed: 0, Warnings: 0

Please take a look.

Best regards,
Jernej

Changes from v3:
- added Maxime's a-b tag
- moved and fixed Kconfig entry
- put clk_set_rate_exclusive() and it's counterpart in PM callbacks

Changes from v2:
- added acked-by and review-by tags
- fixed schema path in H3 deinterlace binding
- moved busy check after format args check

Changes from v1:
- updated Maxime's e-mail in DT binding
- removed "items" for single item in DT binding
- implemented power management
- replaced regmap with direct io access
- set exclusive clock rate
- renamed DEINTERLACE_FRM_CTRL_COEF_CTRL to DEINTERLACE_FRM_CTRL_COEF_ACCESS

Jernej Skrabec (6):
  dt-bindings: bus: sunxi: Add H3 MBUS compatible
  clk: sunxi-ng: h3: Export MBUS clock
  ARM: dts: sunxi: h3/h5: Add MBUS controller node
  dt-bindings: media: Add Allwinner H3 Deinterlace binding
  media: sun4i: Add H3 deinterlace driver
  dts: arm: sun8i: h3: Enable deinterlace unit

 .../bindings/arm/sunxi/sunxi-mbus.txt         |    1 +
 .../media/allwinner,sun8i-h3-deinterlace.yaml |   75 ++
 MAINTAINERS                                   |    7 +
 arch/arm/boot/dts/sun8i-h3.dtsi               |   13 +
 arch/arm/boot/dts/sunxi-h3-h5.dtsi            |    9 +
 drivers/clk/sunxi-ng/ccu-sun8i-h3.h           |    4 -
 drivers/media/platform/Kconfig                |   12 +
 drivers/media/platform/sunxi/Makefile         |    1 +
 .../media/platform/sunxi/sun8i-di/Makefile    |    2 +
 .../media/platform/sunxi/sun8i-di/sun8i-di.c  | 1028 +++++++++++++++++
 .../media/platform/sunxi/sun8i-di/sun8i-di.h  |  237 ++++
 include/dt-bindings/clock/sun8i-h3-ccu.h      |    2 +-
 12 files changed, 1386 insertions(+), 5 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/media/allwinner,sun8i-h3-deinterlace.yaml
 create mode 100644 drivers/media/platform/sunxi/sun8i-di/Makefile
 create mode 100644 drivers/media/platform/sunxi/sun8i-di/sun8i-di.c
 create mode 100644 drivers/media/platform/sunxi/sun8i-di/sun8i-di.h

Comments

Hans Verkuil Oct. 21, 2019, 11:13 a.m. UTC | #1
On 10/17/19 8:37 PM, Jernej Skrabec wrote:
> Allwinner H3 SoC contains deinterlace unit, which has several modes of
> operation - bypass, weave, bob and mixed (advanced) mode. I don't know
> how mixed mode works, but according to Allwinner it gives best results,
> so they use it exclusively. Currently this mode is also hardcoded here.
> 
> For each interleaved frame queued, this driver produces 2 deinterlaced
> frames. Deinterlaced frames are based on 2 consequtive output buffers,
> except for the first 2, where same output buffer is given to peripheral
> as current and previous.
> 
> There is no documentation for this core, so register layout and fixed
> values were taken from BSP driver.
> 
> I'm not sure if maximum size of the image unit is capable to process is
> governed by size of "flag" buffers, frequency or it really is some HW
> limitation. Currently driver can process full HD image in ~15ms (7.5ms
> for each capture buffer), which allows to process 1920x1080@60i video
> smoothly in real time.
> 
> Acked-by: Maxime Ripard <mripard@kernel.org>
> Signed-off-by: Jernej Skrabec <jernej.skrabec@siol.net>
> ---
>  MAINTAINERS                                   |    7 +
>  drivers/media/platform/Kconfig                |   12 +
>  drivers/media/platform/sunxi/Makefile         |    1 +
>  .../media/platform/sunxi/sun8i-di/Makefile    |    2 +
>  .../media/platform/sunxi/sun8i-di/sun8i-di.c  | 1028 +++++++++++++++++
>  .../media/platform/sunxi/sun8i-di/sun8i-di.h  |  237 ++++
>  6 files changed, 1287 insertions(+)
>  create mode 100644 drivers/media/platform/sunxi/sun8i-di/Makefile
>  create mode 100644 drivers/media/platform/sunxi/sun8i-di/sun8i-di.c
>  create mode 100644 drivers/media/platform/sunxi/sun8i-di/sun8i-di.h
> 
> diff --git a/MAINTAINERS b/MAINTAINERS
> index c7b48525822a..c375455125fb 100644
> --- a/MAINTAINERS
> +++ b/MAINTAINERS
> @@ -4646,6 +4646,13 @@ M:	"Maciej W. Rozycki" <macro@linux-mips.org>
>  S:	Maintained
>  F:	drivers/net/fddi/defxx.*
>  
> +DEINTERLACE DRIVERS FOR ALLWINNER H3
> +M:	Jernej Skrabec <jernej.skrabec@siol.net>
> +L:	linux-media@vger.kernel.org
> +T:	git git://linuxtv.org/media_tree.git
> +S:	Maintained
> +F:	drivers/media/platform/sunxi/sun8i-di/

This is missing the bindings file added in the previous patch.

Regards,

	Hans

> +
>  DELL SMBIOS DRIVER
>  M:	Pali Rohár <pali.rohar@gmail.com>
>  M:	Mario Limonciello <mario.limonciello@dell.com>
Hans Verkuil Oct. 21, 2019, 11:16 a.m. UTC | #2
Hi Jernej,

I found something odd in the compliance output:

On 10/17/19 8:37 PM, Jernej Skrabec wrote:
> Starting with H3, Allwinner began to include standalone deinterlace
> core in multimedia oriented SoCs. This patch series introduces support
> for it. Note that new SoCs, like H6, have radically different (updated)
> deinterlace core, which will need a new driver.
> 
> v4l2-compliance report:
> v4l2-compliance SHA: dece02f862f38d8f866230ca9f1015cb93ddfac4, 32 bits
> 
> Compliance test for sun8i-di device /dev/video0:
> 
> Driver Info:
>         Driver name      : sun8i-di
>         Card type        : sun8i-di
>         Bus info         : platform:sun8i-di
>         Driver version   : 5.3.0
>         Capabilities     : 0x84208000
>                 Video Memory-to-Memory
>                 Streaming
>                 Extended Pix Format
>                 Device Capabilities
>         Device Caps      : 0x04208000
>                 Video Memory-to-Memory
>                 Streaming
>                 Extended Pix Format
> 
> Required ioctls:
>         test VIDIOC_QUERYCAP: OK
> 
> Allow for multiple opens:
>         test second /dev/video0 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 (Not Supported)
>         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 (Not Supported)
>         test VIDIOC_G/S_AUDIO: OK (Not Supported)
>         Inputs: 0 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)
> 
> Control ioctls:
>         test VIDIOC_QUERY_EXT_CTRL/QUERYMENU: OK (Not Supported)
>         test VIDIOC_QUERYCTRL: OK (Not Supported)
>         test VIDIOC_G/S_CTRL: OK (Not Supported)
>         test VIDIOC_G/S/TRY_EXT_CTRLS: OK (Not Supported)
>         test VIDIOC_(UN)SUBSCRIBE_EVENT/DQEVENT: OK (Not Supported)
>         test VIDIOC_G/S_JPEGCOMP: OK (Not Supported)
>         Standard Controls: 0 Private Controls: 0
> 
> Format ioctls:
>         test VIDIOC_ENUM_FMT/FRAMESIZES/FRAMEINTERVALS: OK
>         test VIDIOC_G/S_PARM: OK (Not Supported)
>         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

This claims that the driver supports scaling, but I don't think that is right.

More likely the deinterlacing part is what confuses the compliance test.

Can you look in v4l2-test-formats.cpp, function testBasicScaling() where it
sets node->can_scale to true? And see if this is due to a driver bug, or due
to a bug in the test?

Regards,

	Hans

> 
> Codec ioctls:
>         test VIDIOC_(TRY_)ENCODER_CMD: OK (Not Supported)
>         test VIDIOC_G_ENC_INDEX: OK (Not Supported)
>         test VIDIOC_(TRY_)DECODER_CMD: OK (Not Supported)
> 
> Buffer ioctls:
>         test VIDIOC_REQBUFS/CREATE_BUFS/QUERYBUF: OK
>         test VIDIOC_EXPBUF: OK
>         test Requests: OK (Not Supported)
> 
> Total for sun8i-di device /dev/video0: 44, Succeeded: 44, Failed: 0, Warnings: 0
> 
> Please take a look.
> 
> Best regards,
> Jernej
> 
> Changes from v3:
> - added Maxime's a-b tag
> - moved and fixed Kconfig entry
> - put clk_set_rate_exclusive() and it's counterpart in PM callbacks
> 
> Changes from v2:
> - added acked-by and review-by tags
> - fixed schema path in H3 deinterlace binding
> - moved busy check after format args check
> 
> Changes from v1:
> - updated Maxime's e-mail in DT binding
> - removed "items" for single item in DT binding
> - implemented power management
> - replaced regmap with direct io access
> - set exclusive clock rate
> - renamed DEINTERLACE_FRM_CTRL_COEF_CTRL to DEINTERLACE_FRM_CTRL_COEF_ACCESS
> 
> Jernej Skrabec (6):
>   dt-bindings: bus: sunxi: Add H3 MBUS compatible
>   clk: sunxi-ng: h3: Export MBUS clock
>   ARM: dts: sunxi: h3/h5: Add MBUS controller node
>   dt-bindings: media: Add Allwinner H3 Deinterlace binding
>   media: sun4i: Add H3 deinterlace driver
>   dts: arm: sun8i: h3: Enable deinterlace unit
> 
>  .../bindings/arm/sunxi/sunxi-mbus.txt         |    1 +
>  .../media/allwinner,sun8i-h3-deinterlace.yaml |   75 ++
>  MAINTAINERS                                   |    7 +
>  arch/arm/boot/dts/sun8i-h3.dtsi               |   13 +
>  arch/arm/boot/dts/sunxi-h3-h5.dtsi            |    9 +
>  drivers/clk/sunxi-ng/ccu-sun8i-h3.h           |    4 -
>  drivers/media/platform/Kconfig                |   12 +
>  drivers/media/platform/sunxi/Makefile         |    1 +
>  .../media/platform/sunxi/sun8i-di/Makefile    |    2 +
>  .../media/platform/sunxi/sun8i-di/sun8i-di.c  | 1028 +++++++++++++++++
>  .../media/platform/sunxi/sun8i-di/sun8i-di.h  |  237 ++++
>  include/dt-bindings/clock/sun8i-h3-ccu.h      |    2 +-
>  12 files changed, 1386 insertions(+), 5 deletions(-)
>  create mode 100644 Documentation/devicetree/bindings/media/allwinner,sun8i-h3-deinterlace.yaml
>  create mode 100644 drivers/media/platform/sunxi/sun8i-di/Makefile
>  create mode 100644 drivers/media/platform/sunxi/sun8i-di/sun8i-di.c
>  create mode 100644 drivers/media/platform/sunxi/sun8i-di/sun8i-di.h
>
Jernej Škrabec Oct. 21, 2019, 2:38 p.m. UTC | #3
Dne ponedeljek, 21. oktober 2019 ob 13:16:24 CEST je Hans Verkuil napisal(a):
> Hi Jernej,
> 
> I found something odd in the compliance output:
> 
> On 10/17/19 8:37 PM, Jernej Skrabec wrote:
> > Starting with H3, Allwinner began to include standalone deinterlace
> > core in multimedia oriented SoCs. This patch series introduces support
> > for it. Note that new SoCs, like H6, have radically different (updated)
> > deinterlace core, which will need a new driver.
> > 
> > v4l2-compliance report:
> > v4l2-compliance SHA: dece02f862f38d8f866230ca9f1015cb93ddfac4, 32 bits
> > 
> > Compliance test for sun8i-di device /dev/video0:
> > 
> > Driver Info:
> >         Driver name      : sun8i-di
> >         Card type        : sun8i-di
> >         Bus info         : platform:sun8i-di
> >         Driver version   : 5.3.0
> >         Capabilities     : 0x84208000
> >         
> >                 Video Memory-to-Memory
> >                 Streaming
> >                 Extended Pix Format
> >                 Device Capabilities
> >         
> >         Device Caps      : 0x04208000
> >         
> >                 Video Memory-to-Memory
> >                 Streaming
> >                 Extended Pix Format
> > 
> > Required ioctls:
> >         test VIDIOC_QUERYCAP: OK
> > 
> > Allow for multiple opens:
> >         test second /dev/video0 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 (Not Supported)
> >         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 (Not Supported)
> >         test VIDIOC_G/S_AUDIO: OK (Not Supported)
> >         Inputs: 0 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)
> > 
> > Control ioctls:
> >         test VIDIOC_QUERY_EXT_CTRL/QUERYMENU: OK (Not Supported)
> >         test VIDIOC_QUERYCTRL: OK (Not Supported)
> >         test VIDIOC_G/S_CTRL: OK (Not Supported)
> >         test VIDIOC_G/S/TRY_EXT_CTRLS: OK (Not Supported)
> >         test VIDIOC_(UN)SUBSCRIBE_EVENT/DQEVENT: OK (Not Supported)
> >         test VIDIOC_G/S_JPEGCOMP: OK (Not Supported)
> >         Standard Controls: 0 Private Controls: 0
> > 
> > Format ioctls:
> >         test VIDIOC_ENUM_FMT/FRAMESIZES/FRAMEINTERVALS: OK
> >         test VIDIOC_G/S_PARM: OK (Not Supported)
> >         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
> 
> This claims that the driver supports scaling, but I don't think that is
> right.

HW does indeed support scaling so there is no bug. I tested that and result 
looks fine.

Best regards,
Jernej

> 
> More likely the deinterlacing part is what confuses the compliance test.
> 
> Can you look in v4l2-test-formats.cpp, function testBasicScaling() where it
> sets node->can_scale to true? And see if this is due to a driver bug, or due
> to a bug in the test?
> 
> Regards,
> 
> 	Hans
> 
> > Codec ioctls:
> >         test VIDIOC_(TRY_)ENCODER_CMD: OK (Not Supported)
> >         test VIDIOC_G_ENC_INDEX: OK (Not Supported)
> >         test VIDIOC_(TRY_)DECODER_CMD: OK (Not Supported)
> > 
> > Buffer ioctls:
> >         test VIDIOC_REQBUFS/CREATE_BUFS/QUERYBUF: OK
> >         test VIDIOC_EXPBUF: OK
> >         test Requests: OK (Not Supported)
> > 
> > Total for sun8i-di device /dev/video0: 44, Succeeded: 44, Failed: 0,
> > Warnings: 0
> > 
> > Please take a look.
> > 
> > Best regards,
> > Jernej
> > 
> > Changes from v3:
> > - added Maxime's a-b tag
> > - moved and fixed Kconfig entry
> > - put clk_set_rate_exclusive() and it's counterpart in PM callbacks
> > 
> > Changes from v2:
> > - added acked-by and review-by tags
> > - fixed schema path in H3 deinterlace binding
> > - moved busy check after format args check
> > 
> > Changes from v1:
> > - updated Maxime's e-mail in DT binding
> > - removed "items" for single item in DT binding
> > - implemented power management
> > - replaced regmap with direct io access
> > - set exclusive clock rate
> > - renamed DEINTERLACE_FRM_CTRL_COEF_CTRL to
> > DEINTERLACE_FRM_CTRL_COEF_ACCESS> 
> > Jernej Skrabec (6):
> >   dt-bindings: bus: sunxi: Add H3 MBUS compatible
> >   clk: sunxi-ng: h3: Export MBUS clock
> >   ARM: dts: sunxi: h3/h5: Add MBUS controller node
> >   dt-bindings: media: Add Allwinner H3 Deinterlace binding
> >   media: sun4i: Add H3 deinterlace driver
> >   dts: arm: sun8i: h3: Enable deinterlace unit
> >  
> >  .../bindings/arm/sunxi/sunxi-mbus.txt         |    1 +
> >  .../media/allwinner,sun8i-h3-deinterlace.yaml |   75 ++
> >  MAINTAINERS                                   |    7 +
> >  arch/arm/boot/dts/sun8i-h3.dtsi               |   13 +
> >  arch/arm/boot/dts/sunxi-h3-h5.dtsi            |    9 +
> >  drivers/clk/sunxi-ng/ccu-sun8i-h3.h           |    4 -
> >  drivers/media/platform/Kconfig                |   12 +
> >  drivers/media/platform/sunxi/Makefile         |    1 +
> >  .../media/platform/sunxi/sun8i-di/Makefile    |    2 +
> >  .../media/platform/sunxi/sun8i-di/sun8i-di.c  | 1028 +++++++++++++++++
> >  .../media/platform/sunxi/sun8i-di/sun8i-di.h  |  237 ++++
> >  include/dt-bindings/clock/sun8i-h3-ccu.h      |    2 +-
> >  12 files changed, 1386 insertions(+), 5 deletions(-)
> >  create mode 100644
> >  Documentation/devicetree/bindings/media/allwinner,sun8i-h3-deinterlace.y
> >  aml create mode 100644 drivers/media/platform/sunxi/sun8i-di/Makefile
> >  create mode 100644 drivers/media/platform/sunxi/sun8i-di/sun8i-di.c
> >  create mode 100644 drivers/media/platform/sunxi/sun8i-di/sun8i-di.h
Jernej Škrabec Oct. 21, 2019, 2:47 p.m. UTC | #4
Dne ponedeljek, 21. oktober 2019 ob 13:13:20 CEST je Hans Verkuil napisal(a):
> On 10/17/19 8:37 PM, Jernej Skrabec wrote:
> > Allwinner H3 SoC contains deinterlace unit, which has several modes of
> > operation - bypass, weave, bob and mixed (advanced) mode. I don't know
> > how mixed mode works, but according to Allwinner it gives best results,
> > so they use it exclusively. Currently this mode is also hardcoded here.
> > 
> > For each interleaved frame queued, this driver produces 2 deinterlaced
> > frames. Deinterlaced frames are based on 2 consequtive output buffers,
> > except for the first 2, where same output buffer is given to peripheral
> > as current and previous.
> > 
> > There is no documentation for this core, so register layout and fixed
> > values were taken from BSP driver.
> > 
> > I'm not sure if maximum size of the image unit is capable to process is
> > governed by size of "flag" buffers, frequency or it really is some HW
> > limitation. Currently driver can process full HD image in ~15ms (7.5ms
> > for each capture buffer), which allows to process 1920x1080@60i video
> > smoothly in real time.
> > 
> > Acked-by: Maxime Ripard <mripard@kernel.org>
> > Signed-off-by: Jernej Skrabec <jernej.skrabec@siol.net>
> > ---
> > 
> >  MAINTAINERS                                   |    7 +
> >  drivers/media/platform/Kconfig                |   12 +
> >  drivers/media/platform/sunxi/Makefile         |    1 +
> >  .../media/platform/sunxi/sun8i-di/Makefile    |    2 +
> >  .../media/platform/sunxi/sun8i-di/sun8i-di.c  | 1028 +++++++++++++++++
> >  .../media/platform/sunxi/sun8i-di/sun8i-di.h  |  237 ++++
> >  6 files changed, 1287 insertions(+)
> >  create mode 100644 drivers/media/platform/sunxi/sun8i-di/Makefile
> >  create mode 100644 drivers/media/platform/sunxi/sun8i-di/sun8i-di.c
> >  create mode 100644 drivers/media/platform/sunxi/sun8i-di/sun8i-di.h
> > 
> > diff --git a/MAINTAINERS b/MAINTAINERS
> > index c7b48525822a..c375455125fb 100644
> > --- a/MAINTAINERS
> > +++ b/MAINTAINERS
> > @@ -4646,6 +4646,13 @@ M:	"Maciej W. Rozycki" <macro@linux-mips.org>
> > 
> >  S:	Maintained
> >  F:	drivers/net/fddi/defxx.*
> > 
> > +DEINTERLACE DRIVERS FOR ALLWINNER H3
> > +M:	Jernej Skrabec <jernej.skrabec@siol.net>
> > +L:	linux-media@vger.kernel.org
> > +T:	git git://linuxtv.org/media_tree.git
> > +S:	Maintained
> > +F:	drivers/media/platform/sunxi/sun8i-di/
> 
> This is missing the bindings file added in the previous patch.

Well, I listed Maxime and Chen-Yu as binding maintainers in patch 4, so that's 
why I didn't include it here. If you think I should be maintainer of that 
binding too, I can change that. I took sun6i-csi as example where binding 
maintainers are Maxime and Chen-Yu and driver maintainer is Yong Deng.

Best regards,
Jernej

> 
> Regards,
> 
> 	Hans
> 
> > +
> > 
> >  DELL SMBIOS DRIVER
> >  M:	Pali Rohár <pali.rohar@gmail.com>
> >  M:	Mario Limonciello <mario.limonciello@dell.com>
Hans Verkuil Oct. 21, 2019, 3:07 p.m. UTC | #5
On 10/21/19 4:47 PM, Jernej Škrabec wrote:
> Dne ponedeljek, 21. oktober 2019 ob 13:13:20 CEST je Hans Verkuil napisal(a):
>> On 10/17/19 8:37 PM, Jernej Skrabec wrote:
>>> Allwinner H3 SoC contains deinterlace unit, which has several modes of
>>> operation - bypass, weave, bob and mixed (advanced) mode. I don't know
>>> how mixed mode works, but according to Allwinner it gives best results,
>>> so they use it exclusively. Currently this mode is also hardcoded here.
>>>
>>> For each interleaved frame queued, this driver produces 2 deinterlaced
>>> frames. Deinterlaced frames are based on 2 consequtive output buffers,
>>> except for the first 2, where same output buffer is given to peripheral
>>> as current and previous.
>>>
>>> There is no documentation for this core, so register layout and fixed
>>> values were taken from BSP driver.
>>>
>>> I'm not sure if maximum size of the image unit is capable to process is
>>> governed by size of "flag" buffers, frequency or it really is some HW
>>> limitation. Currently driver can process full HD image in ~15ms (7.5ms
>>> for each capture buffer), which allows to process 1920x1080@60i video
>>> smoothly in real time.
>>>
>>> Acked-by: Maxime Ripard <mripard@kernel.org>
>>> Signed-off-by: Jernej Skrabec <jernej.skrabec@siol.net>
>>> ---
>>>
>>>  MAINTAINERS                                   |    7 +
>>>  drivers/media/platform/Kconfig                |   12 +
>>>  drivers/media/platform/sunxi/Makefile         |    1 +
>>>  .../media/platform/sunxi/sun8i-di/Makefile    |    2 +
>>>  .../media/platform/sunxi/sun8i-di/sun8i-di.c  | 1028 +++++++++++++++++
>>>  .../media/platform/sunxi/sun8i-di/sun8i-di.h  |  237 ++++
>>>  6 files changed, 1287 insertions(+)
>>>  create mode 100644 drivers/media/platform/sunxi/sun8i-di/Makefile
>>>  create mode 100644 drivers/media/platform/sunxi/sun8i-di/sun8i-di.c
>>>  create mode 100644 drivers/media/platform/sunxi/sun8i-di/sun8i-di.h
>>>
>>> diff --git a/MAINTAINERS b/MAINTAINERS
>>> index c7b48525822a..c375455125fb 100644
>>> --- a/MAINTAINERS
>>> +++ b/MAINTAINERS
>>> @@ -4646,6 +4646,13 @@ M:	"Maciej W. Rozycki" <macro@linux-mips.org>
>>>
>>>  S:	Maintained
>>>  F:	drivers/net/fddi/defxx.*
>>>
>>> +DEINTERLACE DRIVERS FOR ALLWINNER H3
>>> +M:	Jernej Skrabec <jernej.skrabec@siol.net>
>>> +L:	linux-media@vger.kernel.org
>>> +T:	git git://linuxtv.org/media_tree.git
>>> +S:	Maintained
>>> +F:	drivers/media/platform/sunxi/sun8i-di/
>>
>> This is missing the bindings file added in the previous patch.
> 
> Well, I listed Maxime and Chen-Yu as binding maintainers in patch 4, so that's 
> why I didn't include it here. If you think I should be maintainer of that 
> binding too, I can change that. I took sun6i-csi as example where binding 
> maintainers are Maxime and Chen-Yu and driver maintainer is Yong Deng.

Normally, whoever maintains the driver also maintains the corresponding bindings
documentation. It doesn't make much sense to have different people maintain it.

I see that the 'maintainers:' tag is now a valid way of describing maintainers.
But it doesn't appear to be read by scripts/get_maintainer.pl AFAICS.

So unless I am wrong about that I think it still should be added to MAINTAINERS.
It's certainly done for other drivers (grep yaml MAINTAINERS).

In my view you should include yourself as maintainer of this bindings doc, and
add it to the MAINTAINERS file.

Regards,

	Hans

> 
> Best regards,
> Jernej
> 
>>
>> Regards,
>>
>> 	Hans
>>
>>> +
>>>
>>>  DELL SMBIOS DRIVER
>>>  M:	Pali Rohár <pali.rohar@gmail.com>
>>>  M:	Mario Limonciello <mario.limonciello@dell.com>
> 
> 
> 
>