Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1573125
| From | Laurent Pinchart <laurent.pinchart@ideasonboard.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH v3 00/24] i.MX Media Driver |
| Date | 2017-02-03 15:50 +0100 |
| Message-ID | <t6Nlv-2Me-3@gated-at.bofh.it> (permalink) |
| References | <sWOLT-2qI-3@gated-at.bofh.it> <t5Zyq-4a5-37@gated-at.bofh.it> <t6di2-4Nn-11@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
Hello, On Wednesday 01 Feb 2017 16:19:27 Steve Longerbeam wrote: > On 02/01/2017 01:30 AM, Philipp Zabel wrote: > > On Tue, 2017-01-31 at 17:26 -0800, Steve Longerbeam wrote: > > [...] > > > >>> # Set pad formats > >>> media-ctl --set-v4l2 "'tc358743 1-000f':0[fmt:UYVY/1920x1080]" > >>> media-ctl --set-v4l2 "'imx6-mipi-csi2':1[fmt:UYVY2X8/1920x1080]" > >>> media-ctl --set-v4l2 "'ipu1_csi0_mux':2[fmt:UYVY2X8/1920x1080]" > >>> media-ctl --set-v4l2 "'ipu1_csi0':2[fmt:AYUV32/1920x1080]" > >>> > >>> v4l2-ctl -d /dev/video4 -V > >>> # This still is configured to 640x480, which is inconsistent with > >>> # the 'ipu1_csi0':2 pad format. The pad set_fmt above should > >>> # have set this, too. > >> > >> Because you've only configured the source pads, > >> and not the sink pads. The ipu_csi source format is > >> dependent on the sink format - output crop window is > >> limited by max input sensor frame, and since sink pad is > >> still at 640x480, output is reduced to that. > > > > No, it is set (see below). What happens is that capture_g_fmt_vid_cap > > just returns the capture devices' priv->vdev.fmt, even if it is > > incompatible with the connected csi subdevice's output pad format. > > > > priv->vdev.fmt was never changed from the default set in > > imx_media_capture_device_register, because capture_s/try_fmt_vid_cap > > were not called yet. > > Ah, yep, this is a bug. Need to modify the capture device's > width/height at .set_fmt() in the subdev's device-node source > pad (csi and prpenc/vf). > > >> Maybe I'm missing something, is it expected behavior that > >> a source format should be automatically propagated to > >> the sink? > > > > media-ctl propagates the output pad format to all remote subdevices' > > input pads for all enabled links: > > > > https://git.linuxtv.org/v4l-utils.git/tree/utils/media-ctl/libv4l2subdev.c > > #n693 > > Ah cool, I wasn't aware media-ctl did this, but it makes sense and > makes it easier on the user. To be precise, userspace is responsible for propagating formats *between* subdevs (source to sink, over a link) and drivers for propagating formats *in* subdevs (sink to source, inside the subdev). > >>> v4l2-ctl --list-formats -d /dev/video4 > >>> # This lists all the RGB formats, which it shouldn't. There is > >>> # no CSC in this pipeline, so we should be limited to YUV formats > >>> # only. > >> > >> right, need to fix that. Probably by poking the attached > >> source subdev (csi or prpenc/vf) for its supported formats. > > > > You are right, in bayer/raw mode only one specific format should be > > listed, depending on the CSI output pad format. -- Regards, Laurent Pinchart
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Re: [PATCH v3 00/24] i.MX Media Driver Philipp Zabel <p.zabel@pengutronix.de> - 2017-01-31 15:20 +0100
Re: [PATCH v3 00/24] i.MX Media Driver Philipp Zabel <p.zabel@pengutronix.de> - 2017-01-31 15:30 +0100
Re: [PATCH v3 00/24] i.MX Media Driver Russell King - ARM Linux <linux@armlinux.org.uk> - 2017-01-31 16:10 +0100
Re: [PATCH v3 00/24] i.MX Media Driver Steve Longerbeam <slongerbeam@gmail.com> - 2017-02-01 02:30 +0100
Re: [PATCH v3 00/24] i.MX Media Driver Philipp Zabel <p.zabel@pengutronix.de> - 2017-02-01 10:40 +0100
Re: [PATCH v3 00/24] i.MX Media Driver Russell King - ARM Linux <linux@armlinux.org.uk> - 2017-02-01 11:20 +0100
Re: [PATCH v3 00/24] i.MX Media Driver Philipp Zabel <p.zabel@pengutronix.de> - 2017-02-01 11:50 +0100
Re: [PATCH v3 00/24] i.MX Media Driver Russell King - ARM Linux <linux@armlinux.org.uk> - 2017-02-01 12:00 +0100
Re: [PATCH v3 00/24] i.MX Media Driver Steve Longerbeam <slongerbeam@gmail.com> - 2017-02-02 01:20 +0100
Re: [PATCH v3 00/24] i.MX Media Driver Laurent Pinchart <laurent.pinchart@ideasonboard.com> - 2017-02-03 15:50 +0100
Re: [PATCH v3 00/24] i.MX Media Driver Steve Longerbeam <slongerbeam@gmail.com> - 2017-02-03 19:00 +0100
csiph-web