Only arrays of integer types are supported.
Signed-off-by: Laurent Pinchart
---
yavta.c | 228 ++--
1 file changed, 172 insertions(+), 56 deletions(-)
diff --git a/yavta.c b/yavta.c
index 6428c22f88d7..d1bfd380c03b 100644
--- a/yavta.c
+++ b
Separate iteration over controls from printing, in order to reuse the
iteration to implement control reset.
Signed-off-by: Laurent Pinchart
---
yavta.c | 133 ++--
1 file changed, 82 insertions(+), 51 deletions(-)
diff --git a/yavta.c b
From: Kieran Bingham
Provide a new option '--reset-controls' which will enumerate the
available controls on a device or sub-device, and re-initialise them to
defaults.
Signed-off-by: Kieran Bingham
Signed-off-by: Laurent Pinchart
---
ya
x27;s
time to get them merged.
Kieran Bingham (1):
Add support to reset device controls
Laurent Pinchart (6):
yavta: Refactor video_list_controls()
Implement VIDIOC_QUERY_EXT_CTRL support
Implement compound control get support
Implement compound control set support
Support setting control
Signed-off-by: Laurent Pinchart
---
yavta.c | 25 +
1 file changed, 25 insertions(+)
diff --git a/yavta.c b/yavta.c
index 1490878c6f7e..2d49131a4271 100644
--- a/yavta.c
+++ b/yavta.c
@@ -1334,6 +1334,31 @@ static int video_parse_control_array(const struct
As we include a copy of the V4L2 kernel headers, there's no need for
conditional compilation to support old versions of the API.
Signed-off-by: Laurent Pinchart
---
yavta.c | 11 ---
1 file changed, 11 deletions(-)
diff --git a/yavta.c b/yavta.c
index 2d49131a4271..741df82a8db0 1
main(int argc, char *argv[])
> case OPT_QUEUE_LATE:
> do_queue_late = 1;
> break;
> + case OPT_RESET_CONTROLS:
> + do_reset_controls = 1;
> + break;
> case OPT_REQUEUE_LAST:
> do_requeue_last = 1;
> break;
> @@ -2185,7 +2219,10 @@ int main(int argc, char *argv[])
> set_control(&dev, ctrl_name, ctrl_value);
>
> if (do_list_controls)
> - video_list_controls(&dev);
> + video_list_controls(&dev, false);
> +
> + if (do_reset_controls)
> + video_list_controls(&dev, true);
>
> if (do_enum_formats) {
> printf("- Available formats:\n");
> --
> 2.17.1
>
--
Regards,
Laurent Pinchart
Separate iteration over controls from printing, in order to reuse the
iteration to implement control reset.
Signed-off-by: Laurent Pinchart
---
yavta.c | 134 +++-
1 file changed, 83 insertions(+), 51 deletions(-)
diff --git a/yavta.c b
From: Kieran Bingham
Provide a new option '--reset-controls' which will enumerate the
available controls on a device or sub-device, and re-initialise them to
defaults.
Signed-off-by: Kieran Bingham
Signed-off-by: Laurent Pinchart
---
ya
Hi Kieran,
On Sun, Feb 17, 2019 at 08:06:32PM +, Kieran Bingham wrote:
> On 17/02/2019 02:48, Laurent Pinchart wrote:
> > From: Kieran Bingham
> >
> > When the VSP1 is used in an active display pipeline, the output of the
> > WPF can supply the LIF entity direct
Hi Kieran,
On Sun, Feb 17, 2019 at 08:35:25PM +, Kieran Bingham wrote:
> On 17/02/2019 02:48, Laurent Pinchart wrote:
> > The vsp1_video_complete_buffer() function completes the current buffer
> > and returns a pointer to the next buffer. Split the code that completes
>
Hi Kieran,
On Sun, Feb 17, 2019 at 08:16:27PM +, Kieran Bingham wrote:
> On 17/02/2019 02:48, Laurent Pinchart wrote:
> > The WPF accesses partition configuration from pipe->partition in the
> > partition configuration that is not used for display pipelines.
>
> That
Hi Brian,
On Mon, Feb 18, 2019 at 12:22:58PM +, Brian Starkey wrote:
> On Sun, Feb 17, 2019 at 04:48:45AM +0200, Laurent Pinchart wrote:
> > Hello,
> >
> > This patch series implements display writeback support for the R-Car
> > Gen3 platforms in the VSP1 driver.
To prepare for addition of more flags to the display list, replace the
'internal' flag field by a bitmask 'flags' field.
Signed-off-by: Laurent Pinchart
---
drivers/media/platform/vsp1/vsp1_dl.c| 31 +---
drivers/media/platform/vsp1/vsp1_dl.h|
spin_unlock_irqrestore(&video->irqlock, flags);
- return done;
- }
-
list_del(&done->queue);
if (!list_empty(&video->irqqueue))
--
Regards,
Laurent Pinchart
.
Signed-off-by: Kieran Bingham
Signed-off-by: Laurent Pinchart
---
Changes since v3:
- Infer has_writeback from the number of LIFs and the generation
- Remove vsp1_video::is_writeback
- Describe writeback video nodes as 'writeback'
- Add mechanism to patch active display lists
- Handle
e full image width in that case, as is already done for the
part of the configuration currently relevant for display pipelines.
Signed-off-by: Laurent Pinchart
---
drivers/media/platform/vsp1/vsp1_wpf.c | 16 +---
1 file changed, 9 insertions(+), 7 deletions(-)
diff --git a/drivers
mplete_buffer(video, done);
return next;
}
@@ -352,7 +357,7 @@ static void vsp1_video_frame_end(struct vsp1_pipeline *pipe,
struct vsp1_video *video = rwpf->video;
struct vsp1_vb2_buffer *buf;
- buf = vsp1_video_complete_buffer(video);
+ buf = vsp1_video_complete_next_buffer(video);
if (buf == NULL)
return;
--
Regards,
Laurent Pinchart
The VSP-DL instances have two LIFs, and thus two copies of the
VI6_DISP_IRQ_ENB, VI6_DISP_IRQ_STA and VI6_WPF_WRBCK_CTRL registers. Fix
the corresponding macros accordingly.
Signed-off-by: Laurent Pinchart
---
drivers/media/platform/vsp1/vsp1_drm.c | 4 ++--
drivers/media/platform/vsp1
eo.h | 6 +
drivers/media/platform/vsp1/vsp1_wpf.c | 65 ++--
11 files changed, 378 insertions(+), 75 deletions(-)
--
Regards,
Laurent Pinchart
Display list fragments have been renamed to bodies. Replace one last
occurrence of the word fragment in the documentation.
Signed-off-by: Laurent Pinchart
---
drivers/media/platform/vsp1/vsp1_dl.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/media/platform
if (!ret && !strcmp(device, mdi.bus_info)) {
> + closedir(dp);
> + return newdev;
> + }
> + }
> + }
> + closedir(dp);
> + return device;
> +}
> +
> int parse_cmdline(int argc, char **argv)
> {
> int opt;
> @@ -175,7 +225,7 @@ int parse_cmdline(int argc, char **argv)
> opts, NULL)) != -1) {
> switch (opt) {
> case 'd':
> - media_opts.devname = optarg;
> + media_opts.devname = make_devname(optarg);
> break;
>
> case 'e':
--
Regards,
Laurent Pinchart
@@ int parse_cmdline(int argc, char **argv)
> }
>
> /* parse options */
> - while ((opt = getopt_long(argc, argv, "d:e:f:hil:prvV:",
> + while ((opt = getopt_long(argc, argv, "b:d:e:f:hil:prvV:",
> opts, NULL)) != -1) {
> switch (opt) {
> + case 'b':
> + media_opts.devname = find_bus_info(optarg);
> + if (!media_opts.devname) {
> + fprintf(stderr, "Error: no media device with
> bus info '%s' found\n",
> + optarg);
> + return 1;
> + }
> + break;
> +
> case 'd':
> - media_opts.devname = optarg;
> + media_opts.devname = make_devname(optarg);
> break;
>
> case 'e':
--
Regards,
Laurent Pinchart
| 6 --
5 files changed, 14 insertions(+), 11 deletions(-)
--
Regards,
Laurent Pinchart
nly fills in part of the info. E.g. if the full
> bus_info is usb-:01:00.0-1.4.2, then the media bus_info only has 1.4.2.
>
> Signed-off-by: Hans Verkuil
This makes sense, even if in the long run we'll likely have to revisit
bus info.
Reviewed-by: Laurent Pinchart
and applied
ator-XS-H3 ES2.0 : 164 tests: 148 passed, 0 failed, 3 skipped
> and
> Salvator-XS-M3N : 164 tests: 148 passed, 0 failed, 3 skipped
>
>
> Tested-by: Kieran Bingham
> Tested-on: Salvator-XS-ES2.0, Salvator-XS-M3N
Taken in my tree with all these tags and my
Revi
Perhaps "SoCs"?
>
> > + Please set the larb of camsys for Pass 1 and imgsys for DIP, or both
> > + if you are using all the camera function. You can see
> > + Documentation/devicetree/bindings/memory-controllers/
> > + mediatek,smi-larb.txt for the detail.
> > +
> > +Example:
> > + isp_smem: isp_smem {
> > + compatible = "mediatek,isp_smem";
> > + mediatek,larb = <&larb5>;
> > + iommus = <&iommu M4U_PORT_CAM_IMGI>;
> > + };
--
Regards,
Laurent Pinchart
; > +Example:
> > +
> > +The following example shows the DIP shared memory setup for MT8183.
> > +
> > + reserved-memory {
> > + #address-cells = <2>;
> > + #size-cells = <2>;
> > + ranges;
> > + reserve-memory-isp_smem {
> > + compatible = "mediatek,reserve-memory-dip_smem";
> > + size = <0 0x140>;
> > + alignment = <0 0x1000>;
> > + alloc-ranges = <0 0x4000 0 0x5000>;
> > + };
> > + };
--
Regards,
Laurent Pinchart
p3/4 patches in favor of this one, which is a much, much
> cleaner solution.
Thank you for looking into this. Great work :-)
Reviewed-by: Laurent Pinchart
> >> ---
> >> diff --git a/include/media/v4l2-subdev.h b/include/media/v4l2-subdev.h
> >> index 47af609dc8f1..34
pad, get_fmt, NULL, &fmt);
> + sd = media_entity_to_v4l2_subdev(link->sink->entity);
> + ret = v4l2_subdev_call(sd, pad, get_fmt, NULL, &fmt);
> if (ret < 0)
> return -EPIPE;
>
--
Regards,
Laurent Pinchart
sue in smath, and I don't like it.
Where will we draw the line if we accept it ? Will we start rejecting
all nested function calls or macros because we have a tooling issue ?
This one really needs to be fixed in smatch, the code is totally fine.
> if (unlikely(ret < 0)) {
> dev_warn(isp->dev, "get_fmt returned null!\n");
> return ret;
--
Regards,
Laurent Pinchart
om
> > pointer
> >
> > Signed-off-by: Hans Verkuil
>
> This look fine to me.
>
> Reviewed-by: Kieran Bingham
Even though I believe we should fix tooling instead of code to handle
these issues, the patch for uvcvideo doesn't adversely affect the code,
so
Reviewed-by
vc_video.c | 8
2 files changed, 19 insertions(+), 3 deletions(-)
--
Regards,
Laurent Pinchart
Commit 2cc1802f62e5 removed code without removing a local variable that
ended up being unused. This results in a compilation warning, fix it.
Fixes: 2cc1802f62e5 ("media: vb2: Keep dma-buf buffers mapped until they are
freed")
Signed-off-by: Laurent Pinchart
---
drivers/media/common
How should we proceed with this patch?
>
> IMO 5d0fd3c806b9 should be applied as well. It's effectively a bugfix as
> well (but which also, for most users, covered the problem fixed by
> 9c0863b1cc48).
>
> Laurent, could you confirm?
That seems good to me.
--
Regards,
Laurent Pinchart
ardware clock sample array is
> already released.
>
> Reported-by: Chiranjeevi Rapolu
> Tested-by: Chiranjeevi Rapolu
> Signed-off-by: Sakari Ailus
The analysis looks good to me.
Reviewed-by: Laurent Pinchart
> ---
> Hi Laurent,
>
> This seems like something that's
t; +{
> >>>>> + const char *vid;
> >>>>> + struct args args;
> >>>>> + void *md;
> >>>>> +
> >>>>> + args.driver = NULL;
> >>>>> + args.device_caps = 0;
> >>>>> + argp_parse(&argp, argc, argv, 0, 0, &args);
> >>>>> +
> >>>>> + md = discover_media_devices();
> >>>>
> >>>> I never really liked this. My main problem is that it doesn't know about
> >>>> media devices.
> >>>
> >>> Sorry, not sure what you don't really like?
> >>>
> >>> The discover_media_devices() is maybe not the best API, but it's what
> >>> v4l2-sysfs-path
> >>> uses, and it seemed to fit what we need as a first step (to find v4l2
> >>> devices).
> >>>
> >>> Perhaps we can use this for now and pospone improving the discovery
> >>> library?
> >>
> >> Yes, that can be postponed (I should have been clear about that, sorry).
> >>
> >>>> In my view it should look for media devices first, query them and get
> >>>> all the device
> >>>> nodes referenced in the topology, and then fall back to the old method
> >>>> to discover
> >>>> any remaining device nodes for drivers that do not create a media device.
I agree with Hans here. It's about time to make new development media
device-centric, and only fall back to legacy methods for legacy drivers.
> >>>> You need media device support anyway since you also want to be able to
> >>>> query the media
> >>>> device for a specific driver and find the device node for a specific
> >>>> entity.
> >>>
> >>> I've been thinking about this (since I started with
> >>> http://git.ideasonboard.org/media-enum.git),
> >>> but to be honest, I failed to see why I would want to query media devices.
> >>>
> >>> Let's say we want to find a H264 decoder, I don't think the topology is be
> >>> of much use, is it?
> >>
> >> Not for codecs, but this should become a generic utility that you can also
> >> use to find
> >> e.g. v4l-subdev device nodes from a complex camera driver.
> >
> > Ah, that makes sense.
> >
> > Thanks for the quick review!
> >
> >>> In any case, I think this is part of a bigger discussion, would you
> >>> consider merging
> >>> v4l discovery for now?
> >>>
> >>>>> +
> >>>>> + vid = NULL;
> >>>>> + do {
> >>>>> + struct v4l2_capability cap;
> >>>>> + char devnode[64];
> >>>>> + int ret;
> >>>>> + int fd;
> >>>>> +
> >>>>> + vid = get_associated_device(md, vid, MEDIA_V4L_VIDEO,
> >>>>> + NULL, NONE);
> >>>>> + if (!vid)
> >>>>> + break;
> >>>>> + snprintf(devnode, 64, "/dev/%s", vid);
> >>>>> + fd = open(devnode, O_RDWR);
> >>>>> + if (fd < 0)
> >>>>> + continue;
> >>>>> +
> >>>>> + memset(&cap, 0, sizeof cap);
> >>>>> + ret = ioctl(fd, VIDIOC_QUERYCAP, &cap);
> >>>>> + if (ret) {
> >>>>> + close(fd);
> >>>>> + continue;
> >>>>> + }
> >>>>> + close(fd);
> >>>>> +
> >>>>> + if (strncmp(args.driver, (char *)cap.driver,
> >>>>> sizeof(cap.driver)))
> >>>>> + continue;
> >>>>> + if (args.device_caps && (args.device_caps &
> >>>>> cap.device_caps) != args.device_caps)
> >>>>> + continue;
> >>>>> + fprintf(stdout, "%s\n", devnode);
> >>>>> + } while (vid);
> >>>>> + free_media_devices(md);
> >>>>> + return 0;
> >>>>> +}
> >>>>> diff --git a/v4l-utils.spec.in b/v4l-utils.spec.in
> >>>>> index 67bdca57ae92..ab15286b039b 100644
> >>>>> --- a/v4l-utils.spec.in
> >>>>> +++ b/v4l-utils.spec.in
> >>>>> @@ -159,6 +159,7 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor
> >>>>> &>/dev/null || :
> >>>>> %{_bindir}/ivtv-ctl
> >>>>> %{_bindir}/v4l2-ctl
> >>>>> %{_bindir}/v4l2-sysfs-path
> >>>>> +%{_bindir}/v4l2-get-device
> >>>>> %{_mandir}/man1/ir-keytable.1*
> >>>>> %{_mandir}/man1/ir-ctl.1*
--
Regards,
Laurent Pinchart
Hi Yong,
On Thu, Jan 10, 2019 at 06:35:11PM +, Zhi, Yong wrote:
> On Tuesday, December 11, 2018 6:59 AM, Laurent Pinchart wrote:
> > On Friday, 7 December 2018 03:03:40 EET Yong Zhi wrote:
> >> Add IPU3-specific meta formats for processing parameters and
Hi Sakari,
On Tue, Jan 22, 2019 at 06:14:57PM +0200, Sakari Ailus wrote:
> On Wed, Jan 16, 2019 at 01:51:45AM +0200, Laurent Pinchart wrote:
> > On Fri, Nov 02, 2018 at 12:31:30AM +0100, Niklas Söderlund wrote:
> >> From: Laurent Pinchart
> >>
> >> Signed-o
Hi Sakari,
On Tue, Jan 22, 2019 at 05:36:55PM +0200, Sakari Ailus wrote:
> On Wed, Jan 16, 2019 at 01:24:05AM +0200, Laurent Pinchart wrote:
> > On Fri, Nov 02, 2018 at 12:31:26AM +0100, Niklas Söderlund wrote:
> >> From: Sakari Ailus
> >>
> >> Add a helpe
Hi Sakari,
On Tue, Jan 22, 2019 at 05:31:34PM +0200, Sakari Ailus wrote:
> On Wed, Jan 16, 2019 at 12:54:20AM +0200, Laurent Pinchart wrote:
> > On Fri, Nov 02, 2018 at 12:31:20AM +0100, Niklas Söderlund wrote:
> >> From: Sakari Ailus
> >>
> >> The pipeline
Hi Sakari,
On Tue, Jan 22, 2019 at 05:15:06PM +0200, Sakari Ailus wrote:
> On Wed, Jan 16, 2019 at 12:57:43AM +0200, Laurent Pinchart wrote:
> >>
> >> This way the pads are always passed to the has_route() op sink pad first.
> >> Makes sense.
> >
> >
pid: 0 this pid 13084...
> > [ 1605.744549] SKIPPING ipu3_dmamap_free map pid: 0 this pid 13084...
> > [ 1605.751506] SKIPPING ipu3_dmamap_free map pid: 0 this pid 13084...
> > [ 1605.758465] SKIPPING ipu3_dmamap_free map pid: 0 this pid 13084...
> > [ 1605.765394] SKIPPING ipu3_dmamap_free map pid: 0 this pid 13084...
> > [ 1605.772447] SKIPPING ipu3_dmamap_free map pid: 0 this pid 13084...
> > [ 1605.779387] SKIPPING ipu3_dmamap_free map pid: 0 this pid 13084...
> > [ 1605.787021] SKIPPING ipu3_dmamap_free map pid: 0 this pid 13084...
> > [ 1605.801912] SKIPPING ipu3_dmamap_free map pid: 0 this pid 13084...
> > [ 1605.808976] SKIPPING ipu3_dmamap_free map pid: 0 this pid 13084...
> > [ 1605.816089] SKIPPING ipu3_dmamap_free map pid: 0 this pid 13084...
> > [ 1605.823311] SKIPPING ipu3_dmamap_free map pid: 0 this pid 13084...
> > [ 1605.830260] SKIPPING ipu3_dmamap_free map pid: 0 this pid 13084...
> > [ 1605.837218] SKIPPING ipu3_dmamap_free map pid: 0 this pid 13084...
> > [ 1605.844203] SKIPPING ipu3_dmamap_free map pid: 0 this pid 13084...
> > [ 1605.851192] SKIPPING ipu3_dmamap_free map pid: 0 this pid 13084...
> > [ 1605.858148] SKIPPING ipu3_dmamap_free map pid: 0 this pid 13084...
> > [ 1605.865073] SKIPPING ipu3_dmamap_free map pid: 0 this pid 13084...
> > [ 1605.872038] SKIPPING ipu3_dmamap_free map pid: 0 this pid 13084...
> > [ 1605.878971] SKIPPING ipu3_dmamap_free map pid: 0 this pid 13084...
> > [ 1605.885905] SKIPPING ipu3_dmamap_free map pid: 0 this pid 13084...
> > [ 1605.892876] SKIPPING ipu3_dmamap_free map pid: 0 this pid 13084...
> > [ 1605.899815] SKIPPING ipu3_dmamap_free map pid: 0 this pid 13084...
> > [ 1605.906829] SKIPPING ipu3_dmamap_free map pid: 0 this pid 13084...
> > [ 1606.013925] ipu3-imgu :00:05.0: wait cio gate idle timeout
> >
> >
> >> My guess is that when using multiple instances of yavta the calls to
> >> VIDIOC_STREAMOFF on the different video nodes are asynchronous and
> >> happen in a way that the driver does not expect. Regardless of how the API
> >> is
> >> exercised by applications, in a good or bad way, the IPU3 driver must not
> >> crash. It needs to be prepared for all V4L2 ioctls to be called at any
> >> time, and
> >> an application could call VIDIOC_STREAMOFF on any video node while the
> >> IPU3 is busy processing images.
> >>
> >>> With the help of local application that operates these pipes in a
> >>> serial fashion, I do not see this issue.
> >>
> >> [snip]
--
Regards,
Laurent Pinchart
Hi Kieran,
On Sat, Jan 12, 2019 at 04:50:32PM +, Kieran Bingham wrote:
> On 11/01/2019 20:15, Laurent Pinchart wrote:
> > On Friday, 11 January 2019 19:41:40 EET Kieran Bingham wrote:
> >> The ADV748x is currently reset by writting a small table of registers to
> >>
t_v4l2_subdev_routing(new_p64, p32);
> + compatible_arg = 0;
> + break;
> +
> case VIDIOC_G_EDID:
> case VIDIOC_S_EDID:
> err = alloc_userspace(sizeof(struct v4l2_edid), 0, &new_p64);
> @@ -1368,6 +1441,10 @@ static long do_video_ioctl(struct file *file, unsigned
> int cmd, unsigned long ar
> if (put_v4l2_edid32(new_p64, p32))
> err = -EFAULT;
> break;
> + case VIDIOC_SUBDEV_G_ROUTING:
> + case VIDIOC_SUBDEV_S_ROUTING:
> + err = put_v4l2_subdev_routing(new_p64, p32);
> + break;
> }
> if (err)
> return err;
--
Regards,
Laurent Pinchart
Hi Niklas,
Thank you for the patch.
On Fri, Nov 02, 2018 at 12:31:30AM +0100, Niklas Söderlund wrote:
> From: Laurent Pinchart
>
> Signed-off-by: Laurent Pinchart
> Signed-off-by: Michal Simek
>
> - Add sink and source streams for multiplexed links
> - Copy the argume
return true;
> + }
Isn't this best implemented in drivers ? I fear the complexity you need
here isn't worth it, especially given that you would also need to
support cases such as
Pads 0, 1 and 2 are sink, pads 3 and 4 are sources. has_route(0, 3),
has_route(1, 3), has_route(1, 4) and has_route(2, 4) are all true,
has_route(0, 4) and has_route(2, 3) are all false.
media_entity_has_route(0, 2) should return true.
> + return false;
> +
> }
> EXPORT_SYMBOL_GPL(media_entity_has_route);
>
--
Regards,
Laurent Pinchart
u -> %u (no route)\n",
> + pad->entity->name, pad->index, local->index);
Maybe "%s: skipping...", __func__, ?
Apart from that,
Reviewed-by: Laurent Pinchart
> return;
> }
>
--
Regards,
Laurent Pinchart
> Signed-off-by: Sakari Ailus
> Reviewed-by: Niklas Söderlund
Reviewed-by: Laurent Pinchart
> ---
> drivers/media/media-entity.c | 20 ++--
> 1 file changed, 6 insertions(+), 14 deletions(-)
>
> diff --git a/drivers/media/media-entity.c b/drivers/media/med
Hi Sakari,
On Wed, Jan 16, 2019 at 12:34:07AM +0200, Sakari Ailus wrote:
> On Wed, Jan 16, 2019 at 12:21:36AM +0200, Laurent Pinchart wrote:
> > On Fri, Nov 02, 2018 at 12:31:17AM +0100, Niklas Söderlund wrote:
> >> From: Sakari Ailus
> >>
> >> Instead of
iter < &(start)->entity->pads[(start)->entity->num_pads]; \
> + iter = __media_entity_for_routed_pads_next(start, iter + 1))
> +
> /**
> * media_graph_walk_cleanup - Release resources used by graph walk.
> *
--
Regards,
Laurent Pinchart
gt; part of the pipeline, however. Skip the link validation for such pads.
>
> Signed-off-by: Sakari Ailus
> Reviewed-by: Niklas Söderlund
Reviewed-by: Laurent Pinchart
> ---
> drivers/media/media-entity.c | 5 +
> 1 file changed, 5 insertions(+)
>
> diff --git a/drive
ad0].flags & MEDIA_PAD_FL_SOURCE
> + && entity->pads[pad1].flags & MEDIA_PAD_FL_SINK)
> + swap(pad0, pad1);
> +
> return entity->ops->has_route(entity, pad0, pad1);
> }
> EXPORT_SYMBOL_GPL(media_entity_has_route);
--
Regards,
Laurent Pinchart
t()
> */
> -__must_check int __media_pipeline_start(struct media_entity *entity,
> +__must_check int __media_pipeline_start(struct media_pad *pad,
> struct media_pipeline *pipe);
>
> /**
> * media_pipeline_stop - Mark a pipeline as
, numbered from 0 to n
> * @sig_type:Type of the signal inside a media pad
> * @flags: Pad flags, as defined in
> * :ref:`include/uapi/linux/media.h `
> * (seek for ``MEDIA_PAD_FL_*``)
> + * .. note::
> + *
> + *@stream_count reference co
) {
> if (is_media_entity_v4l2_video_device(pad->entity))
> @@ -388,7 +387,7 @@ static int pipeline_pm_power_one(struct media_entity
> *entity, int change)
>
> /*
> * pipeline_pm_power - Apply power change to all entities in a pipeline
> - * @entity: The entit
dia_pad *pad);
> * The graph structure must have been previously initialized with a call to
> * media_graph_walk_start().
> *
> - * Return: returns the next entity in the graph or %NULL if the whole graph
> - * have been traversed.
> + * Return: returns the next pad in the g
w be called media_pad_other() ?
> {
> - if (link->source->entity == entity)
> - return link->sink->entity;
> + if (link->source == pad)
> + return link->sink;
> else
> - return link->source->entity;
> + return link->source;
> }
[snip]
--
Regards,
Laurent Pinchart
*/
> - while (link_top(graph) != &stack_top(graph)->links)
> + while (link_top(graph) != &stack_top(graph)->entity->links)
> media_graph_walk_iter(graph);
>
> - entity = stack_pop(graph);
> + entity
t;
> Signed-off-by: Sakari Ailus
> Reviewed-by: Niklas Söderlund
Reviewed-by: Laurent Pinchart
> ---
> Documentation/media/kapi/mc-core.rst| 2 +-
> drivers/media/media-entity.c| 17 -
> drivers/media/platform/exynos4-is/media-d
if (PTR_ERR(b) != -EBUSY) /* All done */
> > + dev_err(&imgu->pci_dev->dev,
> > + "failed to dequeue buffers
> > (%ld)\n", + PTR_ERR(b));
> >
> > break;
> >
> > }
> >
> > --
> > 2.7.4
--
Regards,
Laurent Pinchart
plication could call VIDIOC_STREAMOFF on any video node while the IPU3 is
busy processing images.
> With the help of local application that operates these pipes in a serial
> fashion, I do not see this issue.
[snip]
--
Regards,
Laurent Pinchart
gt; while (regs->page != ADV748X_PAGE_EOR) {
While at it you could write this as
for (; regs->page != ADV748X_PAGE_EOR; ++regs)
and remove the regs++ below.
Reviewed-by: Laurent Pinchart
> - if (regs->page == ADV748X_PAGE_WAIT) {
> -
> + return ret;
> +
> + usleep_range(5000, 6000);
> +
> + /* Disable CEC Wakeup from power-down mode */
> + ret = io_clrset(state, ADV748X_IO_REG_01, ADV748X_IO_REG_01_PWRDN_MASK,
> + ADV748X_IO_REG_01_PWRDNB);
What's the reas
Hello Yong,
On Tuesday, 11 December 2018 14:58:50 EET Laurent Pinchart wrote:
> On Friday, 7 December 2018 03:03:40 EET Yong Zhi wrote:
> > Add IPU3-specific meta formats for processing parameters and
> > 3A statistics.
> >
> > V4L2_META_FMT_IPU3_PARAMS
>
internal blocks of the ImgU.
Signed-off-by: Laurent Pinchart
---
Documentation/media/v4l-drivers/ipu3.rst | 201 +++
1 file changed, 94 insertions(+), 107 deletions(-)
diff --git a/Documentation/media/v4l-drivers/ipu3.rst
b/Documentation/media/v4l-drivers/ipu3.rst
index
Hi Jacopo,
On Thursday, 10 January 2019 10:51:00 EET Jacopo Mondi wrote:
> On Wed, Jan 09, 2019 at 02:15:04AM +0200, Laurent Pinchart wrote:
> > On Monday, 7 January 2019 14:36:28 EET Kieran Bingham wrote:
> >> On 06/01/2019 15:54, Jacopo Mondi wrote:
> >>> When
t; +
> > +static const struct media_entity_operations adv748x_tx_media_ops = {
> > + .link_setup = adv748x_link_setup,
> > + .link_validate = v4l2_subdev_link_validate,
> > +};
> >
> > static const struct media_entity_operations adv748x_media_ops = {
> > .link_validate = v4l2_subdev_link_validate,
> > @@ -516,7 +570,8 @@ void adv748x_subdev_init(struct v4l2_subdev *sd,
> > struct adv748x_state *state,
> > state->client->addr, ident);
> >
> > sd->entity.function = function;
> > - sd->entity.ops = &adv748x_media_ops;
> > + sd->entity.ops = is_tx(adv748x_sd_to_csi2(sd)) ?
> > +&adv748x_tx_media_ops : &adv748x_media_ops;
>
> Aha - yes that's a neat solution to ensure that only the TX links
> generate link_setup calls :)
Another option would be to bail out from adv748x_link_setup() if the entity is
not a TX*.
> > }
[snip]
--
Regards,
Laurent Pinchart
ten "Create link", but then realized that the function is
named adv748x_csi2_register_link(). Looking at its definition, I now see this
means "register and link". That seems a bit of a hack, especially seeing how
double registration is skipped in the function by checking src->v4l2_dev.
Kieran, could this be fixed ?
> + if (is_txb(tx) || !is_hdmi_enabled(state))
> + return 0;
> +
> + return adv748x_csi2_register_link(tx, sd->v4l2_dev, &state->hdmi.sd,
> + ADV748X_HDMI_SOURCE, true);
> }
>
> static const struct v4l2_subdev_internal_ops adv748x_csi2_internal_ops = {
--
Regards,
Laurent Pinchart
#x27;is_tx()' macro this series adds in
> > 6/6.
> >
> > If it is easier to have an '((_tx) == &(_tx)->state->txb)' I can
> > change this.
I would find it cleaner to write out is_txa and is_txb explicitly instead of
hiding the implementation behind an __is_tx macro, especially given that we
won't have to extend this in the future.
Reviewed-by: Laurent Pinchart
> It's fine for me as you've got it.
>
> It's still clear and readable, and implements the required functionality.
>
>
--
Regards,
Laurent Pinchart
Hi Raj,
(CC'ing Jacopo Mondi)
On Saturday, 5 January 2019 04:26:16 EET Mani, Rajmohan wrote:
> >> On Tuesday, 11 December 2018 15:43:53 EET Laurent Pinchart wrote:
> >>> On Tuesday, 11 December 2018 15:34:49 EET Laurent Pinchart wrote:
> >>>> On Wed
Hi Mauro,
On Tuesday, 8 January 2019 20:49:16 EET Mauro Carvalho Chehab wrote:
> Em Tue, 8 Jan 2019 21:11:41 +0500 Mikhail Gavrilov escreveu:
> > On Tue, 8 Jan 2019 at 20:57, Laurent Pinchart wrote:
> >> Thank you.
> >>
> >> Your device exposes five forma
> > How about:
> >
> > PAGE_ALIGN() may wrap the buffer length around to 0 if the value to be
> > aligned is close to the top of the value range of the type. Prevent this
> > by
> > checking that the aligned value is not smaller than the unaligned one.
>
> I would be a way more clear, as this is there to prevent a single
> special case: length == ULEN_MAX. Something like:
>
> If one tried to allocate a buffer with sizeof(ULEN_MAX), this will cause
> an overflow at PAGE_ALIGN(), making it return zero as the size of the
> buffer, causing the code to fail.
>
> I would even let it clearer at the code itself. So, instead of the
> hunk you proposed, I would do:
>
> unsigned long size = vb->planes[plane].length;
>
> /* Prevent PAGE_ALIGN overflow */
> if (WARN_ON(size == ULONG_MAX))
> goto free;
ULONG_MAX - PAGE_SIZE + 2 to ULONG_MAX would all cause the same issue.
>
> size = PAGE_ALIGN(vb->planes[plane].length);
--
Regards,
Laurent Pinchart
Hi Mikhail,
On Tuesday, 8 January 2019 17:18:15 EET Mikhail Gavrilov wrote:
> On Tue, 8 Jan 2019 at 19:53, Laurent Pinchart
>
> wrote:
> > Mikhail, could you please post the output of
> >
> > lsusb -v -d 07ca:0553
> >
> > if possible running as roo
On Tuesday, 8 January 2019 17:16:21 EET Mauro Carvalho Chehab wrote:
> Em Tue, 08 Jan 2019 16:54:41 +0200 Laurent Pinchart escreveu:
> > On Tuesday, 8 January 2019 16:45:37 EET Mauro Carvalho Chehab wrote:
> >> Em Sun, 6 Jan 2019 01:05:16 +0500 Mikhail Gavrilov escrev
t; c0405602 RDI: 0027 [ 75.985933] RBP:
> > 00000004 R08: 0000 R09: [
> > 75.985934] R10: R11: 0246 R12:
> > 0007 [ 75.985935] R13: 0001 R14:
> > 7ffe01cdc630 R15: 55a982fdf6e0 [ 75.985937] ---[ end trace
> > 26d01f03c564a254 ]---
> >
> >
> > Is it possible to fix this error?
>
> I suspect that the UVC descriptors are pointing to another format that
> the driver currently doesn't recognize, but I would be expecting to see
> some message with:
>
> Unknown video format xxx
>
> printed as well, if this is, indeed, using the uvcdriver.
--
Regards,
Laurent Pinchart
ver wants it.
> config IOMMU_API
> bool
> @@ -81,9 +85,6 @@ config IOMMU_DEFAULT_PASSTHROUGH
>
> If unsure, say N here.
>
> -config IOMMU_IOVA
> - tristate
> -
> config OF_IOMMU
> def_bool y
> depends on OF && IOMMU_API
--
Regards,
Laurent Pinchart
Hello Bingbu,
On Wednesday, 2 January 2019 04:38:33 EET Bingbu Cao wrote:
> On 12/26/2018 07:03 PM, Laurent Pinchart wrote:
> > On Monday, 17 December 2018 05:14:44 EET Bingbu Cao wrote:
> >> On 12/14/2018 06:24 AM, Laurent Pinchart wrote:
> >>> On Wednesday, 12 Dec
Hello Bingbu,
On Monday, 17 December 2018 05:14:44 EET Bingbu Cao wrote:
> On 12/14/2018 06:24 AM, Laurent Pinchart wrote:
> > On Wednesday, 12 December 2018 06:55:53 EET Bingbu Cao wrote:
> >> On 12/11/2018 09:43 PM, Laurent Pinchart wrote:
> >>> On Tuesday, 11 Dece
Hellon
On Sunday, 16 December 2018 09:26:18 EET Laurent Pinchart wrote:
> Hello Yong,
>
> Could you please have a look at the crash reported below ?
A bit more information to help you debugging this. I've enabled KASAN in the
kernel configuration, and get the following use-afte
Hi Alistair,
Thank you for the patch.
On Wednesday, 19 December 2018 03:32:48 EET Alistair Strachan wrote:
> From: Laurent Pinchart
Are you sure you don't want to keep authorship ? I've merely reviewed v1 and
proposed an alternative implementation :-) Let me know what you woul
ther event code is properly zeroing the structure,
> it's these two places.
Indeed :-(
maybe s/it's these/it's only these/ ?
Reviewed-by: Laurent Pinchart
I assume you will merge this directly, without a need for me to take the patch
in my UVC branch ?
> Signed-off-by:
ided at that time.
>
> Reported-by: syzbot
> Signed-off-by: Alistair Strachan
> Cc: Laurent Pinchart
> Cc: Mauro Carvalho Chehab
> Cc: linux-media@vger.kernel.org
> Cc: kernel-t...@android.com
> ---
> drivers/media/usb/uvc/uvc_driver.c | 4 ++--
> 1 file changed, 2 inse
Hello Yong,
Could you please have a look at the crash reported below ?
On Tuesday, 11 December 2018 16:20:43 EET Laurent Pinchart wrote:
> On Tuesday, 11 December 2018 15:43:53 EET Laurent Pinchart wrote:
> > On Tuesday, 11 December 2018 15:34:49 EET Laurent Pinchart wrote:
> >&g
@@ enum rvin_csi_id {
> };
>
> /**
> - * STOPPED - No operation in progress
> - * STARTING - Capture starting up
> - * RUNNING - Operation in progress have buffers
> - * STOPPING - Stopping operation
> + * STOPPED - No operation in progress
> + * STARTING - Capture
gt; d21fc991b7a9da36..700fae1c1225a2f3 100644
> --- a/drivers/media/platform/rcar-vin/rcar-vin.h
> +++ b/drivers/media/platform/rcar-vin/rcar-vin.h
> @@ -269,4 +269,7 @@ void rvin_crop_scale_comp(struct rvin_dev *vin);
>
> int rvin_set_channel_routing(struct rvin_dev *vin, u8 chsel);
>
> +int rvin_start_streaming(struct rvin_dev *vin);
> +void rvin_stop_streaming(struct rvin_dev *vin);
> +
> #endif
--
Regards,
Laurent Pinchart
@state: keeps track of operation state
> *
> * @is_csi: flag to mark the VIN as using a CSI-2 subdevice
> + * @chselCached value of the current CSI-2 channel selection
Nitpicking, the documentation for other fields don't start with a
rn the use count to the caller but to return
> 0 on success else none zero.
>
> Fix this by always returning 0 if the operation is successful.
>
> Signed-off-by: Niklas Söderlund
Reviewed-by: Laurent Pinchart
> ---
> drivers/media/platform/rcar-vin/rcar-dma.c | 2 +-
>
Hello Bingbu,
On Wednesday, 12 December 2018 06:55:53 EET Bingbu Cao wrote:
> On 12/11/2018 09:43 PM, Laurent Pinchart wrote:
> > On Tuesday, 11 December 2018 15:34:49 EET Laurent Pinchart wrote:
> >> On Wednesday, 5 December 2018 02:30:46 EET Mani, Rajmohan wrote:
> >>
Hi Fabrizio,
Thank you for the patch.
On Thursday, 13 December 2018 22:20:24 EET Fabrizio Castro wrote:
> Document RZ/G1 and RZ/G2 support.
>
> Signed-off-by: Fabrizio Castro
Reviewed-by: Laurent Pinchart
And applied to my tree.
> ---
> Documentation/devicetree/bindings/med
Hi Fabrizio,
Thank you for the patch.
On Thursday, 13 December 2018 22:20:33 EET Fabrizio Castro wrote:
> Document RZ/G2 support.
>
> Signed-off-by: Fabrizio Castro
Reviewed-by: Laurent Pinchart
And applied to my tree.
> ---
> Documentation/devicetree/bindings/media/rene
Hi Sakari,
On Thursday, 13 December 2018 15:02:03 EET Sakari Ailus wrote:
> On Thu, Dec 13, 2018 at 02:59:50PM +0200, Laurent Pinchart wrote:
> > On Thursday, 13 December 2018 12:40:06 EET Sakari Ailus wrote:
> > > The size argument of the alloc memop, which allocates buffer mem
On Thursday, 13 December 2018 15:00:23 EET Sakari Ailus wrote:
> Hi Laurent,
>
> On Thu, Dec 13, 2018 at 02:57:46PM +0200, Laurent Pinchart wrote:
> > Hi Sakari,
> >
> > Thank you for the patch.
> >
> > On Thursday, 13 December 2018 12:40:05 EET Sa
usually will result in the allocator freeing the buffer (if
> * no other users of this buffer are present); the @buf_priv
I wonder if a WARN_ON() to ensure this would make sense. In any case,
Reviewed-by: Laurent Pinchart
--
Regards,
Laurent Pinchart
ia/common/videobuf2/videobuf2-dma-sg.c
> @@ -59,7 +59,7 @@ static int vb2_dma_sg_alloc_compacted(struct
> vb2_dma_sg_buf *buf, gfp_t gfp_flags)
> {
> unsigned int last_page = 0;
> - int size = buf->size;
> + unsigned long size = buf->size;
>
> while (size > 0) {
> struct page *pages;
--
Regards,
Laurent Pinchart
those
checks are missing there). Alternatively, the checks could be moved to the
beginning of __vb2_queue_alloc().
--
Regards,
Laurent Pinchart
t; +
> +
> +User space code that configures and uses IPU3 is available here.
> +
> +https://chromium.googlesource.com/chromiumos/platform/arc-camera/+/master/
> +
> +The source can be located under hal/intel directory.
How about appending hal/intel to the URL then ? :-)
> +References
> +==
> +
> +.. [#f5] include/uapi/linux/intel-ipu3.h
> +
> +.. [#f1] https://github.com/intel/nvt
> +
> +.. [#f2] http://git.ideasonboard.org/yavta.git
> +
> +.. [#f3] http://git.ideasonboard.org/?p=media-ctl.git;a=summary
> +
> +.. [#f4] ImgU limitation requires an additional 16x16 for all input
> resolutions diff --git a/drivers/staging/media/ipu3/TODO
> b/drivers/staging/media/ipu3/TODO index 922b885f10a70..905bbb190217b 100644
> --- a/drivers/staging/media/ipu3/TODO
> +++ b/drivers/staging/media/ipu3/TODO
> @@ -21,3 +21,14 @@ staging directory.
>Further clarification on some ambiguities such as data type conversion of
> IEFD CU inputs. (Sakari)
>Move acronyms to doc-rst file. (Mauro)
> +
> +- Switch to yavta from v4l2n in driver docs.
> +
> +- Elaborate the functionality of different selection rectangles in driver
> + documentation. This may require driver changes as well.
> +
> +- More detailed documentation on calculating BDS, GCD etc. sizes needed.
> +
> +- Document different operation modes, and which buffer queues are relevant
> + in each mode. To process an image, which queues require a buffer an in
> + which ones is it optional?
- Move the internal block diagram from the metadata format documentation to
the ipu3 driver documentation.
--
Regards,
Laurent Pinchart
DRIVER
> +M: Sakari Ailus
> +L: linux-media@vger.kernel.org
> +S: Maintained
> +F: drivers/staging/media/ipu3/
> +F: Documentation/media/uapi/v4l/pixfmt-meta-intel-ipu3.rst
> +F: Documentation/media/v4l-drivers/ipu3.rst
> +
Do you realize what you're getting i
Hi Sakari,
On Thursday, 13 December 2018 11:38:26 EET Sakari Ailus wrote:
> Hi Laurent,
>
> I'm sending a separate patch to address the comments.
>
> On Fri, Nov 30, 2018 at 12:50:36AM +0200, Laurent Pinchart wrote:
> > On Tuesday, 30 October 2018 00:22:56 EET
-
> -- diff --git a/drivers/media/i2c/adv748x/adv748x.h
> b/drivers/media/i2c/adv748x/adv748x.h index 0ee3b8d5c795..63a17c31c169
> 100644
> --- a/drivers/media/i2c/adv748x/adv748x.h
> +++ b/drivers/media/i2c/adv748x/adv748x.h
> @@ -220,6 +220,7 @@ struct adv748x_state {
> #define ADV748X_IO_10_CSI4_ENBIT(7)
> #define ADV748X_IO_10_CSI1_ENBIT(6)
> #define ADV748X_IO_10_PIX_OUT_EN BIT(5)
> +#define ADV748X_IO_10_CSI4_IN_SEL_AFE0x08
>
> #define ADV748X_IO_CHIP_REV_ID_1 0xdf
> #define ADV748X_IO_CHIP_REV_ID_2 0xe0
--
Regards,
Laurent Pinchart
201 - 300 of 8133 matches
Mail list logo