From: Esben Haabendal <esben@geanix.com>
To: "Herve Codina" <herve.codina@bootlin.com>
Cc: "Luca Ceresoli" <luca.ceresoli@bootlin.com>,
"Andrzej Hajda" <andrzej.hajda@intel.com>,
"Neil Armstrong" <neil.armstrong@linaro.org>,
"Robert Foss" <rfoss@kernel.org>,
"Laurent Pinchart" <Laurent.pinchart@ideasonboard.com>,
"Jonas Karlman" <jonas@kwiboo.se>,
"Jernej Skrabec" <jernej.skrabec@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>,
"Linus Walleij" <linusw@kernel.org>,
"Frieder Schrempf" <frieder.schrempf@kontron.de>,
"Marek Vasut" <marex@denx.de>, <dri-devel@lists.freedesktop.org>,
<linux-kernel@vger.kernel.org>, <stable@vger.kernel.org>
Subject: Re: [PATCH v4 1/3] drm/bridge: ti-sn65dsi83: Fix error handling in sn65dsi83_reset_work()
Date: Tue, 25 Aug 2026 11:01:39 +0200 [thread overview]
Message-ID: <87o6eqo9os.fsf@geanix.com> (raw)
In-Reply-To: <20260819113253.5d602b2d@bootlin.com> (Herve Codina's message of "Wed, 19 Aug 2026 11:32:53 +0200")
"Herve Codina" <herve.codina@bootlin.com> writes:
> Hi Esben,
>
> On Mon, 10 Aug 2026 09:19:40 +0200
> Esben Haabendal <esben@geanix.com> wrote:
>
>> The error handling of sn65dsi83_reset_pipe() failure in
>> sn65dsi83_reset_work() has been a bit strange all the time, missing both
>> enable_irq() and drm_bridge_exit() in case of failure. But since
>> sn65dsi83_reset_pipe() have never been failing (always returning 0), it has
>> not caused any problems.
>>
>> As we are going to change sn65dsi83_reset_pipe() to return error values in
>> case of failure, we need to fix this.
>>
>> Fixes: ad5c6ecef27e ("drm: bridge: ti-sn65dsi83: Add error recovery mechanism")
>> Cc: stable@vger.kernel.org
>> Signed-off-by: Esben Haabendal <esben@geanix.com>
>> ---
>> drivers/gpu/drm/bridge/ti-sn65dsi83.c | 5 ++---
>> 1 file changed, 2 insertions(+), 3 deletions(-)
>>
>> diff --git a/drivers/gpu/drm/bridge/ti-sn65dsi83.c b/drivers/gpu/drm/bridge/ti-sn65dsi83.c
>> index 42b451432bbb..0ccfff401b2a 100644
>> --- a/drivers/gpu/drm/bridge/ti-sn65dsi83.c
>> +++ b/drivers/gpu/drm/bridge/ti-sn65dsi83.c
>> @@ -417,10 +417,9 @@ static void sn65dsi83_reset_work(struct work_struct *ws)
>>
>> /* Reset the pipe */
>> ret = sn65dsi83_reset_pipe(ctx);
>> - if (ret) {
>> + if (ret)
>> dev_err(ctx->dev, "reset pipe failed %pe\n", ERR_PTR(ret));
>> - return;
>> - }
>> +
>> if (ctx->irq)
>> enable_irq(ctx->irq);
>>
>>
>
> In this v4, enable_irq() is called even if we cannot reset the pipe. I know that
> sn65dsi83_reset_pipe() always returns 0 (and this will be change) but we have to
> take care here.
>
> If the pipe cannot be reset, the sn65dsi83 component could be in a state where
> it can force the interrupt line. This was the reason the irq is disabled
> https://elixir.bootlin.com/linux/v7.2/source/drivers/gpu/drm/bridge/ti-sn65dsi83.c#L455
Ok. But maybe take it in two steps.
The change here, together with the change that makes
sn65dsi83_reset_pipe() return non-zero on error, should ensure that
behavior is unchanged. As long as sn65dsi83_reset_pipe() was always
returning 0, we have been calling enable_irq() even if the pipe cannot
be reset.
If that is a problem, I think it is fair to do that as a separate
change. As you say, we have to take care here.
If we leave the irq disabled when sn65dsi83_reset_pipe() fails, do we
simply want to leave the device with irq permanently disabled, or should
we add some additional logic to sn65dsi83_handle_errors() so that we
will try to recover periodically via sn65dsi83_monitor_work()?
I think this is tricky enough to warrant a new patch series.
/Esben
next prev parent reply other threads:[~2026-08-25 9:01 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-10 7:19 [PATCH v4 0/3] drm/bridge: ti-sn65dsi83: Various fixes Esben Haabendal
2026-08-10 7:19 ` [PATCH v4 1/3] drm/bridge: ti-sn65dsi83: Fix error handling in sn65dsi83_reset_work() Esben Haabendal
2026-08-19 9:32 ` Herve Codina
2026-08-25 9:01 ` Esben Haabendal [this message]
2026-08-10 7:19 ` [PATCH v4 2/3] drm/bridge: ti-sn65dsi83: Propagate error in sn65dsi83_reset_pipe() Esben Haabendal
2026-08-19 9:36 ` Herve Codina
2026-08-19 11:51 ` Markus Elfring
2026-08-25 8:47 ` Esben Haabendal
2026-08-10 7:19 ` [PATCH v4 3/3] drm/bridge: ti-sn65dsi83: Support LVDS Channel B on SN65DSI84 Esben Haabendal
2026-08-19 11:57 ` Markus Elfring
2026-08-25 8:43 ` Esben Haabendal
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=87o6eqo9os.fsf@geanix.com \
--to=esben@geanix.com \
--cc=Laurent.pinchart@ideasonboard.com \
--cc=airlied@gmail.com \
--cc=andrzej.hajda@intel.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=frieder.schrempf@kontron.de \
--cc=herve.codina@bootlin.com \
--cc=jernej.skrabec@gmail.com \
--cc=jonas@kwiboo.se \
--cc=linusw@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=luca.ceresoli@bootlin.com \
--cc=maarten.lankhorst@linux.intel.com \
--cc=marex@denx.de \
--cc=mripard@kernel.org \
--cc=neil.armstrong@linaro.org \
--cc=rfoss@kernel.org \
--cc=simona@ffwll.ch \
--cc=stable@vger.kernel.org \
--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