From: sashiko-bot@kernel.org
To: "Konrad Dybcio" <konradybcio@kernel.org>
Cc: robh@kernel.org, conor+dt@kernel.org,
linux-input@vger.kernel.org, devicetree@vger.kernel.org,
dmitry.torokhov@gmail.com
Subject: Re: [PATCH 2/3] Input: synaptics-rmi4: Support drm_panel_follower
Date: Fri, 11 Sep 2026 13:32:33 +0000 [thread overview]
Message-ID: <20260911133234.736A21F000FF@smtp.kernel.org> (raw)
In-Reply-To: <20260911-topic-rmi4_panel_follower-v1-2-c1b2cf1cdb62@oss.qualcomm.com>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [High] Concurrent I2C accesses can wedge the hardware during panel power-on because `page_mutex` is not held during the startup delay.
--
commit 31e9aa4b11936c658845014c2ef2567c8d7947f3
Author: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
Input: synaptics-rmi4: Support drm_panel_follower
Many RMI4 implementations are present on in-cell panels with very tight power
sequencing requirements, normally handled by the DRM panel driver in Linux.
This commit adds support for drm_panel_follower to handle that dependency.
> diff --git a/drivers/input/rmi4/rmi_i2c.c b/drivers/input/rmi4/rmi_i2c.c
> index e11d0acb9b96d..84877030aefe9 100644
> --- a/drivers/input/rmi4/rmi_i2c.c
> +++ b/drivers/input/rmi4/rmi_i2c.c
[ ... ]
> @@ -187,17 +191,99 @@ static void rmi_i2c_regulator_bulk_disable(void *data)
[ ... ]
> +static int rmi_i2c_panel_prepared(struct drm_panel_follower *follower)
> +{
> + struct rmi_i2c_xport *rmi_i2c = container_of(follower,
> + struct rmi_i2c_xport,
> + panel_follower);
> + int error;
> +
> + error = regulator_bulk_enable(ARRAY_SIZE(rmi_i2c->supplies),
> + rmi_i2c->supplies);
> + if (error)
> + return error;
> + rmi_i2c->powered = true;
> +
> + msleep(rmi_i2c->startup_delay);
> +
> + /* The page-select register is reset when the sensor loses power. */
> + mutex_lock(&rmi_i2c->page_mutex);
[Severity: High]
Can concurrent I2C accesses wedge the hardware during panel power-on because
page_mutex is not held during this startup delay?
The drm_panel_follower subsystem calls rmi_i2c_panel_prepared()
asynchronously when the display panel turns on. Since userspace is not
frozen during this event, a process reading a world-readable RMI sysfs
attribute (such as update_status, which calls
rmi_f34v7_check_command_status() then rmi_read_block()) or interacting
with /dev/rmi0 can invoke rmi_i2c_read_block().
Because rmi_i2c->powered is set to true before the msleep(), and page_mutex
is not held during the delay, a concurrent rmi_i2c_read_block() can acquire
page_mutex and issue an i2c_transfer() to the sensor while it is still in
the middle of its hardware boot sequence.
Does this early I2C access violate the strict timing requirements and leave
the touchscreen completely unresponsive until a reboot or driver reload?
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260911-topic-rmi4_panel_follower-v1-0-c1b2cf1cdb62@oss.qualcomm.com?part=2
next prev parent reply other threads:[~2026-09-11 13:32 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-11 13:18 [PATCH 0/3] drm_panel_follower support for RMI4 Konrad Dybcio
2026-09-11 13:18 ` [PATCH 1/3] dt-bindings: input: syna,rmi4: Allow 'panel' property Konrad Dybcio
2026-09-11 13:18 ` [PATCH 2/3] Input: synaptics-rmi4: Support drm_panel_follower Konrad Dybcio
2026-09-11 13:32 ` sashiko-bot [this message]
2026-09-11 13:18 ` [PATCH 3/3] arm64: dts: qcom: sdm845-tama: Declare touchscreen as a panel follower Konrad Dybcio
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=20260911133234.736A21F000FF@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=dmitry.torokhov@gmail.com \
--cc=konradybcio@kernel.org \
--cc=linux-input@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox