Intel-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Ben Widawsky <ben@bwidawsk.net>
To: Chris Wilson <chris@chris-wilson.co.uk>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH] drm/i915: Wait for the clocks to stabilise before updating PLLs
Date: Wed, 2 May 2012 13:14:59 -0700	[thread overview]
Message-ID: <20120502131459.0fdbb7b5@bwidawsk.net> (raw)
In-Reply-To: <1335987836-27149-1-git-send-email-chris@chris-wilson.co.uk>

On Wed,  2 May 2012 20:43:56 +0100
Chris Wilson <chris@chris-wilson.co.uk> wrote:

> Cc: Ben Widawsky <ben@bwidawsk.net>
> Cc: Jesse Barnes <jbarnes@virtuousgeek.org>
Reported-and-tested-by: Ben Widawsky <ben@bwidawsk.net>
> ---
>  drivers/gpu/drm/i915/intel_display.c |    7 +++++--
>  1 file changed, 5 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
> index d5aa2d2..b97112c 100644
> --- a/drivers/gpu/drm/i915/intel_display.c
> +++ b/drivers/gpu/drm/i915/intel_display.c
> @@ -2845,11 +2845,14 @@ found:
>  	DRM_DEBUG_DRIVER("using pll %d for pipe %d\n", i, intel_crtc->pipe);
>  prepare: /* separate function? */
>  	DRM_DEBUG_DRIVER("switching PLL %x off\n", pll->pll_reg);
> -	I915_WRITE(pll->fp0_reg, fp);
> -	I915_WRITE(pll->pll_reg, dpll & ~DPLL_VCO_ENABLE);
>  
> +	/* Wait for the clocks to stabilize before rewriting the regs */
> +	I915_WRITE(pll->pll_reg, dpll & ~DPLL_VCO_ENABLE);
>  	POSTING_READ(pll->pll_reg);
>  	udelay(150);
> +
> +	I915_WRITE(pll->fp0_reg, fp);
> +	I915_WRITE(pll->pll_reg, dpll & ~DPLL_VCO_ENABLE);
>  	pll->on = false;
>  	return pll;
>  }



-- 
Ben Widawsky, Intel Open Source Technology Center

  reply	other threads:[~2012-05-02 20:15 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-02 19:43 [PATCH] drm/i915: Wait for the clocks to stabilise before updating PLLs Chris Wilson
2012-05-02 20:14 ` Ben Widawsky [this message]
2012-05-02 20:26   ` Chris Wilson
2012-05-03  9:13     ` Daniel Vetter

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=20120502131459.0fdbb7b5@bwidawsk.net \
    --to=ben@bwidawsk.net \
    --cc=chris@chris-wilson.co.uk \
    --cc=intel-gfx@lists.freedesktop.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