From mboxrd@z Thu Jan 1 00:00:00 1970 From: Daniel Vetter Subject: Re: [PATCH 2/2] drm/i915: Double the cursor self-refresh latency on Valleyview Date: Mon, 17 Dec 2012 12:38:06 +0100 Message-ID: <20121217113806.GK5737@phenom.ffwll.local> References: <1355227303-17157-1-git-send-email-chris@chris-wilson.co.uk> <1355227303-17157-2-git-send-email-chris@chris-wilson.co.uk> <20121211082842.50320f87@jbarnes-desktop> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail-wg0-f41.google.com (mail-wg0-f41.google.com [74.125.82.41]) by gabe.freedesktop.org (Postfix) with ESMTP id 7FB1CE6112 for ; Mon, 17 Dec 2012 03:36:33 -0800 (PST) Received: by mail-wg0-f41.google.com with SMTP id ds1so1560668wgb.0 for ; Mon, 17 Dec 2012 03:36:32 -0800 (PST) Content-Disposition: inline In-Reply-To: <20121211082842.50320f87@jbarnes-desktop> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: intel-gfx-bounces+gcfxdi-intel-gfx=m.gmane.org@lists.freedesktop.org Errors-To: intel-gfx-bounces+gcfxdi-intel-gfx=m.gmane.org@lists.freedesktop.org To: Jesse Barnes Cc: intel-gfx@lists.freedesktop.org List-Id: intel-gfx@lists.freedesktop.org On Tue, Dec 11, 2012 at 08:28:42AM -0800, Jesse Barnes wrote: > On Tue, 11 Dec 2012 12:01:43 +0000 > Chris Wilson wrote: > > > It operates at twice the declared latency, so double the latency value > > used for the cursor watermark calculation. > > > > Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=50248 > > Signed-off-by: Chris Wilson > > CC: Jesse Barnes > > --- > > drivers/gpu/drm/i915/intel_pm.c | 8 +++++++- > > 1 file changed, 7 insertions(+), 1 deletion(-) > > > > diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c > > index 1e61f5e..20daf58 100644 > > --- a/drivers/gpu/drm/i915/intel_pm.c > > +++ b/drivers/gpu/drm/i915/intel_pm.c > > @@ -1289,6 +1289,7 @@ static void valleyview_update_wm(struct drm_device *dev) > > struct drm_i915_private *dev_priv = dev->dev_private; > > int planea_wm, planeb_wm, cursora_wm, cursorb_wm; > > int plane_sr, cursor_sr; > > + int ignore_plane_sr, ignore_cursor_sr; > > unsigned int enabled = 0; > > > > vlv_update_drain_latency(dev); > > @@ -1311,7 +1312,12 @@ static void valleyview_update_wm(struct drm_device *dev) > > sr_latency_ns, > > &valleyview_wm_info, > > &valleyview_cursor_wm_info, > > - &plane_sr, &cursor_sr)) > > + &plane_sr, &ignore_cursor_sr) && > > + g4x_compute_srwm(dev, ffs(enabled) - 1, > > + 2*sr_latency_ns, > > + &valleyview_wm_info, > > + &valleyview_cursor_wm_info, > > + &ignore_plane_sr, &cursor_sr)) > > I915_WRITE(FW_BLC_SELF_VLV, FW_CSPWRDWNEN); > > else > > I915_WRITE(FW_BLC_SELF_VLV, > > Reviewed-by: Jesse Barnes > > Probably need to add a comment in here somewhere, along the lines of > "watch out for minotaurs" or "bring string". Both patches applied to -fixes, thanks. -Daniel -- Daniel Vetter Software Engineer, Intel Corporation +41 (0) 79 365 57 48 - http://blog.ffwll.ch