[Intel-gfx] [PATCH 22/37] drm/i915: program WM_LINETIME on Haswell

Eugeni Dodonov eugeni.dodonov at intel.com
Thu Mar 22 02:09:57 CET 2012


The line time can be programmed according to the number of horizontal
pixels vs effective pixel rate ratio.

Signed-off-by: Eugeni Dodonov <eugeni.dodonov at intel.com>
---
 drivers/gpu/drm/i915/intel_display.c |   11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index 46633fe..e056c32 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -6073,6 +6073,17 @@ static int ironlake_crtc_mode_set(struct drm_crtc *crtc,
 		   (adjusted_mode->crtc_vsync_start - 1) |
 		   ((adjusted_mode->crtc_vsync_end - 1) << 16));
 
+	if (IS_HASWELL(dev)) {
+		temp = I915_READ(PIPE_WM_LINETIME(pipe));
+		temp &= ~PIPE_WM_LINETIME_LINETIME_MASK;
+
+		/* Pipe horizontal total number of pixels / pixel rate in MHz. */
+		temp |= PIPE_WM_LINETIME_LINETIME(
+				adjusted_mode->crtc_hdisplay /
+				(adjusted_mode->clock / 1000));
+		I915_WRITE(PIPE_WM_LINETIME(pipe), temp);
+	}
+
 	/* pipesrc controls the size that is scaled from, which should
 	 * always be the user's requested size.
 	 */
-- 
1.7.9.2




More information about the Intel-gfx mailing list