From: Andrzej Hajda <a.hajda@samsung.com>
To: Marek Vasut <marex@denx.de>, dri-devel@lists.freedesktop.org
Cc: Jagan Teki <jagan@amarulasolutions.com>,
Laurent Pinchart <laurent.pinchart@ideasonboard.com>,
Linus Walleij <linus.walleij@linaro.org>,
Robert Foss <robert.foss@linaro.org>,
Sam Ravnborg <sam@ravnborg.org>
Subject: Re: [PATCH] drm/bridge: ti-sn65dsi83: Check link status register after enabling the bridge
Date: Tue, 7 Sep 2021 09:31:50 +0200 [thread overview]
Message-ID: <2f530ec2-3781-67eb-6f34-c7b6a29641ea@samsung.com> (raw)
In-Reply-To: <20210907023948.871281-1-marex@denx.de>
On 07.09.2021 04:39, Marek Vasut wrote:
> In rare cases, the bridge may not start up correctly, which usually
> leads to no display output. In case this happens, warn about it in
> the kernel log.
>
> Signed-off-by: Marek Vasut <marex@denx.de>
> Cc: Jagan Teki <jagan@amarulasolutions.com>
> Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> Cc: Linus Walleij <linus.walleij@linaro.org>
> Cc: Robert Foss <robert.foss@linaro.org>
> Cc: Sam Ravnborg <sam@ravnborg.org>
> Cc: dri-devel@lists.freedesktop.org
> ---
> NOTE: See the following:
> https://e2e.ti.com/support/interface-group/interface/f/interface-forum/942005/sn65dsi83-dsi83-lvds-bridge---sporadic-behavior---no-video
> https://community.nxp.com/t5/i-MX-Processors/i-MX8M-MIPI-DSI-Interface-LVDS-Bridge-Initialization/td-p/1156533
> ---
> drivers/gpu/drm/bridge/ti-sn65dsi83.c | 5 +++++
> 1 file changed, 5 insertions(+)
>
> diff --git a/drivers/gpu/drm/bridge/ti-sn65dsi83.c b/drivers/gpu/drm/bridge/ti-sn65dsi83.c
> index a32f70bc68ea4..4ea71d7f0bfbc 100644
> --- a/drivers/gpu/drm/bridge/ti-sn65dsi83.c
> +++ b/drivers/gpu/drm/bridge/ti-sn65dsi83.c
> @@ -520,6 +520,11 @@ static void sn65dsi83_atomic_enable(struct drm_bridge *bridge,
> /* Clear all errors that got asserted during initialization. */
> regmap_read(ctx->regmap, REG_IRQ_STAT, &pval);
> regmap_write(ctx->regmap, REG_IRQ_STAT, pval);
It does not look as correct error handling, maybe it would be good to
analyze and optionally report 'unexpected' errors here as well.
> +
> + usleep_range(10000, 12000);
> + regmap_read(ctx->regmap, REG_IRQ_STAT, &pval);
> + if (pval)
> + dev_err(ctx->dev, "Unexpected link status 0x%02x\n", pval);
I am not sure what is the case here but it looks like 'we do not know
what is going on, so let's add some diagnostic messages to gather info
and figure it out later'.
Whole driver lacks IRQ handler which IMO could perform better diagnosis,
and I guess it could also help in recovery, but this is just my guess.
So if this patch is enough for now you can add:
Reviewed-by: Andrzej Hajda <a.hajda@samsung.com>
Regards
Andrzej
> }
>
> static void sn65dsi83_atomic_disable(struct drm_bridge *bridge,
>
next prev parent reply other threads:[~2021-09-07 7:31 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-09-07 2:39 [PATCH] drm/bridge: ti-sn65dsi83: Check link status register after enabling the bridge Marek Vasut
[not found] ` <CGME20210907073151eucas1p196543fbd114f34f6de700013fd0e4168@eucas1p1.samsung.com>
2021-09-07 7:31 ` Andrzej Hajda [this message]
2021-09-07 14:25 ` Marek Vasut
2021-09-07 17:29 ` Andrzej Hajda
2021-09-07 21:24 ` Marek Vasut
2021-09-08 11:11 ` Dave Stevenson
2021-09-08 15:26 ` Marek Vasut
2021-09-08 16:13 ` Dave Stevenson
2021-09-08 21:14 ` Andrzej Hajda
2021-10-05 10:25 ` Dave Stevenson
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=2f530ec2-3781-67eb-6f34-c7b6a29641ea@samsung.com \
--to=a.hajda@samsung.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=jagan@amarulasolutions.com \
--cc=laurent.pinchart@ideasonboard.com \
--cc=linus.walleij@linaro.org \
--cc=marex@denx.de \
--cc=robert.foss@linaro.org \
--cc=sam@ravnborg.org \
/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;
as well as URLs for NNTP newsgroup(s).