From: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
To: Rishikesh Donadkar <r-donadkar@ti.com>,
jai.luthra@linux.dev, laurent.pinchart@ideasonboard.com,
mripard@kernel.org
Cc: y-abhilashchandra@ti.com, devarsht@ti.com, s-jain1@ti.com,
vigneshr@ti.com, mchehab@kernel.org, robh@kernel.org,
krzk+dt@kernel.org, p.zabel@pengutronix.de, conor+dt@kernel.org,
sakari.ailus@linux.intel.com, hverkuil-cisco@xs4all.nl,
jai.luthra@ideasonboard.com, changhuang.liang@starfivetech.com,
jack.zhu@starfivetech.com, sjoerd@collabora.com,
hverkuil+cisco@kernel.org, linux-kernel@vger.kernel.org,
linux-media@vger.kernel.org, devicetree@vger.kernel.org
Subject: Re: [PATCH v7 00/16] media: cadence,ti: CSI2RX Multistream Support
Date: Wed, 24 Sep 2025 12:33:53 +0300 [thread overview]
Message-ID: <05bdc515-004e-4a45-bc5c-523be1c0fe3e@ideasonboard.com> (raw)
In-Reply-To: <20250911102832.1583440-1-r-donadkar@ti.com>
Hi,
On 11/09/2025 13:28, Rishikesh Donadkar wrote:
> This series adds multi-stream support and PM support for Cadence CSI2RX
> and TI CSI2RX SHIM drivers.
>
> PM patches are picked from:
> https://lore.kernel.org/all/20250902-ti_csi_pm-v2-0-59a3be199940@ideasonboard.com/
>
> PATCH 01 : Remove word size alignment restriction on frame width
> PATCH 02-07: Support multiple DMA contexts/video nodes in TI CSI2RX
> PATCH 08-09: Use get_frame_desc to propagate virtual channel
> information across Cadence and TI CSI-RX subdevs
> PATCH 10-11: Use new multi-stream APIs across the drivers to support
> multiplexed cameras from sources like UB960 (FPDLink)
> PATCH 12: Optimize stream on by submitting all queued buffers to DMA
> PATCH 13: Change the drain architecture to support multi-stream and
> implement completion barriers for last drain.
> PATCH 14-16: Runtime PM and System PM support for CSI-RX.
>
> Testing for this series has been done on top of media tree with 4x IMX219
> camera modules connected to TI's AM62A using V3 Link fusion mini board.
>
> Overlay and defconfig changes for the same can be found below:
> https://github.com/RISHI27-dot/linux/commits/u/multistream_v7/
I made a quick test with this branch, am62a-sk with fpdlink, but:
[ 214.387480] ======================================================
[ 214.393648] WARNING: possible circular locking dependency detected
[ 214.399817] 6.17.0-rc1+ #1 Not tainted
[ 214.403557] ------------------------------------------------------
[ 214.409723] python3/408 is trying to acquire lock:
[ 214.414506] ffff0008079e00f8 (&csi->mutex){+.+.}-{4:4}, at:
ti_csi2rx_sd_enable_streams+0x80/0xc0 [j721e_csi2rx]
[ 214.424701]
[ 214.424701] but task is already holding lock:
[ 214.430520] ffff000803de5568
(j721e_csi2rx:1471:sd->active_state->lock){+.+.}-{4:4}, at:
v4l2_subdev_enable_streams+0xc0/0x
3a0 [videodev]
[ 214.442977]
[ 214.442977] which lock already depends on the new lock.
[ 214.442977]
[ 214.451135]
[ 214.451135] the existing dependency chain (in reverse order) is:
[ 214.458601]
[ 214.458601] -> #1 (j721e_csi2rx:1471:sd->active_state->lock){+.+.}-{4:4}:
[ 214.466864] __mutex_lock+0xc8/0x8a8
[ 214.470959] mutex_lock_nested+0x2c/0x40
[ 214.475395] ti_csi2rx_get_route+0x50/0xe8 [j721e_csi2rx]
[ 214.481312] ti_csi2rx_get_vc.isra.0+0xe4/0x1b8 [j721e_csi2rx]
[ 214.487661] ti_csi2rx_start_streaming+0xe8/0x250 [j721e_csi2rx]
[ 214.494182] vb2_start_streaming+0x74/0x190 [videobuf2_common]
[ 214.500552] vb2_core_streamon+0x108/0x1d8 [videobuf2_common]
[ 214.506829] vb2_ioctl_streamon+0x54/0xa0 [videobuf2_v4l2]
[ 214.512842] v4l_streamon+0x2c/0x40 [videodev]
[ 214.517890] __video_do_ioctl+0x2e0/0x3d8 [videodev]
[ 214.523447] video_usercopy+0x310/0x870 [videodev]
[ 214.528831] video_ioctl2+0x20/0x38 [videodev]
[ 214.533869] v4l2_ioctl+0x48/0x70 [videodev]
[ 214.538730] __arm64_sys_ioctl+0xb4/0x118
[ 214.543259] invoke_syscall+0x50/0x120
[ 214.547524] el0_svc_common.constprop.0+0x48/0xf0
[ 214.552740] do_el0_svc+0x24/0x38
[ 214.556570] el0_svc+0x4c/0x178
[ 214.560229] el0t_64_sync_handler+0xa0/0xe8
[ 214.564926] el0t_64_sync+0x1a4/0x1a8
[ 214.569104]
[ 214.569104] -> #0 (&csi->mutex){+.+.}-{4:4}:
[ 214.574855] __lock_acquire+0x136c/0x1f78
[ 214.579381] lock_acquire+0x250/0x350
[ 214.583557] __mutex_lock+0xc8/0x8a8
[ 214.587647] mutex_lock_nested+0x2c/0x40
[ 214.592082] ti_csi2rx_sd_enable_streams+0x80/0xc0 [j721e_csi2rx]
[ 214.598694] v4l2_subdev_enable_streams+0x208/0x3a0 [videodev]
[ 214.605128] ti_csi2rx_start_streaming+0x158/0x250 [j721e_csi2rx]
[ 214.611738] vb2_start_streaming+0x74/0x190 [videobuf2_common]
[ 214.618107] vb2_core_streamon+0x108/0x1d8 [videobuf2_common]
[ 214.624383] vb2_ioctl_streamon+0x54/0xa0 [videobuf2_v4l2]
[ 214.630395] v4l_streamon+0x2c/0x40 [videodev]
[ 214.635436] __video_do_ioctl+0x2e0/0x3d8 [videodev]
[ 214.640994] video_usercopy+0x310/0x870 [videodev]
[ 214.646379] video_ioctl2+0x20/0x38 [videodev]
[ 214.651415] v4l2_ioctl+0x48/0x70 [videodev]
[ 214.656280] __arm64_sys_ioctl+0xb4/0x118
[ 214.660807] invoke_syscall+0x50/0x120
[ 214.665071] el0_svc_common.constprop.0+0x48/0xf0
[ 214.670288] do_el0_svc+0x24/0x38
[ 214.674117] el0_svc+0x4c/0x178
[ 214.677775] el0t_64_sync_handler+0xa0/0xe8
[ 214.682472] el0t_64_sync+0x1a4/0x1a8
[ 214.686649]
[ 214.686649] other info that might help us debug this:
[ 214.686649]
[ 214.694637] Possible unsafe locking scenario:
[ 214.694637]
[ 214.700543] CPU0 CPU1
[ 214.705061] ---- ----
[ 214.709579] lock(j721e_csi2rx:1471:sd->active_state->lock);
[ 214.715320] lock(&csi->mutex);
[ 214.721060]
lock(j721e_csi2rx:1471:sd->active_state->lock);
[ 214.729314] lock(&csi->mutex);
[ 214.732540]
[ 214.732540] *** DEADLOCK ***
[ 214.732540]
[ 214.738447] 2 locks held by python3/408:
[ 214.742361] #0: ffff0008079e18f0 (&ctx->mutex){+.+.}-{4:4}, at:
__video_do_ioctl+0xe8/0x3d8 [videodev]
[ 214.751844] #1: ffff000803de5568
(j721e_csi2rx:1471:sd->active_state->lock){+.+.}-{4:4}, at:
v4l2_subdev_enable_streams+0x
c0/0x3a0 [videodev]
[ 214.764705]
[ 214.764705] stack backtrace:
[ 214.769054] CPU: 2 UID: 0 PID: 408 Comm: python3 Not tainted
6.17.0-rc1+ #1 PREEMPT
[ 214.769064] Hardware name: Texas Instruments AM62A7 SK (DT)
[ 214.769068] Call trace:
[ 214.769073] show_stack+0x20/0x38 (C)
[ 214.769084] dump_stack_lvl+0x8c/0xd0
[ 214.769094] dump_stack+0x18/0x28
[ 214.769102] print_circular_bug+0x28c/0x370
[ 214.769110] check_noncircular+0x170/0x188
[ 214.769117] __lock_acquire+0x136c/0x1f78
[ 214.769125] lock_acquire+0x250/0x350
[ 214.769133] __mutex_lock+0xc8/0x8a8
[ 214.769141] mutex_lock_nested+0x2c/0x40
[ 214.769148] ti_csi2rx_sd_enable_streams+0x80/0xc0 [j721e_csi2rx]
[ 214.769164] v4l2_subdev_enable_streams+0x208/0x3a0 [videodev]
[ 214.769255] ti_csi2rx_start_streaming+0x158/0x250 [j721e_csi2rx]
[ 214.769268] vb2_start_streaming+0x74/0x190 [videobuf2_common]
[ 214.769298] vb2_core_streamon+0x108/0x1d8 [videobuf2_common]
[ 214.769326] vb2_ioctl_streamon+0x54/0xa0 [videobuf2_v4l2]
[ 214.769348] v4l_streamon+0x2c/0x40 [videodev]
[ 214.769438] __video_do_ioctl+0x2e0/0x3d8 [videodev]
[ 214.769528] video_usercopy+0x310/0x870 [videodev]
[ 214.769617] video_ioctl2+0x20/0x38 [videodev]
[ 214.769704] v4l2_ioctl+0x48/0x70 [videodev]
[ 214.769793] __arm64_sys_ioctl+0xb4/0x118
[ 214.769804] invoke_syscall+0x50/0x120
[ 214.769812] el0_svc_common.constprop.0+0x48/0xf0
[ 214.769819] do_el0_svc+0x24/0x38
[ 214.769826] el0_svc+0x4c/0x178
[ 214.769835] el0t_64_sync_handler+0xa0/0xe8
[ 214.769844] el0t_64_sync+0x1a4/0x1a8
Tomi
prev parent reply other threads:[~2025-09-24 9:33 UTC|newest]
Thread overview: 37+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-11 10:28 [PATCH v7 00/16] media: cadence,ti: CSI2RX Multistream Support Rishikesh Donadkar
2025-09-11 10:28 ` [PATCH v7 01/16] media: ti: j721e-csi2rx: Remove word size alignment on frame width Rishikesh Donadkar
2025-09-22 11:56 ` Tomi Valkeinen
2025-10-17 4:53 ` Donadkar, Rishikesh
2025-09-11 10:28 ` [PATCH v7 02/16] dt-bindings: media: ti,j721e-csi2rx-shim: Support 32 dma chans Rishikesh Donadkar
2025-09-11 10:28 ` [PATCH v7 03/16] media: ti: j721e-csi2rx: separate out device and context Rishikesh Donadkar
2025-09-22 12:03 ` Tomi Valkeinen
2025-09-11 10:28 ` [PATCH v7 04/16] media: ti: j721e-csi2rx: prepare SHIM code for multiple contexts Rishikesh Donadkar
2025-09-22 12:03 ` Tomi Valkeinen
2025-09-11 10:28 ` [PATCH v7 05/16] media: ti: j721e-csi2rx: allocate DMA channel based on context index Rishikesh Donadkar
2025-09-22 12:04 ` Tomi Valkeinen
2025-09-11 10:28 ` [PATCH v7 06/16] media: ti: j721e-csi2rx: add a subdev for the core device Rishikesh Donadkar
2025-09-22 12:38 ` Tomi Valkeinen
2025-11-06 9:53 ` Rishikesh Donadkar
2025-09-11 10:28 ` [PATCH v7 07/16] media: ti: j721e-csi2rx: get number of contexts from device tree Rishikesh Donadkar
2025-09-22 12:39 ` Tomi Valkeinen
2025-09-11 10:28 ` [PATCH v7 08/16] media: cadence: csi2rx: add get_frame_desc wrapper Rishikesh Donadkar
2025-09-22 12:49 ` Tomi Valkeinen
2025-09-11 10:28 ` [PATCH v7 09/16] media: ti: j721e-csi2rx: add support for processing virtual channels Rishikesh Donadkar
2025-09-22 13:30 ` Tomi Valkeinen
2025-11-06 10:35 ` Rishikesh Donadkar
2025-09-11 10:28 ` [PATCH v7 10/16] media: cadence: csi2rx: add multistream support Rishikesh Donadkar
2025-09-22 14:39 ` Tomi Valkeinen
2025-09-25 12:44 ` Tomi Valkeinen
2025-11-10 12:23 ` Rishikesh Donadkar
2025-11-11 9:46 ` Rishikesh Donadkar
2025-09-11 10:28 ` [PATCH v7 11/16] media: ti: j721e-csi2rx: " Rishikesh Donadkar
2025-09-25 12:17 ` Tomi Valkeinen
2025-10-07 11:52 ` Jai Luthra
2025-11-11 12:19 ` Rishikesh Donadkar
2025-09-11 10:28 ` [PATCH v7 12/16] media: ti: j721e-csi2rx: Submit all available buffers Rishikesh Donadkar
2025-09-11 10:28 ` [PATCH v7 13/16] media: ti: j721e-csi2rx: Change the drain architecture for multistream Rishikesh Donadkar
2025-09-11 10:28 ` [PATCH v7 14/16] media: cadence: csi2rx: Support runtime PM Rishikesh Donadkar
2025-09-11 10:28 ` [PATCH v7 15/16] media: ti: j721e-csi2rx: Support runtime suspend Rishikesh Donadkar
2025-09-11 10:28 ` [PATCH v7 16/16] media: ti: j721e-csi2rx: Support system suspend using pm_notifier Rishikesh Donadkar
2025-09-12 9:45 ` [PATCH v7 00/16] media: cadence,ti: CSI2RX Multistream Support Jai Luthra
2025-09-24 9:33 ` Tomi Valkeinen [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=05bdc515-004e-4a45-bc5c-523be1c0fe3e@ideasonboard.com \
--to=tomi.valkeinen@ideasonboard.com \
--cc=changhuang.liang@starfivetech.com \
--cc=conor+dt@kernel.org \
--cc=devarsht@ti.com \
--cc=devicetree@vger.kernel.org \
--cc=hverkuil+cisco@kernel.org \
--cc=hverkuil-cisco@xs4all.nl \
--cc=jack.zhu@starfivetech.com \
--cc=jai.luthra@ideasonboard.com \
--cc=jai.luthra@linux.dev \
--cc=krzk+dt@kernel.org \
--cc=laurent.pinchart@ideasonboard.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=mchehab@kernel.org \
--cc=mripard@kernel.org \
--cc=p.zabel@pengutronix.de \
--cc=r-donadkar@ti.com \
--cc=robh@kernel.org \
--cc=s-jain1@ti.com \
--cc=sakari.ailus@linux.intel.com \
--cc=sjoerd@collabora.com \
--cc=vigneshr@ti.com \
--cc=y-abhilashchandra@ti.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