All of lore.kernel.org
 help / color / mirror / Atom feed
From: Marek Vasut <marex@denx.de>
To: Dave Stevenson <dave.stevenson@raspberrypi.com>
Cc: DRI Development <dri-devel@lists.freedesktop.org>,
	Sam Ravnborg <sam@ravnborg.org>,
	Laurent Pinchart <laurent.pinchart@ideasonboard.com>,
	Robert Foss <robert.foss@linaro.org>,
	Jagan Teki <jagan@amarulasolutions.com>
Subject: Re: [PATCH][RESEND] drm/bridge: ti-sn65dsi83: Check link status register after enabling the bridge
Date: Tue, 5 Apr 2022 16:48:17 +0200	[thread overview]
Message-ID: <941582a8-ca70-dd96-3097-570ae731eb73@denx.de> (raw)
In-Reply-To: <CAPY8ntDVaAoaCu19=2DxW97STQdaVMv1-DbuPuvQu50N6mY1mg@mail.gmail.com>

On 4/5/22 16:20, Dave Stevenson wrote:

Hi,

>>> If we can initialise the DSI host before the bridge for the
>>> pre_enable, then all the configuration moves to the atomic_pre_enable
>>> and there should be no need to have the delay.
>>>
>>> I can't 100% guarantee that, but one of the folks on the Pi forums is
>>> using [1] which does that, and is reporting it working well. (He's
>>> also using the DSI85 to take 2 DSI links and drive 2 LVDS single link
>>> panels)
>>
>> It seems to me that checking whether the bridge got correctly
>> initialized is orthogonal to the aforementioned patchset though ?
> 
> It's the delay that is ugly.

You do need to wait a little after the initialization and before 
checking the status, so that delay is not going away no matter how you 
frob with the DSI bridge.

> Put the check in atomic_enable which will be slightly later than
> configuration in pre_enable? Check that sufficient jiffies have passed
> if you needed.
> Or wire up the IRQ line from the SN65DSI83 rather than polling the IRQ
> Status register. Delayed workqueue if the IRQ isn't wired up.

Are you able to do such deferred non-atomic operations in atomic_enable 
callback ?

> If I read it right your log message is triggered by any bit being set
> in REG_IRQ_STAT. So an inconveniently timed correctable DSI error will
> set bit 4 and log the error even though it's been corrected. Likewise
> bit 7 / CHA_SYNCH_ERR could get triggered by an H or V sync packet
> being received in that 10-12ms window (we're in atomic_enable, so
> video is already running).

There should be no bits set in the IRQ_STAT register if everything works 
as it should.

> If it's the PLL being unlocked that is the issue then it should only
> be checking bit 0. Or possibly reading the actual PLL lock status from
> REG_RC_LVDS_PLL_PLL_EN_STAT. Although as we've already checked that
> the PLL is locked via REG_RC_LVDS_PLL_PLL_EN_STAT earlier in the
> atomic_enable, I'm now a little confused as to the condition you are
> actually wanting to detect.

Any outstanding errors which are currently hidden and only show up 
sporadically at the worst possible moment.

[...]

  reply	other threads:[~2022-04-05 14:48 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-13  2:26 [PATCH][RESEND] drm/bridge: ti-sn65dsi83: Check link status register after enabling the bridge Marek Vasut
2022-03-31 15:32 ` Robert Foss
2022-03-31 15:32   ` Robert Foss
2022-04-05 11:42 ` Laurent Pinchart
2022-04-05 11:59   ` Marek Vasut
2022-04-05 12:00   ` Dave Stevenson
2022-04-05 13:08     ` Laurent Pinchart
2022-04-05 13:25       ` Dave Stevenson
2022-04-05 13:49         ` Marek Vasut
2022-04-05 14:20           ` Dave Stevenson
2022-04-05 14:48             ` Marek Vasut [this message]
2022-04-05 15:24               ` Dave Stevenson
2022-04-05 21:36                 ` Marek Vasut
2022-04-06 14:11                   ` Frieder Schrempf

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=941582a8-ca70-dd96-3097-570ae731eb73@denx.de \
    --to=marex@denx.de \
    --cc=dave.stevenson@raspberrypi.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=jagan@amarulasolutions.com \
    --cc=laurent.pinchart@ideasonboard.com \
    --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 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.