From: Paulo Zanoni Date: Fri, 3 May 2013 20:23:39 +0000 (-0300) Subject: drm/i915: use the mode->htotal to calculate linetime watermarks X-Git-Tag: Ubuntu-5.2.0-15.16~15326^2~105^2~66 X-Git-Url: https://git.proxmox.com/?a=commitdiff_plain;h=7366937312d4e406539b1cf70e1562358bdd560e;p=mirror_ubuntu-eoan-kernel.git drm/i915: use the mode->htotal to calculate linetime watermarks ... 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 Reviewed-by: Ville Syrjälä Signed-off-by: Daniel Vetter --- diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c index 2ae4e459faa5..198d9c9ada68 100644 --- a/drivers/gpu/drm/i915/intel_pm.c +++ b/drivers/gpu/drm/i915/intel_pm.c @@ -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