All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jani Nikula <jani.nikula@linux.intel.com>
To: ville.syrjala@linux.intel.com, intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH 3/7] drm/i915: Use a loop for the "three times	for luck" DPLL procedure
Date: Thu, 01 Jun 2017 17:49:31 +0300	[thread overview]
Message-ID: <87inkfhif8.fsf@intel.com> (raw)
In-Reply-To: <20170601143619.27840-4-ville.syrjala@linux.intel.com>

On Thu, 01 Jun 2017, ville.syrjala@linux.intel.com wrote:
> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
>
> The magic "enable the  DPLL three times" sequence feels like it
> deserves a loop.

I think the copy-paste unrolled loop is more fun. ;)

Reviewed-by: Jani Nikula <jani.nikula@intel.com>

> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> ---
>  drivers/gpu/drm/i915/intel_display.c | 15 ++++++---------
>  1 file changed, 6 insertions(+), 9 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
> index 4e3c64ed4131..2b112229b5b2 100644
> --- a/drivers/gpu/drm/i915/intel_display.c
> +++ b/drivers/gpu/drm/i915/intel_display.c
> @@ -1550,6 +1550,7 @@ static void i9xx_enable_pll(struct intel_crtc *crtc)
>  	struct drm_i915_private *dev_priv = to_i915(crtc->base.dev);
>  	i915_reg_t reg = DPLL(crtc->pipe);
>  	u32 dpll = crtc->config->dpll_hw_state.dpll;
> +	int i;
>  
>  	assert_pipe_disabled(dev_priv, crtc->pipe);
>  
> @@ -1596,15 +1597,11 @@ static void i9xx_enable_pll(struct intel_crtc *crtc)
>  	}
>  
>  	/* We do this three times for luck */
> -	I915_WRITE(reg, dpll);
> -	POSTING_READ(reg);
> -	udelay(150); /* wait for warmup */
> -	I915_WRITE(reg, dpll);
> -	POSTING_READ(reg);
> -	udelay(150); /* wait for warmup */
> -	I915_WRITE(reg, dpll);
> -	POSTING_READ(reg);
> -	udelay(150); /* wait for warmup */
> +	for (i = 0; i < 3; i++) {
> +		I915_WRITE(reg, dpll);
> +		POSTING_READ(reg);
> +		udelay(150); /* wait for warmup */
> +	}
>  }
>  
>  /**

-- 
Jani Nikula, Intel Open Source Technology Center
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  parent reply	other threads:[~2017-06-01 14:46 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-01 14:36 [PATCH 0/7] drm/i915: Pipe A quirk rework ville.syrjala
2017-06-01 14:36 ` [PATCH 1/7] drm/i915: Fix deadlock witha the pipe A quirk during resume ville.syrjala
2017-06-01 14:47   ` [Intel-gfx] " Jani Nikula
2017-06-01 16:01     ` Ville Syrjälä
2017-06-01 16:01       ` [Intel-gfx] " Ville Syrjälä
2017-06-02  7:04       ` Jani Nikula
2017-06-02  7:04         ` [Intel-gfx] " Jani Nikula
2017-06-01 14:36 ` [PATCH 2/7] drm/i915: Plumb the correct acquire ctx into intel_crtc_disable_noatomic() ville.syrjala
2017-06-01 14:36   ` ville.syrjala
2017-06-01 14:48   ` [Intel-gfx] " Jani Nikula
2017-06-01 16:05     ` Ville Syrjälä
2017-06-01 16:05       ` [Intel-gfx] " Ville Syrjälä
2017-06-01 17:07       ` Ville Syrjälä
2017-06-01 17:07         ` Ville Syrjälä
2017-06-01 14:36 ` [PATCH 3/7] drm/i915: Use a loop for the "three times for luck" DPLL procedure ville.syrjala
2017-06-01 14:48   ` Chris Wilson
2017-06-01 16:14     ` Ville Syrjälä
2017-06-01 14:49   ` Jani Nikula [this message]
2017-06-01 14:36 ` [PATCH 4/7] drm/i915: Add i830 "pipes power well" ville.syrjala
2017-06-01 14:46   ` Chris Wilson
2017-06-01 16:25     ` Ville Syrjälä
2017-06-06  7:04   ` Maarten Lankhorst
2017-06-06 10:32     ` Ville Syrjälä
2017-06-01 14:36 ` [PATCH 5/7] drm/i915: Drop pipe A quirk for Toshiba Protege R205-S209 ville.syrjala
2017-06-01 14:36 ` [PATCH 6/7] drm/i915: Drop pipe A quirk for Thinkapd T60 ville.syrjala
2017-06-01 14:36 ` [PATCH 7/7] drm/i915: Remove pipe A quirk remnants ville.syrjala
2017-06-01 14:41 ` [PATCH 0/7] drm/i915: Pipe A quirk rework Chris Wilson
2017-06-01 14:59 ` ✓ Fi.CI.BAT: success for " Patchwork
2017-06-15 13:16 ` [PATCH 0/7] " Ville Syrjälä

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=87inkfhif8.fsf@intel.com \
    --to=jani.nikula@linux.intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=ville.syrjala@linux.intel.com \
    /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.