tform_set_drvdata(pdev, csi2tx);
> + mutex_init(&csi2tx->lock);
> + csi2tx->dev = &pdev->dev;
> +
> + ret = csi2tx_get_resources(csi2tx, pdev);
> + if (ret)
> + goto err_free_priv;
> +
> + v4l2_subdev_init(&csi2tx->subdev, &csi2tx_subdev_ops);
> + csi2tx->subdev.owner = THIS_MODULE;
> + csi2tx->subdev.dev = &pdev->dev;
> + csi2tx->subdev.flags |= V4L2_SUBDEV_FL_HAS_DEVNODE;
> + snprintf(csi2tx->subdev.name, V4L2_SUBDEV_NAME_SIZE, "%s.%s",
> + KBUILD_MODNAME, dev_name(&pdev->dev));
> +
> + ret = csi2tx_check_lanes(csi2tx);
> + if (ret)
> + goto err_free_priv;
> +
> + /* Create our media pads */
> + csi2tx->subdev.entity.function = MEDIA_ENT_F_VID_IF_BRIDGE;
> + csi2tx->pads[CSI2TX_PAD_SOURCE].flags = MEDIA_PAD_FL_SOURCE;
> + for (i = CSI2TX_PAD_SINK_STREAM0; i < CSI2TX_PAD_MAX; i++)
> + csi2tx->pads[i].flags = MEDIA_PAD_FL_SINK;
> +
> + for (i = 0; i < CSI2TX_PAD_MAX; i++)
> + csi2tx->pad_fmts[i] = fmt_default;
> +
> + ret = media_entity_pads_init(&csi2tx->subdev.entity, CSI2TX_PAD_MAX,
> + csi2tx->pads);
> + if (ret)
> + goto err_free_priv;
> +
> + ret = v4l2_async_register_subdev(&csi2tx->subdev);
> + if (ret < 0)
> + goto err_free_priv;
> +
> + dev_info(&pdev->dev,
> + "Probed CSI2TX with %u/%u lanes, %u streams, %s D-PHY\n",
> + csi2tx->num_lanes, csi2tx->max_lanes, csi2tx->max_streams,
> + csi2tx->has_internal_dphy ? "internal" : "no");
> +
> + return 0;
> +
> +err_free_priv:
> + kfree(csi2tx);
> + return ret;
> +}
> +
> +static int csi2tx_remove(struct platform_device *pdev)
> +{
> + struct csi2tx_priv *csi2tx = platform_get_drvdata(pdev);
> +
> + v4l2_async_unregister_subdev(&csi2tx->subdev);
> + kfree(csi2tx);
> +
> + return 0;
> +}
> +
> +static const struct of_device_id csi2tx_of_table[] = {
> + { .compatible = "cdns,csi2tx" },
> + { },
> +};
> +MODULE_DEVICE_TABLE(of, csi2tx_of_table);
> +
> +static struct platform_driver csi2tx_driver = {
> + .probe = csi2tx_probe,
> + .remove = csi2tx_remove,
> +
> + .driver = {
> + .name = "cdns-csi2tx",
> + .of_match_table = csi2tx_of_table,
> + },
> +};
> +module_platform_driver(csi2tx_driver);
> --
> 2.14.3
>
--
Regards,
Niklas Söderlund
operate with an external D-PHY, an internal one or no D-PHY at all
> in some configurations.
>
> Acked-by: Rob Herring
> Acked-by: Sakari Ailus
> Signed-off-by: Maxime Ripard
Reviewed-by: Niklas Söderlund
> ---
> .../devicetree/bindings/media/cdns,csi2tx.txt | 98
> +
ultiplexed streams would be useful for you?
>
> Best regards,
> Todor Tomov
>
> On 11.08.2017 12:56, Niklas Söderlund wrote:
> > Hi,
> >
> > This series is a RFC for how I think one could add CSI-2 virtual channel
> > support to the V4L2 framework. Th
Hi Jacopo,
On 2018-03-14 16:17:33 +0100, Jacopo Mondi wrote:
> Hi Niklas, Kieran,
>
> On Tue, Mar 13, 2018 at 06:56:54PM +0100, Niklas Söderlund wrote:
> > Hi Kieran,
> >
> > Thanks for your feedback.
> >
> > On 2018-03-13 17:42:25 +0100, Kieran Bingham wro
down and run in single mode
until the capturing process where restarted.
An additional effect of this change is that the capture logic can be
made much simple as we know that continuous mode will always be used.
Signed-off-by: Niklas Söderlund
Reviewed-by: Jacopo Mondi
---
drivers/media/platform
single capture mode if userspace can't queue buffers as fast
as the VIN driver consumes them.
Signed-off-by: Niklas Söderlund
Reviewed-by: Jacopo Mondi
Reviewed-by: Kieran Bingham
---
drivers/media/platform/rcar-vin/rcar-dma.c | 19 +++
drivers/media/platform/rcar-vin/rcar-
situations and no regressions in the
vin-tests suite.
* Changes since v1
- Dropped first patch in series as it removed a correct check due to my
poor reading skills.
- Corrected spelling in commit messages and comments.
- Added review tags from Jacopo and Kieran, thanks!
Niklas Söderlund (2
Hi Kieran,
Thanks for your feedback.
On 2018-03-13 17:42:25 +0100, Kieran Bingham wrote:
> Hi Niklas,
>
> Thanks for the patch series :) - I've been looking forward to seeing this one
> !
>
> On 10/03/18 01:09, Niklas Söderlund wrote:
> > This is an error from wh
Hi Jacopo,
Thanks for your feedback.
On 2018-03-12 15:38:12 +0100, Jacopo Mondi wrote:
> Hi Niklas,
> a few comments below
>
> On Sat, Mar 10, 2018 at 01:09:53AM +0100, Niklas Söderlund wrote:
> > Instead of switching capture mode depending on how many buffers are
> >
patches have been tested with great improvement in
capture speed for buffer strained situations and no regressions in the
vin-tests suite.
Niklas Söderlund (3):
rcar-vin: remove duplicated check of state in irq handler
rcar-vin: allocate a scratch buffer at stream start
rcar-vin: use scratch
down and run in single mode
until the capturing process where restarted.
An additional effect of this change is that the capture logic can be
made much simple as we know that continues mode will always be used.
Signed-off-by: Niklas Söderlund
---
drivers/media/platform/rcar-vin/rcar-dma.c | 187
This is an error from when the driver where converted from soc-camera.
There is absolutely no gain to check the state variable two times to be
extra sure if the hardware is stopped.
Signed-off-by: Niklas Söderlund
---
drivers/media/platform/rcar-vin/rcar-dma.c | 6 --
1 file changed, 6
single capture mode if userspace don't queue buffers as fast
as the VIN driver consumes them.
Signed-off-by: Niklas Söderlund
---
drivers/media/platform/rcar-vin/rcar-dma.c | 19 +++
drivers/media/platform/rcar-vin/rcar-vin.h | 4
2 files changed, 23 insertions(+)
diff --
Hi Hans,
Thanks for your feedback.
On 2018-03-09 17:28:39 +0100, Hans Verkuil wrote:
> On 09/03/18 17:17, Niklas Söderlund wrote:
> > Hi Hans,
> >
> > Thanks for your feedback, I don't think I can appreciate how happy I'm
> > that you reviewed this patc
Hi Hans,
Thanks for your feedback, I don't think I can appreciate how happy I'm
that you reviewed this patch-set, Thank you!
On 2018-03-09 16:25:23 +0100, Hans Verkuil wrote:
> On 07/03/18 23:04, Niklas Söderlund wrote:
> > If the field is not supported by the driver it sho
gt; pinctrl-names = "default";
>
> @@ -104,7 +104,7 @@ Board setup example for Gen2 platforms (vin1 composite
> video input)
> pinctrl-0 = <&vin1_pins>;
> pinctrl-names = "default";
>
> -status = "ok";
> +status = "okay";
>
> port {
> #address-cells = <1>;
> --
> 2.7.4
>
--
Regards,
Niklas Söderlund
CC linux-media.
It's linux-media@vger.kernel.org not linux-me...@vger.kernel.or, sorry
for the noise.
On 2018-03-07 23:58:16 +0100, Niklas Söderlund wrote:
> This fixes the following sparse warning:
>
> drivers/media/i2c/adv748x/adv748x-afe.c:294:34:expected unsigned in
If the pixelformat is not supported it should not fail but be set to
something that works. While we are at it move the two different
checks of the pixelformat to the same statement.
Signed-off-by: Niklas Söderlund
Reviewed-by: Laurent Pinchart
---
drivers/media/platform/rcar-vin/rcar-v4l2.c
-by: Niklas Söderlund
Reviewed-by: Kieran Bingham
Reviewed-by: Hans Verkuil
Acked-by: Laurent Pinchart
---
drivers/media/platform/rcar-vin/rcar-core.c | 2 ++
drivers/media/platform/rcar-vin/rcar-v4l2.c | 3 +++
2 files changed, 5 insertions(+)
diff --git a/drivers/media/platform/rcar-vin/rcar
without directly
interacting with the source subdevice.
Signed-off-by: Niklas Söderlund
Reviewed-by: Hans Verkuil
---
* Changes since v11
- Fixed error labels name in rvin_mc_open().
---
drivers/media/platform/rcar-vin/rcar-dma.c | 2 +-
drivers/media/platform/rcar-vin/rcar-v4l2.c | 161
Bus configuration will once the driver is extended to support Gen3
contain information not specific to only the directly connected parallel
subdevice. Move it to struct rvin_dev to show it's not always coupled
to the parallel subdevice.
Signed-off-by: Niklas Söderlund
Reviewed-by: Hans Ve
the field is preserved simplifies the logic quite a
bit.
Signed-off-by: Niklas Söderlund
Reviewed-by: Hans Verkuil
Reviewed-by: Laurent Pinchart
---
drivers/media/platform/rcar-vin/rcar-dma.c | 8
drivers/media/platform/rcar-vin/rcar-v4l2.c | 25 +++--
drivers
truct rvin_source_fmt with a
struct v4l2_rect as all it's used for is keep track of the source
dimensions.
Signed-off-by: Niklas Söderlund
---
* Changes since v11
- This patch where 'rcar-vin: read subdevice format for crop only when
needed'
- Keep caching the source dimensions and
Each Gen3 SoC has a limited set of predefined routing possibilities for
which CSI-2 device and channel can be routed to which VIN instance.
Prepare to store this information in the struct rvin_info.
Signed-off-by: Niklas Söderlund
---
* Changes since v11
- Fixed spelling.
- Reorderd filed
The functions to register and unregister the hardware and video device
where poorly named from the start. Rename them to better describe their
intended function.
Signed-off-by: Niklas Söderlund
Reviewed-by: Kieran Bingham
Reviewed-by: Hans Verkuil
Reviewed-by: Laurent Pinchart
---
drivers
elling and DT documentation as pointed out by Geert and Sergei,
thanks!
- Refresh patch 2/32 with an updated version, thanks Sakari for pointing
this out.
- Add Sakaris Ack to patch 1/32.
- Rebase on top of v4.9-rc1 instead of v4.9-rc3 to ease integration
testing together with renesas-drivers
The rcar-vin driver needs to be part of a media controller to support
Gen3. Give each VIN instance a unique name so it can be referenced from
userspace.
Signed-off-by: Niklas Söderlund
Reviewed-by: Laurent Pinchart
---
drivers/media/platform/rcar-vin/rcar-v4l2.c | 2 +-
1 file changed, 1
le a new link
due to hardware constrains the link_notifier callback will return
-EMLINK.
Signed-off-by: Niklas Söderlund
---
* Changes since v11
- Fixed spelling
- Updated comment to clarify the intent that no link can be enabled if
any video node is open.
- Use container_of() instead of a loop to
Add the SoC specific information for Renesas r8a7796.
Signed-off-by: Niklas Söderlund
Reviewed-by: Laurent Pinchart
---
drivers/media/platform/rcar-vin/rcar-core.c | 44 +
1 file changed, 44 insertions(+)
diff --git a/drivers/media/platform/rcar-vin/rcar-core.c
b
Signed-off-by: Niklas Söderlund
Reviewed-by: Laurent Pinchart
---
drivers/media/platform/rcar-vin/rcar-dma.c | 38 ++
drivers/media/platform/rcar-vin/rcar-vin.h | 2 ++
2 files changed, 40 insertions(+)
diff --git a/drivers/media/platform/rcar-vin/rcar-dma.c
b/dri
the notifier belonging to the last probed VIN.
Once all CSI-2 subdevices in this notifier are bound proceed to register
all VIN video devices of the group and crate media device links between
all CSI-2 and VIN entities according to the SoC specific routing
configuration.
Signed-off-by: Niklas
comment.
Signed-off-by: Niklas Söderlund
Reviewed-by: Hans Verkuil
Reviewed-by: Laurent Pinchart
---
drivers/media/platform/rcar-vin/rcar-core.c | 20 ++--
drivers/media/platform/rcar-vin/rcar-vin.h | 4
2 files changed, 22 insertions(+), 2 deletions(-)
diff --git a/drivers
data structure and registers a media device.
Consecutive VINs insert themself into the global group.
Signed-off-by: Niklas Söderlund
Reviewed-by: Laurent Pinchart
---
drivers/media/platform/rcar-vin/rcar-core.c | 174 +++-
drivers/media/platform/rcar-vin/rcar-vin.h | 31
The procedure to start or stop streaming using the non-MC single
subdevice and the MC graph and multiple subdevices are quite different.
Create a new function to abstract which method is used based on which
mode the driver is running in and add logic to start the MC graph.
Signed-off-by: Niklas
Add the SoC specific information for Renesas r8a77970.
Signed-off-by: Niklas Söderlund
Reviewed-by: Laurent Pinchart
---
drivers/media/platform/rcar-vin/rcar-core.c | 23 +++
1 file changed, 23 insertions(+)
diff --git a/drivers/media/platform/rcar-vin/rcar-core.c
b
Add the SoC specific information for Renesas r8a7795 ES1.x and ES2.0.
Signed-off-by: Niklas Söderlund
Reviewed-by: Laurent Pinchart
---
drivers/media/platform/rcar-vin/Kconfig | 2 +-
drivers/media/platform/rcar-vin/rcar-core.c | 120
2 files changed, 121
In preparation of refactoring the scaling code move the code regarding
scaling to to the top of the file to avoid the need to add forward
declarations. No code is changed in this commit only whole functions
moved inside the same file.
Signed-off-by: Niklas Söderlund
Reviewed-by: Hans Verkuil
Add the register needed to work with Gen3 hardware. This patch adds
the logic for how to work with the Gen3 hardware. More work is required
to enable the subdevice structure needed to configure capturing.
Signed-off-by: Niklas Söderlund
Reviewed-by: Hans Verkuil
Reviewed-by: Laurent Pinchart
fixed values.
Signed-off-by: Niklas Söderlund
---
drivers/media/platform/rcar-vin/rcar-v4l2.c | 21 +++--
1 file changed, 19 insertions(+), 2 deletions(-)
diff --git a/drivers/media/platform/rcar-vin/rcar-v4l2.c
b/drivers/media/platform/rcar-vin/rcar-v4l2.c
index 2280535ca98
: Niklas Söderlund
---
drivers/media/platform/rcar-vin/rcar-dma.c | 15 +--
drivers/media/platform/rcar-vin/rcar-v4l2.c | 40 +++--
2 files changed, 10 insertions(+), 45 deletions(-)
diff --git a/drivers/media/platform/rcar-vin/rcar-dma.c
b/drivers/media/platform
struct
rvin_info which will control which mode to use.
Signed-off-by: Niklas Söderlund
Reviewed-by: Hans Verkuil
Reviewed-by: Laurent Pinchart
---
drivers/media/platform/rcar-vin/rcar-core.c | 6 +-
drivers/media/platform/rcar-vin/rcar-vin.h | 2 ++
2 files changed, 7 insertions(+), 1
Part of the format alignment and checking can be shared with the Gen3
format handling. Break that part out to a separate function.
Signed-off-by: Niklas Söderlund
---
drivers/media/platform/rcar-vin/rcar-v4l2.c | 85 -
1 file changed, 48 insertions(+), 37 deletions
If the field is not supported by the driver it should not try to keep
the current field. Instead it should set it to a default fallback. Since
trying a format should always result in the same state regardless of the
current state of the device.
Signed-off-by: Niklas Söderlund
Reviewed-by
At stream on time the driver should not query the subdevice for which
standard are used. Instead it should be cached when userspace sets the
standard and used at stream on time.
Signed-off-by: Niklas Söderlund
---
drivers/media/platform/rcar-vin/rcar-core.c | 6 ++
drivers/media/platform
Remove over complicated logic to calculate the value for bytesperline
and sizeimage that was carried over from the soc_camera port. There is
no need to find the max value of bytesperline and sizeimage from
user-space as they are set to 0 before the max_t() operation.
Signed-off-by: Niklas
if
needed, in addition to document SoC support and therefore allow
checkpatch.pl to validate compatible string values.
Signed-off-by: Fabrizio Castro
Reviewed-by: Biju Das
Reviewed-by: Simon Horman
Acked-by: Rob Herring
Reviewed-by: Geert Uytterhoeven
Acked-by: Niklas Söderlund
Reviewed-b
only used on Gen2.
While moving this code drop a large comment which is copied from the
framework documentation and fold rvin_mbus_supported() into its only
caller. Also move the initialization and cleanup code to separate
functions to increase readability.
Signed-off-by: Niklas Söderlund
Reviewed
tween each VIN and CSI-2 block. This routing table will be kept
inside the driver but in order for it to act on it it must know which
VIN and CSI-2 is which.
Signed-off-by: Niklas Söderlund
Acked-by: Rob Herring
Reviewed-by: Laurent Pinchart
---
.../devicetree/bindings/media/rcar_vin.txt
chip_id to model_id. Also sort the compatible
string entries and make use of of_device_get_match_data() which will
always work as the driver is DT only, so there's always a valid match.
Signed-off-by: Niklas Söderlund
Reviewed-by: Kieran Bingham
Reviewed-by: Hans Verkuil
Reviewed-by: Laurent Pin
On Gen3 the max supported width and height will be different from Gen2.
Move the limits to the struct rvin_info to prepare for Gen3 support.
Signed-off-by: Niklas Söderlund
Reviewed-by: Kieran Bingham
Reviewed-by: Hans Verkuil
Reviewed-by: Laurent Pinchart
---
drivers/media/platform/rcar-vin
From: Fabrizio Castro
Change the sorting of the part numbers from descending to ascending to
match with other documentation.
Signed-off-by: Fabrizio Castro
Reviewed-by: Biju Das
Reviewed-by: Simon Horman
Acked-by: Rob Herring
Reviewed-by: Geert Uytterhoeven
Acked-by: Niklas Söderlund
Hi Laurent,
Thanks for your feedback.
On 2018-03-02 13:06:27 +0200, Laurent Pinchart wrote:
> Hi Niklas,
>
> Thank you for the patch.
>
> On Friday, 2 March 2018 03:57:35 EET Niklas Söderlund wrote:
> > Instead of caching the subdevice format each time the video device
&
Hi Laurent,
Thanks for your comments.
On 2018-03-02 12:48:55 +0200, Laurent Pinchart wrote:
> Hi Niklas,
>
> Thank you for the patch.
>
> On Friday, 2 March 2018 03:57:31 EET Niklas Söderlund wrote:
> > There was never proper support in the VIN driver to deliver ALTERNATIN
Hi Laurent,
Thanks for your feedback.
On 2018-03-02 11:53:54 +0200, Laurent Pinchart wrote:
> Hi Niklas,
>
> Thank you for the patch.
>
> On Friday, 2 March 2018 03:57:34 EET Niklas Söderlund wrote:
> > Part of the format alignment and checking can be shared with the Gen
;vdev == vdev) {
> > + vin = group->vin[i];
> > + master_id = rvin_group_id_to_master(vin->id);
> > + break;
> > + }
> > + }
[snip]
--
Regards,
Niklas Söderlund
Hi Laurent,
Thanks for your feedback.
On 2018-03-02 11:59:14 +0200, Laurent Pinchart wrote:
> Hi Niklas,
>
> Thank you for the patch.
>
> On Friday, 2 March 2018 03:57:41 EET Niklas Söderlund wrote:
> > When the VIN driver is running in media centric mode (on Gen3) the
Hi Laurent,
Thank you for your feedback.
On 2018-03-02 13:31:47 +0200, Laurent Pinchart wrote:
> Hi Niklas,
>
> Thank you for the patch.
>
> On Friday, 2 March 2018 03:57:38 EET Niklas Söderlund wrote:
> > On Gen3 the CSI-2 routing is controlled by the VnCSI_IFMD registe
Hi Laurent,
Thanks for your feedback.
On 2018-03-02 13:26:58 +0200, Laurent Pinchart wrote:
> Hi Niklas,
>
> Thank you for the patch.
>
> On Friday, 2 March 2018 03:57:36 EET Niklas Söderlund wrote:
> > Bus configuration will once the driver is extended to support Gen3
&g
tween each VIN and CSI-2 block. This routing table will be kept
inside the driver but in order for it to act on it it must know which
VIN and CSI-2 is which.
Signed-off-by: Niklas Söderlund
Acked-by: Rob Herring
Reviewed-by: Laurent Pinchart
---
.../devicetree/bindings/media/rcar_vin.txt
Part of the format alignment and checking can be shared with the Gen3
format handling. Break that part out to a separate function.
Signed-off-by: Niklas Söderlund
---
drivers/media/platform/rcar-vin/rcar-v4l2.c | 96 -
1 file changed, 54 insertions(+), 42 deletions
: Niklas Söderlund
---
drivers/media/platform/rcar-vin/rcar-dma.c | 15 +--
drivers/media/platform/rcar-vin/rcar-v4l2.c | 40 +++--
2 files changed, 10 insertions(+), 45 deletions(-)
diff --git a/drivers/media/platform/rcar-vin/rcar-dma.c
b/drivers/media/platform
Remove over complicated logic to calculate the value for bytesperline
and sizeimage that was carried over from the soc_camera port. There is
no need to find the max value of bytesperline and sizeimage from
user-space as they are set to 0 before the max_t() operation.
Signed-off-by: Niklas
If the field is not supported by the driver it should not try to keep
the current field. Instead it should set it to a default fallback. Since
trying a format should always result in the same state regardless of the
current state of the device.
Signed-off-by: Niklas Söderlund
---
drivers/media
chip_id to model_id. Also sort the compatible
string entries and make use of of_device_get_match_data() which will
always work as the driver is DT only, so there's always a valid match.
Signed-off-by: Niklas Söderlund
Reviewed-by: Kieran Bingham
Reviewed-by: Hans Verkuil
Reviewed-by: Laurent Pin
Signed-off-by: Niklas Söderlund
---
drivers/media/platform/rcar-vin/rcar-dma.c | 38 ++
drivers/media/platform/rcar-vin/rcar-vin.h | 2 ++
2 files changed, 40 insertions(+)
diff --git a/drivers/media/platform/rcar-vin/rcar-dma.c
b/drivers/media/platform/rcar-vin/rcar-d
On Gen3 the max supported width and height will be different from Gen2.
Move the limits to the struct rvin_info to prepare for Gen3 support.
Signed-off-by: Niklas Söderlund
Reviewed-by: Kieran Bingham
Reviewed-by: Hans Verkuil
Reviewed-by: Laurent Pinchart
---
drivers/media/platform/rcar-vin
-by: Niklas Söderlund
Reviewed-by: Kieran Bingham
Reviewed-by: Hans Verkuil
Acked-by: Laurent Pinchart
---
drivers/media/platform/rcar-vin/rcar-core.c | 2 ++
drivers/media/platform/rcar-vin/rcar-v4l2.c | 3 +++
2 files changed, 5 insertions(+)
diff --git a/drivers/media/platform/rcar-vin/rcar
only used on Gen2.
While moving this code drop a large comment which is copied from the
framework documentation and fold rvin_mbus_supported() into its only
caller. Also move the initialization and cleanup code to separate
functions to increase readability.
Signed-off-by: Niklas Söderlund
Reviewed
data structure and registers a media device.
Consecutive VINs insert themself into the global group.
Signed-off-by: Niklas Söderlund
Reviewed-by: Laurent Pinchart
---
drivers/media/platform/rcar-vin/rcar-core.c | 174 +++-
drivers/media/platform/rcar-vin/rcar-vin.h | 31
Add the register needed to work with Gen3 hardware. This patch adds
the logic for how to work with the Gen3 hardware. More work is required
to enable the subdevice structure needed to configure capturing.
Signed-off-by: Niklas Söderlund
Reviewed-by: Hans Verkuil
Reviewed-by: Laurent Pinchart
If the pixelformat is not supported it should not fail but be set to
something that works. While we are at it move the two different
checks of the pixelformat to the same statement.
Signed-off-by: Niklas Söderlund
Reviewed-by: Laurent Pinchart
---
drivers/media/platform/rcar-vin/rcar-v4l2.c
The rcar-vin driver needs to be part of a media controller to support
Gen3. Give each VIN instance a unique name so it can be referenced from
userspace.
Signed-off-by: Niklas Söderlund
Reviewed-by: Laurent Pinchart
---
drivers/media/platform/rcar-vin/rcar-v4l2.c | 2 +-
1 file changed, 1
comment.
Signed-off-by: Niklas Söderlund
Reviewed-by: Hans Verkuil
Reviewed-by: Laurent Pinchart
---
drivers/media/platform/rcar-vin/rcar-core.c | 20 ++--
drivers/media/platform/rcar-vin/rcar-vin.h | 4
2 files changed, 22 insertions(+), 2 deletions(-)
diff --git a/drivers
Each Gen3 SoC has a limited set of predefined routing possibilities for
which CSI-2 device and channel can be routed to which VIN instance.
Prepare to store this information in the struct rvin_info.
Signed-off-by: Niklas Söderlund
---
drivers/media/platform/rcar-vin/rcar-vin.h | 42
the notifier belonging to the last probed VIN.
Once all CSI-2 subdevices in this notifier are bound proceed to register
all VIN video devices of the group and crate media device links between
all CSI-2 and VIN entities according to the SoC specific routing
configuration.
Signed-off-by: Niklas
In preparation of refactoring the scaling code move the code regarding
scaling to to the top of the file to avoid the need to add forward
declarations. No code is changed in this commit only whole functions
moved inside the same file.
Signed-off-by: Niklas Söderlund
Reviewed-by: Hans Verkuil
Add the SoC specific information for Renesas r8a7795 ES1.x and ES2.0.
Signed-off-by: Niklas Söderlund
Reviewed-by: Laurent Pinchart
---
drivers/media/platform/rcar-vin/Kconfig | 2 +-
drivers/media/platform/rcar-vin/rcar-core.c | 120
2 files changed, 121
Add the SoC specific information for Renesas r8a77970.
Signed-off-by: Niklas Söderlund
Reviewed-by: Laurent Pinchart
---
drivers/media/platform/rcar-vin/rcar-core.c | 23 +++
1 file changed, 23 insertions(+)
diff --git a/drivers/media/platform/rcar-vin/rcar-core.c
b
le a new link
due to hardware constrains the link_notifier callback will return
-EMLINK.
Signed-off-by: Niklas Söderlund
---
drivers/media/platform/rcar-vin/rcar-core.c | 153
1 file changed, 153 insertions(+)
diff --git a/drivers/media/platform/rcar-vin/rcar-cor
The procedure to start or stop streaming using the non-MC single
subdevice and the MC graph and multiple subdevices are quite different.
Create a new function to abstract which method is used based on which
mode the driver is running in and add logic to start the MC graph.
Signed-off-by: Niklas
without directly
interacting with the source subdevice.
Signed-off-by: Niklas Söderlund
Reviewed-by: Hans Verkuil
---
drivers/media/platform/rcar-vin/rcar-dma.c | 3 +-
drivers/media/platform/rcar-vin/rcar-v4l2.c | 161 +++-
2 files changed, 160 insertions(+), 4
Add the SoC specific information for Renesas r8a7796.
Signed-off-by: Niklas Söderlund
Reviewed-by: Laurent Pinchart
---
drivers/media/platform/rcar-vin/rcar-core.c | 44 +
1 file changed, 44 insertions(+)
diff --git a/drivers/media/platform/rcar-vin/rcar-core.c
b
igned-off-by: Niklas Söderlund
---
drivers/media/platform/rcar-vin/rcar-v4l2.c | 158 ++--
drivers/media/platform/rcar-vin/rcar-vin.h | 12 ---
2 files changed, 80 insertions(+), 90 deletions(-)
diff --git a/drivers/media/platform/rcar-vin/rcar-v4l2.c
b/drivers/
struct
rvin_info which will control which mode to use.
Signed-off-by: Niklas Söderlund
Reviewed-by: Hans Verkuil
Reviewed-by: Laurent Pinchart
---
drivers/media/platform/rcar-vin/rcar-core.c | 6 +-
drivers/media/platform/rcar-vin/rcar-vin.h | 2 ++
2 files changed, 7 insertions(+), 1
validation tools fail. Until the user requested
colorspace can be validated lets force it to the driver default.
Signed-off-by: Niklas Söderlund
---
drivers/media/platform/rcar-vin/rcar-v4l2.c | 16 ++--
1 file changed, 14 insertions(+), 2 deletions(-)
diff --git a/drivers/media
Bus configuration will once the driver is extended to support Gen3
contain information not specific to only the directly connected parallel
subdevice. Move it to struct rvin_dev to show it's not always coupled
to the parallel subdevice.
Signed-off-by: Niklas Söderlund
Reviewed-by: Hans Ve
From: Fabrizio Castro
Change the sorting of the part numbers from descending to ascending to
match with other documentation.
Signed-off-by: Fabrizio Castro
Reviewed-by: Biju Das
Reviewed-by: Simon Horman
Acked-by: Rob Herring
Reviewed-by: Geert Uytterhoeven
Acked-by: Niklas Söderlund
h patch 2/32 with an updated version, thanks Sakari for pointing
this out.
- Add Sakaris Ack to patch 1/32.
- Rebase on top of v4.9-rc1 instead of v4.9-rc3 to ease integration
testing together with renesas-drivers tree.
Fabrizio Castro (2):
dt-bindings: media: rcar_vin: Reverse SoC part number
the field is preserved simplifies the logic quite a
bit.
Signed-off-by: Niklas Söderlund
Reviewed-by: Hans Verkuil
Reviewed-by: Laurent Pinchart
---
drivers/media/platform/rcar-vin/rcar-dma.c | 8
drivers/media/platform/rcar-vin/rcar-v4l2.c | 25 +++--
drivers
if
needed, in addition to document SoC support and therefore allow
checkpatch.pl to validate compatible string values.
Signed-off-by: Fabrizio Castro
Reviewed-by: Biju Das
Reviewed-by: Simon Horman
Acked-by: Rob Herring
Reviewed-by: Geert Uytterhoeven
Acked-by: Niklas Söderlund
---
Doc
The functions to register and unregister the hardware and video device
where poorly named from the start. Rename them to better describe their
intended function.
Signed-off-by: Niklas Söderlund
Reviewed-by: Kieran Bingham
Reviewed-by: Hans Verkuil
Reviewed-by: Laurent Pinchart
---
drivers
csi2tx->subdev.flags |= V4L2_SUBDEV_FL_HAS_DEVNODE;
> + v4l2_set_subdevdata(&csi2tx->subdev, &pdev->dev);
Is this needed?
> + snprintf(csi2tx->subdev.name, V4L2_SUBDEV_NAME_SIZE, "%s.%s",
> + KBUILD_MODNAME, dev_name(&pdev->dev));
> +
> + ret = csi2tx_check_lanes(csi2tx);
> + if (ret)
> + goto err_free_priv;
> +
> + /* Create our media pads */
> + csi2tx->subdev.entity.function = MEDIA_ENT_F_VID_IF_BRIDGE;
> + csi2tx->pads[CSI2TX_PAD_SOURCE].flags = MEDIA_PAD_FL_SOURCE;
> + for (i = CSI2TX_PAD_SINK_STREAM0; i < CSI2TX_PAD_MAX; i++)
> + csi2tx->pads[i].flags = MEDIA_PAD_FL_SINK;
> +
> + for (i = 0; i < CSI2TX_PAD_MAX; i++)
> + csi2tx->pad_fmts[i] = fmt_default;
> +
> + ret = media_entity_pads_init(&csi2tx->subdev.entity, CSI2TX_PAD_MAX,
> + csi2tx->pads);
> + if (ret)
> + goto err_free_priv;
> +
> + ret = v4l2_async_register_subdev(&csi2tx->subdev);
> + if (ret < 0)
> + goto err_free_priv;
> +
> + dev_info(&pdev->dev,
> + "Probed CSI2TX with %u/%u lanes, %u streams, %s D-PHY\n",
> + csi2tx->num_lanes, csi2tx->max_lanes, csi2tx->max_streams,
> + csi2tx->has_internal_dphy ? "internal" : "no");
> +
> + return 0;
> +
> +err_free_priv:
> + kfree(csi2tx);
> + return ret;
> +}
> +
> +static int csi2tx_remove(struct platform_device *pdev)
> +{
> + struct csi2tx_priv *csi2tx = platform_get_drvdata(pdev);
> +
> + v4l2_async_unregister_subdev(&csi2tx->subdev);
> + kfree(csi2tx);
> +
> + return 0;
> +}
> +
> +static const struct of_device_id csi2tx_of_table[] = {
> + { .compatible = "cdns,csi2tx" },
> + { },
> +};
> +MODULE_DEVICE_TABLE(of, csi2tx_of_table);
> +
> +static struct platform_driver csi2tx_driver = {
> + .probe = csi2tx_probe,
> + .remove = csi2tx_remove,
> +
> + .driver = {
> + .name = "cdns-csi2tx",
> + .of_match_table = csi2tx_of_table,
> + },
> +};
> +module_platform_driver(csi2tx_driver);
Are MODULE_LICENSE() not needed anymore with the introduction of the
SPDX headers?
> --
> 2.14.3
>
--
Regards,
Niklas Söderlund
drivers/media/platform/cadence/cdns-csi2tx.c | 527
> +++++
> 4 files changed, 637 insertions(+)
> create mode 100644 Documentation/devicetree/bindings/media/cdns,csi2tx.txt
> create mode 100644 drivers/media/platform/cadence/cdns-csi2tx.c
>
> --
> 2.14.3
>
--
Regards,
Niklas Söderlund
bus.
>
> Allow a device tree node to override the default addresses so that
> address conflicts with other devices on the same bus may be resolved at
> the board description level.
>
> Signed-off-by: Kieran Bingham
Reviewed-by: Niklas Söderlund
> ---
> driver
epresented on a single line.
>
> Define ADV748X_REGMAP_CONF for this purpose use it to create the tables.
>
> Signed-off-by: Kieran Bingham
Reviewed-by: Niklas Söderlund
>
> ---
> v2:
> - Remove unnecessary #undef
>
> drivers/media/i2c/adv748x/adv748x-core.c | 109
: "BRS";
> -
> /* Prepare the display list. */
> dl = vsp1_dl_list_get(pipe->output->dlm);
>
> @@ -570,7 +565,7 @@ void vsp1_du_atomic_flush(struct device *dev, unsigned
> int pipe_index)
> rpf->entity.sink_pad = i;
>
> dev_dbg(vsp1->dev, "%s: connecting RPF.%u to %s:%u\n",
> - __func__, rpf->entity.index, bru_name, i);
> + __func__, rpf->entity.index, BRU_NAME(pipe->bru), i);
>
> ret = vsp1_du_setup_rpf_pipe(vsp1, pipe, rpf, i);
> if (ret < 0)
> --
> Regards,
>
> Laurent Pinchart
>
--
Regards,
Niklas Söderlund
signedness)
Signed-off-by: Niklas Söderlund
---
drivers/media/i2c/adv748x/adv748x-afe.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/media/i2c/adv748x/adv748x-afe.c
b/drivers/media/i2c/adv748x/adv748x-afe.c
index 5188178588c9067d..39a9996d0db08c31 100644
--- a
ing
able to validate input from user-space. But I'm even less excited about
breaking v4l2-compliance compatibility so any path I can take here to
keep the user being able to specify the colorspace and v4l2-compliance
being happy would be a better solution for me :-)
1. https://patchwork.linuxtv.org/patch/46717/
2. 432d9ebfcea65337 ("v4l2-compliance: ignore colorspace tests for passthu
subdevs")
--
Regards,
Niklas Söderlund
There is no way for drivers to validate a colorspace value, which could
be provided by user-space by VIDIOC_S_FMT for example. Add a helper to
validate that the colorspace value is part of enum v4l2_colorspace.
Signed-off-by: Niklas Söderlund
---
include/uapi/linux/videodev2.h | 4
1 file
Hi Laurent,
On 2018-02-14 00:31:21 +0200, Laurent Pinchart wrote:
> Hi Niklas,
>
> On Tuesday, 13 February 2018 18:47:04 EET Niklas Söderlund wrote:
> > On 2018-02-13 18:26:34 +0200, Laurent Pinchart wrote:
> > > On Monday, 29 January 2018 18:34:15 EET Niklas Söderlund
401 - 500 of 1216 matches
Mail list logo