All of lore.kernel.org
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Hikmah Gumelar" <hikmahgumelar@gmail.com>
Cc: devicetree@vger.kernel.org, linux-clk@vger.kernel.org,
	robh@kernel.org, conor+dt@kernel.org, media-ci@linuxtv.org
Subject: Re: [PATCH v5 7/7] arm64: dts: qcom: msm8953-xiaomi-tissot: enable front and rear cameras
Date: Fri, 27 Nov 2026 13:58:47 +0000	[thread overview]
Message-ID: <sashiko-outbox-237526@kernel.org> (raw)
In-Reply-To: <20261127134507.125513-8-hikmahgumelar@gmail.com>

Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [High] media: i2c: ov12a10: self-deadlock on ov12a10->mutex in
  ov12a10_set_format()
--

commit 180043166dff2dc952f91efcd5a2089fead156a3
Author: Hikmah Gumelar <hikmahgumelar@gmail.com>

arm64: dts: qcom: msm8953-xiaomi-tissot: enable front and rear cameras

This commit enables the CAMSS, CCI, and CSIPHY0/CSIPHY2 nodes along with
the OmniVision OV12A10 rear and Samsung S5K5E8 front camera sensors on the
Xiaomi Mi A1 device tree.

> diff --git a/arch/arm64/boot/dts/qcom/msm8953-xiaomi-tissot.dts b/arch/arm64/boot/dts/qcom/msm8953-xiaomi-tissot.dts
> index fccb9c4360cae..d8db3567fd36f 100644
> --- a/arch/arm64/boot/dts/qcom/msm8953-xiaomi-tissot.dts
> +++ b/arch/arm64/boot/dts/qcom/msm8953-xiaomi-tissot.dts
> @@ -74,6 +74,108 @@ vph_pwr: vph-pwr-regulator {

[ ... ]

> +&cci_i2c0 {
> +	camera@10 {
> +		compatible = "ovti,ov12a10";
> +		reg = <0x10>;

[Severity: High]
Does enabling camera@10 expose a self-deadlock on ov12a10->mutex in
ov12a10_set_format() from commit "media: i2c: add ov12a10 image sensor
driver" earlier in this series?

In that driver, ov12a10_probe() sets ov12a10->sd.state_lock =
&ov12a10->mutex before calling v4l2_subdev_init_finalize(), so the V4L2
subdev core acquires ov12a10->mutex via v4l2_subdev_lock_state() before
calling the .set_fmt pad operation.  ov12a10_set_format() then locks
ov12a10->mutex again:

drivers/media/i2c/ov12a10.c:ov12a10_set_format() {
	struct ov12a10 *ov12a10 = to_ov12a10(sd);

	mutex_lock(&ov12a10->mutex);
	if (fmt->which == V4L2_SUBDEV_FORMAT_ACTIVE && ov12a10->streaming) {
		mutex_unlock(&ov12a10->mutex);
		return -EBUSY;
	}
    ...
}

Any VIDIOC_SUBDEV_S_FMT ioctl on the rear camera subdev will deadlock
immediately on ov12a10->mutex.  Dropping the manual mutex_lock() and
mutex_unlock() calls from ov12a10_set_format() avoids this because the
subdev state lock is already held by the caller.

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261127134507.125513-1-hikmahgumelar@gmail.com?part=7

  reply	other threads:[~2026-11-27 13:58 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <__OIHsqpwOqb8kxVYcd2PoPvNYDhN8XO6vyXiYMCCK6o3sfyJ1gl1GNdhcGYhdfBf43tQmn6Dt6cWXcSD1uiPA==@protonmail.internalid>
2026-11-27 13:45 ` [PATCH v5 0/7] Enable front and rear cameras on Xiaomi Mi A1 (tissot) Hikmah Gumelar
2026-11-27 13:45   ` [PATCH v5 1/7] clk: qcom: gcc-msm8953: fix csi_phytimer_clk_src 100MHz parent Hikmah Gumelar
2026-11-27 16:11     ` Bryan O'Donoghue
2026-11-27 16:57       ` Hikmah Gumelar
2026-11-27 13:45   ` [PATCH v5 2/7] media: dt-bindings: media: i2c: add Samsung S5K5E8 Hikmah Gumelar
2026-12-01  5:47     ` Krzysztof Kozlowski
2026-11-27 13:45   ` [PATCH v5 3/7] media: i2c: add s5k5e8 image sensor driver Hikmah Gumelar
2026-11-27 14:01     ` sashiko-bot
2026-11-27 17:13     ` Vladimir Zapolskiy
2026-11-27 18:03     ` Sakari Ailus
2026-11-27 18:47       ` Hikmah Gumelar
2026-11-28 19:38         ` Hikmah Gumelar
2026-11-27 13:45   ` [PATCH v5 4/7] media: dt-bindings: media: i2c: add OmniVision OV12A10 Hikmah Gumelar
2026-11-27 13:45   ` [PATCH v5 5/7] media: i2c: add ov12a10 image sensor driver Hikmah Gumelar
2026-11-27 13:59     ` sashiko-bot
2026-11-27 17:12     ` Vladimir Zapolskiy
2026-11-27 13:45   ` [PATCH v5 6/7] arm64: dts: qcom: msm8953: add CAMSS node and MCLK pinctrl states Hikmah Gumelar
2026-11-27 13:45   ` [PATCH v5 7/7] arm64: dts: qcom: msm8953-xiaomi-tissot: enable front and rear cameras Hikmah Gumelar
2026-11-27 13:58     ` sashiko-bot [this message]
2026-11-27 16:14   ` [PATCH v5 0/7] Enable front and rear cameras on Xiaomi Mi A1 (tissot) Bryan O'Donoghue
2026-11-27 16:32     ` Hikmah Gumelar
2026-11-28 10:35       ` Bryan O'Donoghue
2026-12-01  5:43   ` Krzysztof Kozlowski

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=sashiko-outbox-237526@kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=hikmahgumelar@gmail.com \
    --cc=linux-clk@vger.kernel.org \
    --cc=media-ci@linuxtv.org \
    --cc=robh@kernel.org \
    --cc=sashiko-reviews@lists.linux.dev \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.