Hi Javier, thanks for the confirmations. I'm working on a
fix for imx-media.
Steve
On 06/12/2018 10:27 AM, Javier Martinez Canillas wrote:
Hi Steve,
On 06/11/2018 11:06 PM, Steve Longerbeam wrote:
[snip]
I've been made aware [1] that recently V4L2_FIELD_ALTERNATE has been
clarified [2] to specify that v4l2_mbus_fmt.height should contain the
number of lines per field, not per frame:
Yep! That was nagging at me as well. I noticed at least one other
platform (omap3isp) that doubles the source pad frame height
Coincidentally I noticed this problem when testing on a board with an
omap3isp. This is the pipeline setup I've been using for a long time:
$ media-ctl -l '"tvp5150 1-005c":1->"OMAP3 ISP CCDC":0[1]'
$ media-ctl -l '"OMAP3 ISP CCDC":1->"OMAP3 ISP CCDC output":0[1]'
$ media-ctl -V '"OMAP3 ISP CCDC":0 [UYVY2X8 720x240 field:alternate]'
$ media-ctl -V '"OMAP3 ISP CCDC":1 [UYVY 720x480 field:interlaced-tb]'
when the sensor reports ALTERNATE field mode, to capture a
whole frame. Makes sense. I think the crop height will need to
As you said, the ISP doubles the source pad height, and so the sink
pad is meant to have half of the frame height and this should match
the camera sensor height. But since the tvp5150 had the full frame
height (720x480) in its source pad, this didn't match the CCDC sink
pads height which lead to .link_validate callback to return -EPIPE:
ioctl(3, VIDIOC_STREAMON, 0xbeabea18) = -1 EPIPE (Broken pipe)
After the revert, link validation / STREAMON works correctly and the
following is what the relevant media entities look like in the graph:
- entity 15: OMAP3 ISP CCDC (3 pads, 9 links)
type V4L2 subdev subtype Unknown flags 0
device node name /dev/v4l-subdev2
pad0: Sink
[fmt:UYVY2X8/720x240 field:alternate]
<- "OMAP3 ISP CCP2":1 []
<- "OMAP3 ISP CSI2a":1 []
<- "tvp5150 1-005c":1 [ENABLED]
pad1: Source
[fmt:UYVY/720x480 field:interlaced-tb
crop.bounds:(0,0)/720x240
crop:(0,0)/720x240]
-> "OMAP3 ISP CCDC output":0 [ENABLED]
-> "OMAP3 ISP resizer":0 []
- entity 81: tvp5150 1-005c (4 pads, 1 link)
type V4L2 subdev subtype Decoder flags 0
device node name /dev/v4l-subdev8
pad0: Sink
pad1: Source
[fmt:UYVY2X8/720x240 field:alternate
crop.bounds:(0,0)/720x480
crop:(0,0)/720x480]
-> "OMAP3 ISP CCDC":0 [ENABLED]
Best regards,