t; Regards,
>
> Hans
>
> On 5/18/19 3:07 AM, Niklas Söderlund wrote:
> > Hi,
> >
> > This series adds support for two (or more) capture devices to be
> > connected to the same senors and run simultaneously. Each capture device
> > can be started a
Hi Biju,
Thanks for your work.
On 2019-10-15 11:57:54 +0100, Biju Das wrote:
> This patch series add VIN/CSI-2 driver support for RZ/G2N SoC.
For the whole series,
Reviewed-by: Niklas Söderlund
>
> Biju Das (4):
> media: dt-bindings: rcar-vin: Add R8A774B1 support
> med
Set the V4L2_CAP_IO_MC capability flag and remove the driver specific
enum, get and set input callbacks.
Signed-off-by: Niklas Söderlund
---
drivers/staging/media/ipu3/ipu3-v4l2.c | 60 +-
1 file changed, 2 insertions(+), 58 deletions(-)
diff --git a/drivers/staging
Set the V4L2_CAP_IO_MC capability flag and remove the driver specific
enum, get and set input callbacks for the media controller enabled mode
of the driver.
Signed-off-by: Niklas Söderlund
---
drivers/media/platform/rcar-vin/rcar-v4l2.c | 17 +
1 file changed, 1 insertion(+), 16
hose.
1. https://patchwork.linuxtv.org/patch/41857/
Niklas Söderlund (3):
v4l2-dev/ioctl: Add V4L2_CAP_IO_MC
rcar-vin: Make use of V4L2_CAP_IO_MC
staging/intel-ipu3: Make use of V4L2_CAP_IO_MC
.../media/uapi/v4l/vidioc-querycap.rst| 3 +
.../media/videodev2.h.rst.exceptions | 1 +
drivers
: Helen Koike
Signed-off-by: Niklas Söderlund
---
.../media/uapi/v4l/vidioc-querycap.rst| 3 +
.../media/videodev2.h.rst.exceptions | 1 +
drivers/media/v4l2-core/v4l2-dev.c| 24 +++--
drivers/media/v4l2-core/v4l2-ioctl.c | 87 ++-
include/uapi
Most but not all Gen3 hardware support outputting NV12, add a flag to
indicate which SoCs do support it.
Signed-off-by: Niklas Söderlund
---
drivers/media/platform/rcar-vin/rcar-core.c | 6 ++
drivers/media/platform/rcar-vin/rcar-vin.h | 2 ++
2 files changed, 8 insertions(+)
diff --git a
. While patch 2/2 is the real change
adding the format and register writes to deliver NV12.
Niklas Söderlund (2):
rcar-vin: Define which hardware supports NV12
rcar-vin: Add support for outputting NV12
drivers/media/platform/rcar-vin/rcar-core.c | 6
drivers/media/platform/rcar-vin/rcar
Most Gen3 boards can output frames in NV12 format, add support for this
with a runtime check that the running hardware supports it.
Signed-off-by: Niklas Söderlund
Reviewed-by: Simon Horman
---
drivers/media/platform/rcar-vin/rcar-dma.c | 5 ++-
drivers/media/platform/rcar-vin/rcar-v4l2.c
If a pixel format is not supported by the hardware NULL is returned by
rvin_format_from_pixel() for that fourcc. Verify that the pixel format
is supported using this or skip it when enumerating.
Signed-off-by: Niklas Söderlund
---
drivers/media/platform/rcar-vin/rcar-v4l2.c | 20
for the two new field
formats.
Niklas Söderlund (2):
rcar-vin: Move hardware buffer tracking to own struct
rcar-vin: Add support for V4L2_FIELD_SEQ_{TB,BT}
drivers/media/platform/rcar-vin/rcar-dma.c | 80 -
drivers/media/platform/rcar-vin/rcar-v4l2.c | 7 +-
drivers
To support SEQ_TB/BT not all buffers given to the hardware will be
equal, the driver needs to keep track of different buffer types. Move
the tracking of buffers given to hardware into a struct so additional
tracking fields can be associated with each buffer.
Signed-off-by: Niklas Söderlund
The hardware does not support capturing the field types
V4L2_FIELD_SEQ_TB and V4L2_FIELD_SEQ_BT. To capture in these formats the
driver needs to adjust the offset of the capture buffer and capture
twice to each vb2 buffer.
Signed-off-by: Niklas Söderlund
---
drivers/media/platform/rcar-vin/rcar
Hi Simon,
Sorry for missing this mail.
On 2019-09-08 13:20:59 +0100, Simon Horman wrote:
> On Fri, Sep 06, 2019 at 04:40:28PM +0200, Niklas Söderlund wrote:
> > Most but not all Gen3 boards support outputting NV12, add a flag to
> > indicate which boards.
> >
> > Sign
Hi,
This small series clean up how formats coming from the subdevice is
handled inside the driver. The changes are made possible after recent
VIN patches paved the way.
There should not be any functional changes in this series.
Niklas Söderlund (2):
rcar-vin: Rename wrongly named rectangle
After recent refactoring the rectangle named crop no longer reflects it
usage, to contain the source rectangle. Fix this by renaming it. There
is no functional change.
Signed-off-by: Niklas Söderlund
---
drivers/media/platform/rcar-vin/rcar-v4l2.c | 21 +++--
1 file changed, 11
.
Signed-off-by: Niklas Söderlund
---
drivers/media/platform/rcar-vin/rcar-v4l2.c | 25 +
1 file changed, 11 insertions(+), 14 deletions(-)
diff --git a/drivers/media/platform/rcar-vin/rcar-v4l2.c
b/drivers/media/platform/rcar-vin/rcar-v4l2.c
index f809350c514c337c
. While patch 2/2 is the real change
adding the format and register writes to deliver NV12.
Niklas Söderlund (2):
rcar-vin: Define which hardware supports NV12
rcar-vin: Add support for outputting NV12
drivers/media/platform/rcar-vin/rcar-core.c | 6
drivers/media/platform/rcar-vin/rcar
Most but not all Gen3 boards support outputting NV12, add a flag to
indicate which boards.
Signed-off-by: Niklas Söderlund
---
drivers/media/platform/rcar-vin/rcar-core.c | 6 ++
drivers/media/platform/rcar-vin/rcar-vin.h | 2 ++
2 files changed, 8 insertions(+)
diff --git a/drivers/media
Most Gen3 boards can output frames in NV12 format, add support for this
with a runtime check that the running hardware support it.
Signed-off-by: Niklas Söderlund
---
drivers/media/platform/rcar-vin/rcar-dma.c | 5 ++-
drivers/media/platform/rcar-vin/rcar-v4l2.c | 39 +
2
If a pixel format is not supported by the hardware NULL is returned by
rvin_format_from_pixel() for that fourcc. Verify that the pixel format
is supported using this or skip it when enumerating.
Signed-off-by: Niklas Söderlund
---
drivers/media/platform/rcar-vin/rcar-v4l2.c | 12 +++-
1
To support SEQ_TB/BT not all buffers given to the hardware will be
equal, the driver needs to keep track of different buffer types. Move
the tracking of buffers given to hardware into a struct so additional
tracking fields can be associated with each buffer.
Signed-off-by: Niklas Söderlund
The hardware do not support capturing the field types V4L2_FIELD_SEQ_TB
and V4L2_FIELD_SEQ_BT. To capture in these formats the driver needs to
adjust the offset of the capture buffer and capture twice to each vb2
buffer.
Signed-off-by: Niklas Söderlund
---
drivers/media/platform/rcar-vin/rcar
two new field
formats.
1. [PATCH v3 0/6] rcar-vin: Add support for V4L2_FIELD_ALTERNATE
Niklas Söderlund (2):
rcar-vin: Move hardware buffer tracking to own struct
rcar-vin: Add support for V4L2_FIELD_SEQ_{TB,BT}
drivers/media/platform/rcar-vin/rcar-dma.c | 80 -
drivers
The image size is doubled for NV16 and is calculated as bytesperline *
height * 2 to accommodate the split of UV data. When writing the offset
to hardware width is used instead of bytesperline, fix this.
Signed-off-by: Niklas Söderlund
---
drivers/media/platform/rcar-vin/rcar-dma.c | 4 ++--
1
While refactoring code the return statement became corrupted, fix it by
returning the correct return code.
Reported-by: Kieran Bingham
Fixes: 897e371389e77514 ("media: rcar-vin: simplify how formats are set and
reset"
Signed-off-by: Niklas Söderlund
Reviewed-by: Lauren
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
The V4L2_FIELD_IS_INTERLACED() can be used to make the code more
readable, use it.
Signed-off-by: Niklas Söderlund
Reviewed-by: Laurent Pinchart
---
drivers/media/platform/rcar-vin/rcar-dma.c | 11 +++
1 file changed, 3 insertions(+), 8 deletions(-)
diff --git a/drivers/media/platform
The variable to hold the video source information dimensions was poorly
named 'source'. This is confusing as a lot of other members of structs
share the same name with different purposes, rename it src_rect in
preparation of refactoring code.
Signed-off-by: Niklas Söderlund
Reviewed-
The crop and compose rectangles are reset when s_fmt is called
resulting in potentially valid rectangles being lost when updating the
format. Fix this by mapping the rectangles inside the new format.
Signed-off-by: Niklas Söderlund
Reviewed-by: Kieran Bingham
---
drivers/media/platform/rcar
interlaced frame. After this change the user can
request to receive frames as alternate if the sensor provides it.
Signed-off-by: Niklas Söderlund
---
drivers/media/platform/rcar-vin/rcar-dma.c | 43 +
drivers/media/platform/rcar-vin/rcar-v4l2.c | 31 +++
2 files
With support for V4L2_FIELD_ALTERNATE added it's possible to clean up
how formats are set on the subdevice. This makes the code easier to read
as variable names now more clearly express their intent.
Signed-off-by: Niklas Söderlund
---
drivers/media/platform/rcar-vin/rcar-v4l2.c
Hi Laurent,
Thanks for your feedback.
On 2019-08-08 11:30:45 +0300, Laurent Pinchart wrote:
> Hi Niklas,
>
> Thank you for the patch.
>
> On Thu, Aug 08, 2019 at 03:18:47AM +0200, Niklas Söderlund wrote:
> > The variable to hold the video source information dimensions
making the driver and userspace
> >> implementations overly difficult and prone to repetitive mistakes,
> >> - the above also limiting the flexibility of the API - formats, frame
> >> rates, etc. set using distinct APIs, not covered by Request API, with
> >> non-failure "negotiation hell", etc.
> >> - lack of fences, etc.
> >>
> >> Jacopo:
> >>
> >> Apart from discussing libcamera and hope we could kickstart a review of
> >> its API, I would like to re-start discussing multiplexed stream support,
> >> but that would require Sakari to be there, something I'm not certain
> >> about. Sakari?
> >>
> >> Alexandre:
> >>
> >> If Collabora/Bootlin is there, I'd certainly want to discuss stateless
> >> codecs, in particular m2m codec helpers and finalize the specification
> >> in general.
> >>
> >> Regards,
> >>
> >>Hans
> >>
> >
>
--
Regards,
Niklas Söderlund
Hi Kieran,
On 2019-08-09 13:12:49 +0100, Kieran Bingham wrote:
> On 09/08/2019 13:04, Niklas Söderlund wrote:
> > Hi Kieran,
> >
> > Thanks for your feedback.
> >
> > On 2019-08-09 09:09:43 +0100, Kieran Bingham wrote:
> >> Hi Niklas,
> >>
>
s to clean up notifiers
and unified naming of the private data structure.
--
Regards,
Niklas Söderlund
.
Laurent Pinchart (1):
dt-bindings: media: i2c: Add bindings for Maxim Integrated MAX9286
Niklas Söderlund (1):
max9286: Add MAX9286 driver
.../bindings/media/i2c/maxim,max9286.txt | 182 +++
MAINTAINERS | 10 +
drivers/media/i2c/Kconfig
Söderlund
Signed-off-by: Niklas Söderlund
---
.../bindings/media/i2c/maxim,max9286.txt | 182 ++
1 file changed, 182 insertions(+)
create mode 100644
Documentation/devicetree/bindings/media/i2c/maxim,max9286.txt
diff --git a/Documentation/devicetree/bindings/media/i2c/maxim
: Jacopo Mondi
Signed-off-by: Kieran Bingham
Signed-off-by: Laurent Pinchart
Signed-off-by: Niklas Söderlund
---
MAINTAINERS | 10 +
drivers/media/i2c/Kconfig | 11 +
drivers/media/i2c/Makefile |1 +
drivers/media/i2c/max9286.c | 1081
Hi Laurent,
Thanks for your feedback.
On 2019-08-08 11:37:51 +0300, Laurent Pinchart wrote:
> Hi Niklas,
>
> Thank you for the patch.
>
> On Thu, Aug 08, 2019 at 03:18:48AM +0200, Niklas Söderlund wrote:
> > The crop and compose rectangles are reset when s_fmt is ca
The image stride was adjusted when it was written to hardware and not
when configuring the format. Calculate the correct stride value and
report it to userspace.
Signed-off-by: Niklas Söderlund
---
drivers/media/platform/rcar-vin/rcar-dma.c | 10 ++
drivers/media/platform/rcar-vin/rcar
The crop and compose rectangles are reset when s_fmt is called
resulting in potentially valid rectangles being lost when updating the
format. Fix this by mapping the rectangles inside the new format.
Signed-off-by: Niklas Söderlund
Reviewed-by: Kieran Bingham
---
drivers/media/platform/rcar
The variable to hold the video source information dimensions was poorly
named 'source'. This is confusing as a lot of other members of structs
share the same name with different purposes, rename it src_rect in
preparation of refactoring code.
Signed-off-by: Niklas Söderlund
Reviewed-
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
While refactoring code the return statement became corrupted, fix it by
returning the correct return code.
Reported-by: Kieran Bingham
Fixes: 897e371389e77514 ("media: rcar-vin: simplify how formats are set and
reset"
Signed-off-by: Niklas Söderlund
---
drivers/media/platform/rca
With support for V4L2_FIELD_ALTERNATE added it's possible to clean up
how formats are set on the subdevice. This makes the code easier to read
as variable names now more clearly express their intent.
Signed-off-by: Niklas Söderlund
---
drivers/media/platform/rcar-vin/rcar-v4l2.c
interlaced frame. After this change the user can
request to receive frames as alternate if the sensor provides it.
Signed-off-by: Niklas Söderlund
---
drivers/media/platform/rcar-vin/rcar-dma.c | 43 +
drivers/media/platform/rcar-vin/rcar-v4l2.c | 31 +++
2 files
The V4L2_FIELD_IS_INTERLACED() can be used to make the code more
readable, use it.
Signed-off-by: Niklas Söderlund
---
drivers/media/platform/rcar-vin/rcar-dma.c | 11 +++
1 file changed, 3 insertions(+), 8 deletions(-)
diff --git a/drivers/media/platform/rcar-vin/rcar-dma.c
b/drivers
Renesas media binding documentation files uses a naming schema of
'renesas,.txt'. Rename VIN and CSI-2 files to match this
pattern.
Signed-off-by: Niklas Söderlund
Reviewed-by: Geert Uytterhoeven
Reviewed-by: Ulrich Hecht
Reviewed-by: Simon Horman
---
.../media/{renesas,rca
HI Kieran,
Thanks for your review!
On 2019-07-19 12:13:30 +0100, Kieran Bingham wrote:
> Hi Niklas,
>
> On 05/07/2019 05:55, Niklas Söderlund wrote:
> > The hardware is capable to passing V4L2_FIELD_ALTERNATE to user-space.
> > Allow users to request this field format but s
Hi Simon,
Thanks for your work.
On 2019-07-29 09:47:57 +0200, Simon Horman wrote:
> Renesas media binding documentation files uses a naming schema of
> 'renesas,.txt'. Rename IMR file to match this pattern.
>
> Cc: Niklas Söderlund
> Signed-off-by: Simon Horman
Revi
Hi,
On 2019-07-29 09:43:55 +0200, Simon Horman wrote:
> On Fri, Jul 12, 2019 at 04:17:03PM +0900, Niklas Söderlund wrote:
> > Hi,
> >
> > A gentle ping on this patch. I assume if it could get a ack from Rob it
> > could be taken in thru the media-tree?
>
> Give
Hi,
A gentle ping on this patch. I assume if it could get a ack from Rob it
could be taken in thru the media-tree?
On 2019-06-12 23:12:41 +0200, Niklas Söderlund wrote:
> Renesas media binding documentation files uses a naming schema of
> 'renesas,.txt'. Rename VIN and CSI-2 fil
Hi Helen,
Thanks for your feedback.
On 2019-07-09 15:24:10 -0300, Helen Koike wrote:
> Hi Niklas,
>
> Thanks for the patch (and sorry for my late reply).
>
> On 5/17/19 10:07 PM, Niklas Söderlund wrote:
> > A sensor which is running is already part of a pipeline and tryi
.
Niklas Söderlund (4):
rcar-vin: Rename rectangle holding 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
The hardware is capable to passing V4L2_FIELD_ALTERNATE to user-space.
Allow users to request this field format but still default to using the
hardware interlacer if alternating is not explicitly requested.
Signed-off-by: Niklas Söderlund
---
drivers/media/platform/rcar-vin/rcar-dma.c | 54
The variable to hold the video source information dimensions was poorly
named 'source'. This is confusing as a lot of other members of struts
share the same name with different purposes, rename it src_rect in
preparation of refactoring code.
Signed-off-by: Niklas Söderlund
---
dri
With support for V4L2_FIELD_ALTERNATE added it's possible to clean up
how formats are set on the subdevice. This makes the code easier to read
as variable names now more clearly express their intent.
Signed-off-by: Niklas Söderlund
---
drivers/media/platform/rcar-vin/rcar-v4l2.c
The crop and compose rectangles where reset when s_fmt was called
resulting in potentially valid rectangles where lost when updating the
format. Fix this by instead trying to map the rectangles inside the new
format.
Signed-off-by: Niklas Söderlund
---
drivers/media/platform/rcar-vin/rcar-v4l2
Instead of scattering black listing of pixel formats who are not
supported on particular platforms move it to a central location.
Signed-off-by: Niklas Söderlund
---
drivers/media/platform/rcar-vin/rcar-dma.c | 2 +-
drivers/media/platform/rcar-vin/rcar-v4l2.c | 23
The value have nothing to do with ARGB1555, it controls if the alpha
component should be filled in for ARGB1555 or ARGB888. Rename it to
reflect this.
Signed-off-by: Niklas Söderlund
Reviewed-by: Ulrich Hecht
Reviewed-by: Laurent Pinchart
Reviewed-by: Kieran Bingham
---
drivers/media
the media
controller centric Gen3 mode of the driver.
Niklas Söderlund (4):
rcar-vin: Rename VNDMR_DTMD_ARGB1555 to VNDMR_DTMD_ARGB
rcar-vin: Add control for alpha component
rcar-vin: Add support for RGB formats with alpha component
rcar-vin: Always setup controls when opening video
The R-Car VIN module supports V4L2_PIX_FMT_ARGB555 and
V4L2_PIX_FMT_ABGR32 pixel formats. Add the hardware register setup and
allow the alpha component to be changed while streaming using the
V4L2_CID_ALPHA_COMPONENT control.
Signed-off-by: Niklas Söderlund
Reviewed-by: Laurent Pinchart
In preparation to adding support for RGB pixel formats with an alpha
component add a control to allow the user to control which alpha value
should be used.
Signed-off-by: Niklas Söderlund
Reviewed-by: Laurent Pinchart
Reviewed-by: Kieran Bingham
---
drivers/media/platform/rcar-vin/rcar-core.c
Now that both Gen2 (video device centric) and Gen3 (media device
centric) modes of the driver have controls it is required to always
setup the controls when opening the devices. Remove the check which only
calls v4l2_ctrl_handler_setup() for Gen2 and call it unconditionally.
Signed-off-by: Niklas
Hi Kieran,
Thanks for your feedback.
On 2019-07-04 16:15:54 +0100, Kieran Bingham wrote:
> Hi Niklas,
>
> On 04/07/2019 02:58, Niklas Söderlund wrote:
> > In preparation to adding support for RGB pixel formats with an alpha
> > component add a control to allow the user t
Now that both Gen2 (device centric) and Gen3 (media device centric)
modes of this driver have controls it make sens to call
v4l2_ctrl_handler_setup() unconditionally when opening the video device.
Signed-off-by: Niklas Söderlund
---
drivers/media/platform/rcar-vin/rcar-v4l2.c | 30
The R-Car VIN module supports V4L2_PIX_FMT_ARGB555 and
V4L2_PIX_FMT_ABGR32 pixel formats. Add the hardware register setup and
allow the alpha component to be changed while streaming using the
V4L2_CID_ALPHA_COMPONENT control.
Signed-off-by: Niklas Söderlund
---
drivers/media/platform/rcar-vin
()
should be called for both cases.
* Changes since v2
- Protect the writing of the alpha value when streaming with the spin
lock to make sure the streaming state is stable.
- Add patch 4/4 to call v4l2_ctrl_handler_setup() for the media
controller centric Gen3 mode of the driver.
Niklas
The value have nothing to do with ARGB1555, it controls if the alpha
component should be filled in for ARGB1555 or ARGB888. Rename it to
reflect this.
Signed-off-by: Niklas Söderlund
Reviewed-by: Ulrich Hecht
Reviewed-by: Laurent Pinchart
---
drivers/media/platform/rcar-vin/rcar-dma.c | 4
In preparation to adding support for RGB pixel formats with an alpha
component add a control to allow the user to control which alpha value
should be used.
Signed-off-by: Niklas Söderlund
Reviewed-by: Laurent Pinchart
---
drivers/media/platform/rcar-vin/rcar-core.c | 53
ocator, which I
> have pointed out numerous times and has never been addressed (and which
> explains why I didn't think the code was ready to be merged) is that the
> media_device contains operations that are based on having a single
> driver controlling the media device. A proper shared media device
> allocator needs to drop the concept of a single master for the media
> device, and thus needs to refactor those operations to allow any user of
> the media device to implement them (the .link_notify() operation is a
> prime example, and the recently added request operations will make this
> even more challenging - think of how this patch series would prevent
> vimc from properly implementing the request API). As long as these issue
> are not fixed I will be firmly opposed to spreading the usage of the
> media device allocator beyond what exists today.
>
> > Collapsing the drivers into one might be lot more difficult and complex
> > than solving this problem with Media Device Allocator API. This approach
> > has an added benefit of extending the API to be generic and not just for
> > USB.
>
> I've never disputed the fact that fixing a problem correctly is usually
> more work than hacking around it :-)
>
> > I looked at this as a good way to add generic API and have a great test
> > case for it. This patch series fixes the problem for the current vimc
> > architecture.
>
> NAK, for the reasons above. Please drop this series and fix the problem
> properly.
>
> --
> Regards,
>
> Laurent Pinchart
--
Regards,
Niklas Söderlund
The parallel input initialization error path cleans up the wrong
async notifier, fix this by cleaning up the correct notifier.
Fixes: 9863bc8695bc36e3 ("media: rcar-vin: Cleanup notifier in error path")
Signed-off-by: Niklas Söderlund
Reviewed-by: Jacopo Mondi
Tested-by: Geert Uy
Hi Geert,
On 2019-07-02 13:42:44 +0200, Geert Uytterhoeven wrote:
> Hi Niklas,
>
> On Tue, Jul 2, 2019 at 3:25 AM Niklas Söderlund
> wrote:
> > When adding the v4l2_async_notifier_cleanup() callas the wrong notifier
> > was cleaned up if the parallel notifier registra
When adding the v4l2_async_notifier_cleanup() callas the wrong notifier
was cleaned up if the parallel notifier registration failed. Fix this by
cleaning up the correct one.
Fixes: 9863bc8695bc36e3 ("media: rcar-vin: Cleanup notifier in error path")
Signed-off-by: Niklas Söderlund
--
instead since that doesn't depend
> on mdev.
>
> Signed-off-by: Hans Verkuil
> Reported-by: Niklas Söderlund
> Fixes: a8fa55078a77 ("media: v4l2-subdev: Verify arguments in
> v4l2_subdev_call()")
This fixes my problem,
Tested-by: Niklas Söderlund
> ---
>
Hi Jacopo,
On 2019-06-21 11:19:27 +0200, Jacopo Mondi wrote:
> Hi Niklas,
>
> On Fri, Jun 14, 2019 at 11:21:05PM +0200, Niklas Söderlund wrote:
> > Hi Sakari,
> >
> > Thanks for your work and sorry that I missed this and replied to v1 the
> > other day. I have t
Hi Laurent,
Thanks for your feedback.
On 2019-06-17 17:33:41 +0300, Laurent Pinchart wrote:
> Hi Niklas,
>
> Thank you for the patch.
>
> On Thu, Jun 13, 2019 at 02:04:39AM +0200, Niklas Söderlund wrote:
> > The R-Car VIN module supports V4L2_PIX_FMT_ARGB555 and
> >
@@ static int soc_of_bind(struct soc_camera_host *ici,
> struct soc_camera_async_client *sasc;
> struct soc_of_info *info;
> struct i2c_client *client;
> + struct device_node *np;
> char clk_name[V4L2_CLK_NAME_SIZE];
> int ret;
>
> @@ -1548,23 +1549,23 @@ static int soc_of_bind(struct soc_camera_host *ici,
> v4l2_async_notifier_init(&sasc->notifier);
>
> ret = v4l2_async_notifier_add_subdev(&sasc->notifier, info->subdev);
> - if (ret) {
> - of_node_put(remote);
> + if (ret)
> goto eaddasd;
> - }
>
> sasc->notifier.ops = &soc_camera_async_ops;
>
> icd->sasc = sasc;
> icd->parent = ici->v4l2_dev.dev;
> + np = of_graph_get_port_parent(remote);
> + of_node_put(remote);
>
> - client = of_find_i2c_device_by_node(remote);
> + client = of_find_i2c_device_by_node(np);
>
> if (client)
> v4l2_clk_name_i2c(clk_name, sizeof(clk_name),
> client->adapter->nr, client->addr);
> else
> - v4l2_clk_name_of(clk_name, sizeof(clk_name), remote);
> + v4l2_clk_name_of(clk_name, sizeof(clk_name), np);
>
> icd->clk = v4l2_clk_register(&soc_camera_clk_ops, clk_name, icd);
> if (IS_ERR(icd->clk)) {
> @@ -1587,6 +1588,7 @@ static int soc_of_bind(struct soc_camera_host *ici,
> eallocpdev:
> devm_kfree(ici->v4l2_dev.dev, info);
> dev_err(ici->v4l2_dev.dev, "group probe failed: %d\n", ret);
> + of_node_put(np);
>
> return ret;
> }
> @@ -1603,7 +1605,7 @@ static void scan_of_host(struct soc_camera_host *ici)
> if (!epn)
> break;
>
> - rem = of_graph_get_remote_port_parent(epn);
> + rem = of_graph_get_remote_endpoint(epn);
> if (!rem) {
> dev_notice(dev, "no remote for %pOF\n", epn);
> continue;
> --
> 2.11.0
>
--
Regards,
Niklas Söderlund
The driver does not implement runtime resume and suspend function so
there is little point in trying to call them. This is a leftover from
the drivers soc_camera beginnings.
Signed-off-by: Niklas Söderlund
Reviewed-by: Ulrich Hecht
---
drivers/media/platform/rcar-vin/rcar-v4l2.c | 5 -
1
Runtime PM is already enabled unconditionally when the driver is probed
and disabled when it's removed. There is no point in doing it again for
Gen2 when opening and closing the video device.
Signed-off-by: Niklas Söderlund
Reviewed-by: Ulrich Hecht
---
drivers/media/platform/rcar-vin
The helpers rvin_power_{on,off} deal with both VIN and the parallel
subdevice power. This makes it hard to merge the Gen2 and Gen3
open/release functions. Move the VIN power handling directly to the
open/release functions to prepare for the merge.
Signed-off-by: Niklas Söderlund
Reviewed-by
The format is already synced when the subdevice is bound, there is no
need to do do it every time the video device is opened.
Signed-off-by: Niklas Söderlund
Reviewed-by: Ulrich Hecht
Reviewed-by: Laurent Pinchart
---
drivers/media/platform/rcar-vin/rcar-v4l2.c | 25 -
1
controller way of looking at things ;-)
After refactoring out a lot of code left over from the Gen2 mode which
stems from the drivers origin in soc_camera it became apparent that a
lot of code could me removed by merging the two sets.
Tested on both Gen2 and Gen3 no regressions found.
Niklas
After the rework of the Gen2 file operations it's now trivial to merge
the Gen2 and Gen3 versions.
Signed-off-by: Niklas Söderlund
Reviewed-by: Ulrich Hecht
---
drivers/media/platform/rcar-vin/rcar-v4l2.c | 100
1 file changed, 18 insertions(+), 82 deletions(-)
diff
The function no longer serve a purpose as most tasks it performed have
been refactored, fold what remains of it into the only caller. While at
it add error checking for v4l2_ctrl_handler_setup().
Signed-off-by: Niklas Söderlund
Reviewed-by: Ulrich Hecht
---
drivers/media/platform/rcar-vin/rcar
The two power helpers are now only dealing with the parallel subdevice,
merge them into a single rvin_power_parallel() helper to reduce code
duplication.
Signed-off-by: Niklas Söderlund
Reviewed-by: Ulrich Hecht
Reviewed-by: Laurent Pinchart
---
drivers/media/platform/rcar-vin/rcar-v4l2.c
The user should be allowed to break waiting for the lock when opening
the video device.
Signed-off-by: Niklas Söderlund
Reviewed-by: Ulrich Hecht
Reviewed-by: Laurent Pinchart
---
drivers/media/platform/rcar-vin/rcar-v4l2.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git
The value have nothing to do with ARGB1555, it controls if the alpha
component should be filled in for ARGB1555 or ARGB888. Rename it to
reflect this.
Signed-off-by: Niklas Söderlund
Reviewed-by: Ulrich Hecht
Reviewed-by: Laurent Pinchart
---
drivers/media/platform/rcar-vin/rcar-dma.c | 4
The R-Car VIN module supports V4L2_PIX_FMT_ARGB555 and
V4L2_PIX_FMT_ABGR32 pixel formats. Add the hardware register setup and
allow the alpha component to be changed while streaming using the
V4L2_CID_ALPHA_COMPONENT control.
Signed-off-by: Niklas Söderlund
---
drivers/media/platform/rcar-vin
In preparation to adding support for RGB pixel formats with an alpha
component add a control to allow the user to control which alpha value
should be used.
Signed-off-by: Niklas Söderlund
Reviewed-by: Laurent Pinchart
---
drivers/media/platform/rcar-vin/rcar-core.c | 53
-tree and is tested on both
Renesas Gen2 and Gen3 hardware without any regressions found.
Patch 1/3 fixes a badly named register name, 2/3 adds the new control
and finally 3/3 adds the two new pixel formats.
Niklas Söderlund (3):
rcar-vin: Rename VNDMR_DTMD_ARGB1555 to VNDMR_DTMD_ARGB
rcar-vin
name[V4L2_CLK_NAME_SIZE];
> int ret;
>
> @@ -1552,23 +1553,23 @@ static int soc_of_bind(struct soc_camera_host *ici,
> v4l2_async_notifier_init(&sasc->notifier);
>
> ret = v4l2_async_notifier_add_subdev(&sasc->notifier, info->subdev);
> - if (ret) {
> - of_node_put(remote);
> + if (ret)
> goto eaddasd;
> - }
>
> sasc->notifier.ops = &soc_camera_async_ops;
>
> icd->sasc = sasc;
> icd->parent = ici->v4l2_dev.dev;
> + np = of_graph_get_port_parent(remote);
> + of_node_put(remote);
>
> - client = of_find_i2c_device_by_node(remote);
> + client = of_find_i2c_device_by_node(np);
>
> if (client)
> v4l2_clk_name_i2c(clk_name, sizeof(clk_name),
> client->adapter->nr, client->addr);
> else
> - v4l2_clk_name_of(clk_name, sizeof(clk_name), remote);
> + v4l2_clk_name_of(clk_name, sizeof(clk_name), np);
>
> icd->clk = v4l2_clk_register(&soc_camera_clk_ops, clk_name, icd);
> if (IS_ERR(icd->clk)) {
> @@ -1591,6 +1592,7 @@ static int soc_of_bind(struct soc_camera_host *ici,
> eallocpdev:
> devm_kfree(ici->v4l2_dev.dev, info);
> dev_err(ici->v4l2_dev.dev, "group probe failed: %d\n", ret);
> + of_node_put(np);
>
> return ret;
> }
> @@ -1607,7 +1609,7 @@ static void scan_of_host(struct soc_camera_host *ici)
> if (!epn)
> break;
>
> - rem = of_graph_get_remote_port_parent(epn);
> + rem = of_graph_get_remote_endpoint(epn);
> if (!rem) {
> dev_notice(dev, "no remote for %pOF\n", epn);
> continue;
> --
> 2.11.0
>
--
Regards,
Niklas Söderlund
Renesas media binding documentation files uses a naming schema of
'renesas,.txt'. Rename VIN and CSI-2 files to match this
pattern.
Signed-off-by: Niklas Söderlund
Reviewed-by: Geert Uytterhoeven
Reviewed-by: Ulrich Hecht
---
.../media/{renesas,rcar-csi2.txt => renesas,csi2.txt
they are being started and stopped at the same time,
prevent this by serializing starting and stopping of the vimc streamer.
Signed-off-by: Niklas Söderlund
---
drivers/media/platform/vimc/vimc-streamer.c | 23 ++---
1 file changed, 16 insertions(+), 7 deletions(-)
diff --git a
/dev/video0 --capture=100
wait
>>> end test <<<
In addition to testing with this test the series is tested with multiple
qv4l2 instances controlling different capture devices connected to the
same sensor.
Niklas Söderlund (3):
vimc: Add usage count to su
0 (stopped). This allow for multiple
s_stream() calls to try to either start or stop the device while only
the first/last call will actually effect the state of the device.
Signed-off-by: Niklas Söderlund
---
drivers/media/platform/vimc/vimc-debayer.c | 8
drivers/media/platform/vimc
pipeline by looking it up at the sensor. This allows
two (or more) capture devices to independently be started and stopped
while still being connected to the same sensor.
Signed-off-by: Niklas Söderlund
---
drivers/media/platform/vimc/vimc-capture.c | 35 +-
1 file changed, 34
The other subdevice implementations in vimc (debayer and scaler) which
share there code structure with the sensor does not have an explicit
return statement at the end of the s_stream(0) code path. Align the
sensor subdevices by dropping the return statement.
Signed-off-by: Niklas Söderlund
Hi Laurent,
Thanks for your feedback.
On 2019-05-16 14:26:44 +0300, Laurent Pinchart wrote:
> Hi Niklas,
>
> Thank you for the patch.
>
> On Thu, May 16, 2019 at 03:14:13AM +0200, Niklas Söderlund wrote:
> > The format is already synced when the subdevice is bound, there
1 - 100 of 1216 matches
Mail list logo