From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: Maud Spierings <maudspierings@gocontroll.com>
Cc: Fabio Estevam <festevam@gmail.com>,
Tim Harvey <tharvey@gateworks.com>,
mchehab@kernel.org, Shawn Guo <shawnguo@kernel.org>,
Sascha Hauer <s.hauer@pengutronix.de>,
Pengutronix Kernel Team <kernel@pengutronix.de>,
linux-media@vger.kernel.org, imx@lists.linux.dev
Subject: Re: Kernel Panic when trying to capture camera with ffmpeg on imx8mp
Date: Wed, 13 Aug 2025 14:57:26 +0300 [thread overview]
Message-ID: <20250813115726.GC20174@pendragon.ideasonboard.com> (raw)
In-Reply-To: <cd44c529-9c39-40c5-9fb7-07b36ab4c616@gocontroll.com>
On Wed, Aug 13, 2025 at 01:45:40PM +0200, Maud Spierings wrote:
> On 8/13/25 13:41, Laurent Pinchart wrote:
> > On Wed, Aug 13, 2025 at 02:36:01PM +0300, Laurent Pinchart wrote:
> >> On Wed, Aug 13, 2025 at 01:31:34PM +0200, Maud Spierings wrote:
> >>> On 8/13/25 13:23, Fabio Estevam wrote:
> >>>> Hi Maud,
> >>>>
> >>>> [Adding Tim]
> >>>>
> >>>> On Wed, Aug 13, 2025 at 8:12 AM Maud Spierings wrote:
> >>>>
> >>>>> My devicetree setup is practically identical to the one in
> >>>>> freescale/imx8mp-venice-gw74xx-imx219.dtso (different i2c bus and
> >>>>> regulator gpio only)
> >>>>
> >>>> You'll need to configure the camera pipeline using media-ctl commands.
> >>>>
> >>>> Take a look at:
> >>>> https://trac.gateworks.com/wiki/venice/multimedia#MediaControllerPipeline
> >>>
> >>> I have been messing around with that, but it still shouldn't panic right?
> >>
> >> It shouldn't panic, no. That's a bug in the driver.
> >>
> >>> It seems to be happen in:
> >>> sd = media_entity_to_v4l2_subdev(pad->entity);
> >>>
> >>> in mxc_isi_crossbar_xlate_streams()
> >>>
> >>> Checking now if the pad variable is the issue
> >>>
> >>> it seems media_pad_remote_pad_first() can return NULL which would cause
> >>> the issue there I think.
> >
> > Can you share the media graph as output by `media-ctl -p -d /dev/media0`
> > just before running ffmpeg ? You may need to replace media0 with the
> > device corresponding to the ISI if you have multiple media devices in
> > the system.
>
> media-ctl -p -d 1
> Media controller API version 6.12.41
>
> Media device information
> ------------------------
> driver mxc-isi
> model FSL Capture Media Device
> serial
> bus info platform:32e00000.isi
> hw revision 0x0
> driver version 6.12.41
>
> Device topology
> - entity 1: crossbar (5 pads, 4 links, 0 routes)
> type V4L2 subdev subtype Unknown flags 0
> device node name /dev/v4l-subdev0
> pad0: SINK,MUST_CONNECT
> [stream:0 fmt:UYVY8_1X16/1920x1080 field:none colorspace:srgb xfer:srgb ycbcr:601 quantization:lim-range]
> <- "csis-32e40000.csi":1 [ENABLED,IMMUTABLE]
> pad1: SINK,MUST_CONNECT
> [stream:0 fmt:UYVY8_1X16/1920x1080 field:none colorspace:srgb xfer:srgb ycbcr:601 quantization:lim-range]
There's an issue here. The MUST_CONNECT flag should have preventeed the
pipeline from starting when nothing is connected to the pad. I'll test
it locally.
> pad2: SINK,MUST_CONNECT
> <- "mxc_isi.output":0 [ENABLED,IMMUTABLE]
> pad3: SOURCE
> [stream:0 fmt:UYVY8_1X16/1920x1080 field:none colorspace:srgb xfer:srgb ycbcr:601 quantization:lim-range]
> -> "mxc_isi.0":0 [ENABLED,IMMUTABLE]
> pad4: SOURCE
> [stream:0 fmt:UYVY8_1X16/1920x1080 field:none colorspace:srgb xfer:srgb ycbcr:601 quantization:lim-range]
> -> "mxc_isi.1":0 [ENABLED,IMMUTABLE]
>
> - entity 7: mxc_isi.0 (2 pads, 2 links, 0 routes)
> type V4L2 subdev subtype Unknown flags 0
> device node name /dev/v4l-subdev1
> pad0: SINK
> [stream:0 fmt:UYVY8_1X16/1920x1080 field:none colorspace:jpeg xfer:srgb ycbcr:601 quantization:full-range
> compose.bounds:(0,0)/1920x1080
> compose:(0,0)/1920x1080]
> <- "crossbar":3 [ENABLED,IMMUTABLE]
> pad1: SOURCE
> [stream:0 fmt:YUV8_1X24/1920x1080 field:none colorspace:jpeg xfer:srgb ycbcr:601 quantization:full-range
> crop.bounds:(0,0)/1920x1080
> crop:(0,0)/1920x1080]
> -> "mxc_isi.0.capture":0 [ENABLED,IMMUTABLE]
>
> - entity 10: mxc_isi.0.capture (1 pad, 1 link)
> type Node subtype V4L flags 0
> device node name /dev/video1
> pad0: SINK
> <- "mxc_isi.0":1 [ENABLED,IMMUTABLE]
>
> - entity 18: mxc_isi.1 (2 pads, 2 links, 0 routes)
> type V4L2 subdev subtype Unknown flags 0
> device node name /dev/v4l-subdev2
> pad0: SINK
> [stream:0 fmt:UYVY8_1X16/1920x1080 field:none colorspace:jpeg xfer:srgb ycbcr:601 quantization:full-range
> compose.bounds:(0,0)/1920x1080
> compose:(0,0)/1920x1080]
> <- "crossbar":4 [ENABLED,IMMUTABLE]
> pad1: SOURCE
> [stream:0 fmt:YUV8_1X24/1920x1080 field:none colorspace:jpeg xfer:srgb ycbcr:601 quantization:full-range
> crop.bounds:(0,0)/1920x1080
> crop:(0,0)/1920x1080]
> -> "mxc_isi.1.capture":0 [ENABLED,IMMUTABLE]
>
> - entity 21: mxc_isi.1.capture (1 pad, 1 link)
> type Node subtype V4L flags 0
> device node name /dev/video2
> pad0: SINK
> <- "mxc_isi.1":1 [ENABLED,IMMUTABLE]
>
> - entity 29: mxc_isi.output (1 pad, 1 link)
> type Node subtype V4L flags 0
> pad0: SOURCE
> -> "crossbar":2 [ENABLED,IMMUTABLE]
>
> - entity 36: csis-32e40000.csi (2 pads, 2 links, 0 routes)
> type V4L2 subdev subtype Unknown flags 0
> device node name /dev/v4l-subdev3
> pad0: SINK,MUST_CONNECT
> [stream:0 fmt:UYVY8_1X16/640x480 field:none colorspace:smpte170m xfer:709 ycbcr:601 quantization:lim-range]
> <- "imx219 5-0010":0 []
> pad1: SOURCE,MUST_CONNECT
> [stream:0 fmt:UYVY8_1X16/640x480 field:none colorspace:smpte170m xfer:709 ycbcr:601 quantization:lim-range]
> -> "crossbar":0 [ENABLED,IMMUTABLE]
>
> - entity 41: imx219 5-0010 (1 pad, 1 link, 0 routes)
> type V4L2 subdev subtype Sensor flags 0
> device node name /dev/v4l-subdev4
> pad0: SOURCE
> [stream:0 fmt:SRGGB10_1X10/3280x2464 field:none colorspace:raw xfer:none ycbcr:601 quantization:full-range
> crop.bounds:(8,8)/3280x2464
> crop:(8,8)/3280x2464]
> -> "csis-32e40000.csi":0 []
>
> media0 seems to be dw100, 2 and 3 are hantro-vpu
--
Regards,
Laurent Pinchart
prev parent reply other threads:[~2025-08-13 11:57 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-08-13 11:11 Kernel Panic when trying to capture camera with ffmpeg on imx8mp Maud Spierings
2025-08-13 11:23 ` Fabio Estevam
2025-08-13 11:31 ` Maud Spierings
2025-08-13 11:35 ` Laurent Pinchart
2025-08-13 11:41 ` Maud Spierings
2025-08-13 11:41 ` Laurent Pinchart
2025-08-13 11:45 ` Maud Spierings
2025-08-13 11:57 ` Laurent Pinchart [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250813115726.GC20174@pendragon.ideasonboard.com \
--to=laurent.pinchart@ideasonboard.com \
--cc=festevam@gmail.com \
--cc=imx@lists.linux.dev \
--cc=kernel@pengutronix.de \
--cc=linux-media@vger.kernel.org \
--cc=maudspierings@gocontroll.com \
--cc=mchehab@kernel.org \
--cc=s.hauer@pengutronix.de \
--cc=shawnguo@kernel.org \
--cc=tharvey@gateworks.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).