All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: Paulo Zanoni <przanoni@gmail.com>
Cc: intel-gfx@lists.freedesktop.org, Paulo Zanoni <paulo.r.zanoni@intel.com>
Subject: Re: [PATCH 7/9] drm/i915: set the IPS linetime watermark
Date: Mon, 20 May 2013 17:05:59 +0300	[thread overview]
Message-ID: <20130520140559.GJ14974@intel.com> (raw)
In-Reply-To: <1367612625-4823-8-git-send-email-przanoni@gmail.com>

On Fri, May 03, 2013 at 05:23:43PM -0300, Paulo Zanoni wrote:
> From: Paulo Zanoni <paulo.r.zanoni@intel.com>
> 
> Remove the "placeholder" comment and set the actual value described by
> the specification. We still don't enable IPS, but it won't hurt to
> already have the value set here.
> 
> While at it, fully set the register value instead of just masking the
> values we're changing.
> 
> Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>

Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>

> ---
>  drivers/gpu/drm/i915/intel_pm.c |   22 +++++++---------------
>  1 file changed, 7 insertions(+), 15 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c
> index 3ca020c..59bac2e 100644
> --- a/drivers/gpu/drm/i915/intel_pm.c
> +++ b/drivers/gpu/drm/i915/intel_pm.c
> @@ -2022,7 +2022,7 @@ haswell_update_linetime_wm(struct drm_device *dev, struct drm_crtc *crtc)
>  	enum pipe pipe = intel_crtc->pipe;
>  	struct drm_display_mode *mode = &intel_crtc->config.adjusted_mode;
>  	int target_clock;
> -	u32 temp;
> +	u32 linetime, ips_linetime;
>  
>  	if (!intel_crtc_active(crtc)) {
>  		I915_WRITE(PIPE_WM_LINETIME(pipe), 0);
> @@ -2034,24 +2034,16 @@ haswell_update_linetime_wm(struct drm_device *dev, struct drm_crtc *crtc)
>  	else
>  		target_clock = intel_crtc->config.adjusted_mode.clock;
>  
> -	temp = I915_READ(PIPE_WM_LINETIME(pipe));
> -	temp &= ~PIPE_WM_LINETIME_MASK;
> -
>  	/* The WM are computed with base on how long it takes to fill a single
>  	 * row at the given clock rate, multiplied by 8.
>  	 * */
> -	temp |= PIPE_WM_LINETIME_TIME(
> -		DIV_ROUND_CLOSEST(mode->htotal * 1000 * 8, target_clock));
> -
> -	/* IPS watermarks are only used by pipe A, and are ignored by
> -	 * pipes B and C.  They are calculated similarly to the common
> -	 * linetime values, except that we are using CD clock frequency
> -	 * in MHz instead of pixel rate for the division.
> -	 *
> -	 * This is a placeholder for the IPS watermark calculation code.
> -	 */
> +	linetime = DIV_ROUND_CLOSEST(mode->htotal * 1000 * 8, target_clock);
> +	ips_linetime = DIV_ROUND_CLOSEST(mode->htotal * 1000 * 8,
> +					 intel_ddi_get_cdclk_freq(dev_priv));
>  
> -	I915_WRITE(PIPE_WM_LINETIME(pipe), temp);
> +	I915_WRITE(PIPE_WM_LINETIME(pipe),
> +		   PIPE_WM_LINETIME_IPS_LINETIME(ips_linetime) |
> +		   PIPE_WM_LINETIME_TIME(linetime));
>  }
>  
>  static void haswell_update_wm(struct drm_device *dev)
> -- 
> 1.7.10.4
> 
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx

-- 
Ville Syrjälä
Intel OTC

  reply	other threads:[~2013-05-20 14:06 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-05-03 20:23 [PATCH 0/9] Haswell watermarks, round 1 Paulo Zanoni
2013-05-03 20:23 ` [PATCH 1/9] drm/i915: ILK, SNB and IVB don't have linetime watermarks Paulo Zanoni
2013-05-20 13:41   ` Ville Syrjälä
2013-05-03 20:23 ` [PATCH 2/9] drm/i915: fix linetime_watermarks code Paulo Zanoni
2013-05-05  7:19   ` Chris Wilson
2013-05-06 13:13     ` Paulo Zanoni
2013-05-06 13:43       ` Chris Wilson
2013-05-09 19:55         ` [PATCH 2/9] drm/i915: remove intel_update_linetime_watermarks Paulo Zanoni
2013-05-20 13:48           ` Ville Syrjälä
2013-05-03 20:23 ` [PATCH 3/9] drm/i915: use the mode->htotal to calculate linetime watermarks Paulo Zanoni
2013-05-20 13:42   ` Ville Syrjälä
2013-05-21  9:26   ` Daniel Vetter
2013-05-21 14:33     ` Paulo Zanoni
2013-05-21 14:59       ` Daniel Vetter
2013-05-03 20:23 ` [PATCH 4/9] drm/i915: fix haswell linetime watermarks calculation Paulo Zanoni
2013-05-20 13:53   ` Ville Syrjälä
2013-05-03 20:23 ` [PATCH 5/9] drm/i915: use the correct clock when calculating linetime watermarks Paulo Zanoni
2013-05-20 14:00   ` Ville Syrjälä
2013-05-21  9:35   ` Daniel Vetter
2013-05-03 20:23 ` [PATCH 6/9] drm/i915: make intel_ddi_get_cdclk_freq return values in KHz Paulo Zanoni
2013-05-05  7:20   ` Chris Wilson
2013-05-06 13:53     ` Paulo Zanoni
2013-05-20 14:11   ` Ville Syrjälä
2013-05-03 20:23 ` [PATCH 7/9] drm/i915: set the IPS linetime watermark Paulo Zanoni
2013-05-20 14:05   ` Ville Syrjälä [this message]
2013-05-03 20:23 ` [PATCH 8/9] drm/i915: MCH_SSKPD is a 64 bit register on Haswell Paulo Zanoni
2013-05-20 13:38   ` Ville Syrjälä
2013-05-03 20:23 ` [PATCH 9/9] drm/i915: set FORCE_ARB_IDLE_PLANES workaround Paulo Zanoni
2013-05-20 13:37   ` Ville Syrjälä
2013-05-21 10:01   ` Daniel Vetter
2013-05-21 13:27     ` Paulo Zanoni
2013-05-23 10:36       ` Ville Syrjälä
2013-05-23 10:51         ` 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=20130520140559.GJ14974@intel.com \
    --to=ville.syrjala@linux.intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=paulo.r.zanoni@intel.com \
    --cc=przanoni@gmail.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.