drm/i915: use the mode->htotal to calculate linetime watermarks
authorPaulo Zanoni <paulo.r.zanoni@intel.com>
Fri, 3 May 2013 20:23:39 +0000 (17:23 -0300)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Tue, 21 May 2013 09:26:20 +0000 (11:26 +0200)
... 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 <paulo.r.zanoni@intel.com>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
drivers/gpu/drm/i915/intel_pm.c

index 2ae4e459faa5b4ddeaf2afed0a91ebd55e9d52e2..198d9c9ada683d99efafa2cb652cce776292f2b7 100644 (file)
@@ -2093,7 +2093,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);
 
        /* IPS watermarks are only used by pipe A, and are ignored by
         * pipes B and C.  They are calculated similarly to the common