From: Johan Hovold <johan@kernel.org>
To: Doug Anderson <dianders@chromium.org>
Cc: Neil Armstrong <neil.armstrong@linaro.org>,
Jessica Zhang <jesszhan0024@gmail.com>,
Maarten Lankhorst <maarten.lankhorst@linux.intel.com>,
Maxime Ripard <mripard@kernel.org>,
Thomas Zimmermann <tzimmermann@suse.de>,
David Airlie <airlied@gmail.com>, Simona Vetter <simona@ffwll.ch>,
dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] drm/panel-edp: take i2c adapter module reference
Date: Fri, 17 Jul 2026 16:29:39 +0200 [thread overview]
Message-ID: <alo8U-klzuNmEP8e@hovoldconsulting.com> (raw)
In-Reply-To: <CAD=FV=VZPhzHU+Pet2m3L+Pqc7mOPfZC-f5p0OuNL79wNZPxRg@mail.gmail.com>
Hi Doug,
On Thu, Jul 16, 2026 at 10:27:02AM -0700, Doug Anderson wrote:
> On Thu, Jul 16, 2026 at 6:22 AM Johan Hovold <johan@kernel.org> wrote:
> >
> > The i2c subsystem currently blocks during adapter deregistration
> > whenever there are consumers holding a reference.
> >
> > Switch to using of_get_i2c_adapter_by_node() which also takes a
> > reference to the adapter module so that an attempt to unload the module
> > while in use fails gracefully instead of blocking uninterruptibly.
> >
> > Signed-off-by: Johan Hovold <johan@kernel.org>
> > ---
> > drivers/gpu/drm/panel/panel-edp.c | 6 +++---
> > 1 file changed, 3 insertions(+), 3 deletions(-)
>
> Reviewed-by: Douglas Anderson <dianders@chromium.org>
>
> Worth adding any "Fixes:" tag? I guess this has been using
> of_find_i2c_adapter_by_node() for a long time...
Yeah, this comes from panel-simple which has had this issue since it was
merged in 2013. And that's a couple of years before the helper taking a
module reference even existed.
I decided not to treat these as individual driver bugs, but perhaps the
instances added after the helper was merged could have had a Fixes tag.
> Sashiko-bot review [1] seems right, even though it's pointing out
> something that isn't really a new problem and is very much a corner
> case where someone is crafting an intentionally ridiculous device
> tree. If you agree, I wouldn't mind a followup patch fixing that, too.
> ;-)
>
> [1] https://lore.kernel.org/r/20260716133420.187131F000E9@smtp.kernel.org/
Right, I saw that one too but wrote it off as a preexisting issue.
I'll send a v2 of this one rebased on a fix for that instead.
Johan
prev parent reply other threads:[~2026-07-17 14:29 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-16 13:22 Johan Hovold
2026-07-16 17:27 ` Doug Anderson
2026-07-17 14:29 ` Johan Hovold [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=alo8U-klzuNmEP8e@hovoldconsulting.com \
--to=johan@kernel.org \
--cc=airlied@gmail.com \
--cc=dianders@chromium.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=jesszhan0024@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=maarten.lankhorst@linux.intel.com \
--cc=mripard@kernel.org \
--cc=neil.armstrong@linaro.org \
--cc=simona@ffwll.ch \
--cc=tzimmermann@suse.de \
/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