dri-devel.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
From: spanda@codeaurora.org
To: Sean Paul <sean@poorly.run>
Cc: Laurent Pinchart <Laurent.pinchart@ideasonboard.com>,
	dri-devel@lists.freedesktop.org
Subject: Re: [PATCH v3 5/7] drm/bridge: ti-sn65dsi86: Poll for DP PLL Lock
Date: Tue, 14 Aug 2018 16:40:20 +0530	[thread overview]
Message-ID: <7e2e202322a8f17d2461ad0d37107008@codeaurora.org> (raw)
In-Reply-To: <20180813213058.184821-6-sean@poorly.run>

On 2018-08-14 03:00, Sean Paul wrote:
> From: Sean Paul <seanpaul@chromium.org>
> 
> Instead of just waiting and hoping, actually poll for the pll lock to 
> be
> acquired. As a bonus, this should be significantly faster than the
> sleep.
> 
> Changes in v3:
> - Added to the set
> 
> Cc: Sandeep Panda <spanda@codeaurora.org>
> Signed-off-by: Sean Paul <seanpaul@chromium.org>
> ---
>  drivers/gpu/drm/bridge/ti-sn65dsi86.c | 10 +++++++++-
>  1 file changed, 9 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/bridge/ti-sn65dsi86.c
> b/drivers/gpu/drm/bridge/ti-sn65dsi86.c
> index d2119ab546147..f02bdedae1e5e 100644
> --- a/drivers/gpu/drm/bridge/ti-sn65dsi86.c
> +++ b/drivers/gpu/drm/bridge/ti-sn65dsi86.c
> @@ -456,6 +456,7 @@ static void ti_sn_bridge_enable(struct drm_bridge 
> *bridge)
>  {
>  	struct ti_sn_bridge *pdata = bridge_to_ti_sn_bridge(bridge);
>  	unsigned int val;
> +	int ret;
> 
>  	/* DSI_A lane config */
>  	val = CHA_DSI_LANES(4 - pdata->dsi->lanes);
> @@ -472,7 +473,14 @@ static void ti_sn_bridge_enable(struct drm_bridge 
> *bridge)
> 
>  	/* enable DP PLL */
>  	regmap_write(pdata->regmap, SN_PLL_ENABLE_REG, 1);
> -	usleep_range(10000, 10500); /* 10ms delay recommended by spec */
> +
> +	ret = regmap_read_poll_timeout(pdata->regmap, SN_DPPLL_SRC_REG, val,
> +				       val & DPPLL_SRC_DP_PLL_LOCK, 1000,
> +				       50 * 1000);
> +	if (ret) {
> +		DRM_ERROR("DP_PLL_LOCK polling failed (%d)\n", ret);
> +		return;
> +	}
> 
>  	/**
>  	 * The SN65DSI86 only supports ASSR Display Authentication method and
Reviewed-by: Sandeep Panda <spanda@codeaurora.org>
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

  reply	other threads:[~2018-08-14 11:10 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-08-13 21:30 [PATCH v3 0/7] drm/bridge: ti-sn65dsi86: Fix bridge for non always-on regulators Sean Paul
2018-08-13 21:30 ` [PATCH v3 1/7] drm/panel: simple: tv123wam: Add unprepare delay Sean Paul
2018-08-14 10:40   ` spanda
2018-08-14 17:55     ` Sean Paul
2018-08-13 21:30 ` [PATCH v3 2/7] drm/bridge: ti-sn65dsi86: Fixup register names Sean Paul
2018-08-14 10:50   ` spanda
2018-08-13 21:30 ` [PATCH v3 3/7] drm/bridge: ti-sn65dsi86: Implement AUX channel Sean Paul
2018-08-14 11:06   ` spanda
2018-08-13 21:30 ` [PATCH v3 4/7] drm/bridge: ti-sn65dsi86: Move panel_prepare() to pre_enable() Sean Paul
2018-08-14 11:09   ` spanda
2018-08-13 21:30 ` [PATCH v3 5/7] drm/bridge: ti-sn65dsi86: Poll for DP PLL Lock Sean Paul
2018-08-14 11:10   ` spanda [this message]
2018-08-13 21:30 ` [PATCH v3 6/7] drm/bridge: ti-sn65dsi86: Poll for training complete Sean Paul
2018-08-14 11:26   ` spanda
2018-08-14 18:15     ` Sean Paul
2018-08-13 21:30 ` [PATCH v3 7/7] drm/bridge: ti-sn65dsi86: Add mystery delay to enable() Sean Paul
2018-08-14 11:29   ` spanda
2018-08-14 14:00     ` Sean Paul
2018-08-14 14:01       ` Sean Paul
2018-08-23 14:25         ` Sean Paul
2018-08-26  5:44           ` spanda
2018-08-26 11:37             ` Sean Paul
2018-08-27  2:10   ` spanda
2018-08-27 15:28     ` Sean Paul

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=7e2e202322a8f17d2461ad0d37107008@codeaurora.org \
    --to=spanda@codeaurora.org \
    --cc=Laurent.pinchart@ideasonboard.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=sean@poorly.run \
    /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).