From mboxrd@z Thu Jan 1 00:00:00 1970 From: Daniel Vetter Subject: Re: [PATCH 3/9] drm/i915: use the mode->htotal to calculate linetime watermarks Date: Tue, 21 May 2013 11:26:16 +0200 Message-ID: <20130521092616.GI12292@phenom.ffwll.local> References: <1367612625-4823-1-git-send-email-przanoni@gmail.com> <1367612625-4823-4-git-send-email-przanoni@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail-wg0-f46.google.com (mail-wg0-f46.google.com [74.125.82.46]) by gabe.freedesktop.org (Postfix) with ESMTP id C1D60E5CD3 for ; Tue, 21 May 2013 02:26:21 -0700 (PDT) Received: by mail-wg0-f46.google.com with SMTP id l18so204021wgh.25 for ; Tue, 21 May 2013 02:26:21 -0700 (PDT) Content-Disposition: inline In-Reply-To: <1367612625-4823-4-git-send-email-przanoni@gmail.com> 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: Paulo Zanoni Cc: intel-gfx@lists.freedesktop.org, Paulo Zanoni List-Id: intel-gfx@lists.freedesktop.org On Fri, May 03, 2013 at 05:23:39PM -0300, Paulo Zanoni wrote: > From: Paulo Zanoni > > ... instead of mode->crtc_display. The spec says "pipe horizontal > total number of pixels" and the "Haswell Watermark Calculator" tool > uses the "Pipe H Total" instead of "Pipe H Src" as the value. > > Signed-off-by: Paulo Zanoni > --- > drivers/gpu/drm/i915/intel_pm.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c > index d056bc9..4cc5f99 100644 > --- a/drivers/gpu/drm/i915/intel_pm.c > +++ b/drivers/gpu/drm/i915/intel_pm.c > @@ -2035,7 +2035,7 @@ haswell_update_linetime_wm(struct drm_device *dev, struct drm_crtc *crtc) > * row at the given clock rate, multiplied by 8. > * */ > temp |= PIPE_WM_LINETIME_TIME( > - ((mode->crtc_hdisplay * 1000) / mode->clock) * 8); > + ((mode->htotal * 1000) / mode->clock) * 8); Big question: What's the right value for interlaced modes? On progressive mode crtc_ mode values match the non-crtc_ prefixed ones, but not so much for interlaced modes ... So if your tool expects something resembling what we program into the pipe registers, we need to change this again. Merged for now since the spec explicitly says "pixels", but I'd like someone to double-check this. -Daniel > > /* IPS watermarks are only used by pipe A, and are ignored by > * pipes B and C. They are calculated similarly to the common > -- > 1.7.10.4 > > _______________________________________________ > Intel-gfx mailing list > Intel-gfx@lists.freedesktop.org > http://lists.freedesktop.org/mailman/listinfo/intel-gfx -- Daniel Vetter Software Engineer, Intel Corporation +41 (0) 79 365 57 48 - http://blog.ffwll.ch