mbox series

[v3,0/6] rcar-vin: Add support for V4L2_FIELD_ALTERNATE

Message ID 20190904215409.30136-1-niklas.soderlund+renesas@ragnatech.se (mailing list archive)
Headers show
Series rcar-vin: Add support for V4L2_FIELD_ALTERNATE | expand

Message

Niklas Söderlund Sept. 4, 2019, 9:54 p.m. UTC
Hi,

This series adds support for V4L2_FIELD_ALTERNATE to rcar-vin. This
removes a limitation in the driver where a video sources delivering
video using the alternating field format was forced to use the rcar-vin
interlacer and V4L2_FIELD_INTERLACED was delivers to the user. After
this series the use of the interlacer is still default but the user have
the option to explicit ask for alternate.

It is based on latest media-tree and tested on R-Car Gen2 and Gen3
hardware.

Patch 1/6, 2/6 and 3/6 prepares for the work by fixing a broken return
statement, use available macros and renaming a poorly variable. Patch
4/6 fixes a problem with scaling (Gen2 only) which was found when
testing alternating between V4L2_FIELD_ALTERNATE and
V4L2_FIELD_INTERLACED. Patch 5/6 is the real change adding support for
the new field format. Last 6/6 takes advantage of that the hardware
interlacer is no longer a requirement and removes a bit of ugly code as
a result.

Niklas Söderlund (6):
  rcar-vin: Fix incorrect return statement in rvin_try_format()
  rcar-vin: Make use of V4L2_FIELD_IS_INTERLACED() macro
  rcar-vin: Rename rectangle holding the video source information
  rcar-vin: Do not reset the crop and compose rectangles in s_fmt
  rcar-vin: Add support for V4L2_FIELD_ALTERNATE
  rcar-vin: Clean up how format is set on subdevice

 drivers/media/platform/rcar-vin/rcar-dma.c  |  54 ++++++-----
 drivers/media/platform/rcar-vin/rcar-v4l2.c | 101 ++++++++++----------
 drivers/media/platform/rcar-vin/rcar-vin.h  |   4 +-
 3 files changed, 79 insertions(+), 80 deletions(-)

Comments

Hans Verkuil Sept. 27, 2019, 7:46 a.m. UTC | #1
Hi Niklas,

On 9/4/19 11:54 PM, Niklas Söderlund wrote:
> Hi,
> 
> This series adds support for V4L2_FIELD_ALTERNATE to rcar-vin. This
> removes a limitation in the driver where a video sources delivering
> video using the alternating field format was forced to use the rcar-vin
> interlacer and V4L2_FIELD_INTERLACED was delivers to the user. After
> this series the use of the interlacer is still default but the user have
> the option to explicit ask for alternate.
> 
> It is based on latest media-tree and tested on R-Car Gen2 and Gen3
> hardware.
> 
> Patch 1/6, 2/6 and 3/6 prepares for the work by fixing a broken return
> statement, use available macros and renaming a poorly variable. Patch
> 4/6 fixes a problem with scaling (Gen2 only) which was found when
> testing alternating between V4L2_FIELD_ALTERNATE and
> V4L2_FIELD_INTERLACED. Patch 5/6 is the real change adding support for
> the new field format. Last 6/6 takes advantage of that the hardware
> interlacer is no longer a requirement and removes a bit of ugly code as
> a result.

I'm taking patches 1-5, but postpone merging patch 6/6 until it has
been reviewed/acked by Laurent or Kieran.

Regards,

	Hans

> 
> Niklas Söderlund (6):
>   rcar-vin: Fix incorrect return statement in rvin_try_format()
>   rcar-vin: Make use of V4L2_FIELD_IS_INTERLACED() macro
>   rcar-vin: Rename rectangle holding the video source information
>   rcar-vin: Do not reset the crop and compose rectangles in s_fmt
>   rcar-vin: Add support for V4L2_FIELD_ALTERNATE
>   rcar-vin: Clean up how format is set on subdevice
> 
>  drivers/media/platform/rcar-vin/rcar-dma.c  |  54 ++++++-----
>  drivers/media/platform/rcar-vin/rcar-v4l2.c | 101 ++++++++++----------
>  drivers/media/platform/rcar-vin/rcar-vin.h  |   4 +-
>  3 files changed, 79 insertions(+), 80 deletions(-)
>