aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/i915/intel_display.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/drm/i915/intel_display.c')
-rw-r--r--drivers/gpu/drm/i915/intel_display.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index 64773ce5296..bdcda36953b 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -367,6 +367,7 @@ static const intel_limit_t intel_limits[] = {
367 .p1 = { .min = I9XX_P1_MIN, .max = I9XX_P1_MAX }, 367 .p1 = { .min = I9XX_P1_MIN, .max = I9XX_P1_MAX },
368 .p2 = { .dot_limit = I9XX_P2_SDVO_DAC_SLOW_LIMIT, 368 .p2 = { .dot_limit = I9XX_P2_SDVO_DAC_SLOW_LIMIT,
369 .p2_slow = I9XX_P2_SDVO_DAC_SLOW, .p2_fast = I9XX_P2_SDVO_DAC_FAST }, 369 .p2_slow = I9XX_P2_SDVO_DAC_SLOW, .p2_fast = I9XX_P2_SDVO_DAC_FAST },
370 .find_pll = intel_find_best_PLL,
370 }, 371 },
371 { /* INTEL_LIMIT_IGD_LVDS */ 372 { /* INTEL_LIMIT_IGD_LVDS */
372 .dot = { .min = I9XX_DOT_MIN, .max = I9XX_DOT_MAX }, 373 .dot = { .min = I9XX_DOT_MIN, .max = I9XX_DOT_MAX },
@@ -380,6 +381,7 @@ static const intel_limit_t intel_limits[] = {
380 /* IGD only supports single-channel mode. */ 381 /* IGD only supports single-channel mode. */
381 .p2 = { .dot_limit = I9XX_P2_LVDS_SLOW_LIMIT, 382 .p2 = { .dot_limit = I9XX_P2_LVDS_SLOW_LIMIT,
382 .p2_slow = I9XX_P2_LVDS_SLOW, .p2_fast = I9XX_P2_LVDS_SLOW }, 383 .p2_slow = I9XX_P2_LVDS_SLOW, .p2_fast = I9XX_P2_LVDS_SLOW },
384 .find_pll = intel_find_best_PLL,
383 }, 385 },
384 386
385}; 387};
@@ -655,6 +657,7 @@ intel_pipe_set_base(struct drm_crtc *crtc, int x, int y,
655 int dspbase = (pipe == 0 ? DSPAADDR : DSPBADDR); 657 int dspbase = (pipe == 0 ? DSPAADDR : DSPBADDR);
656 int dspsurf = (pipe == 0 ? DSPASURF : DSPBSURF); 658 int dspsurf = (pipe == 0 ? DSPASURF : DSPBSURF);
657 int dspstride = (pipe == 0) ? DSPASTRIDE : DSPBSTRIDE; 659 int dspstride = (pipe == 0) ? DSPASTRIDE : DSPBSTRIDE;
660 int dsptileoff = (pipe == 0 ? DSPATILEOFF : DSPBTILEOFF);
658 int dspcntr_reg = (pipe == 0) ? DSPACNTR : DSPBCNTR; 661 int dspcntr_reg = (pipe == 0) ? DSPACNTR : DSPBCNTR;
659 u32 dspcntr, alignment; 662 u32 dspcntr, alignment;
660 int ret; 663 int ret;
@@ -731,6 +734,13 @@ intel_pipe_set_base(struct drm_crtc *crtc, int x, int y,
731 mutex_unlock(&dev->struct_mutex); 734 mutex_unlock(&dev->struct_mutex);
732 return -EINVAL; 735 return -EINVAL;
733 } 736 }
737 if (IS_I965G(dev)) {
738 if (obj_priv->tiling_mode != I915_TILING_NONE)
739 dspcntr |= DISPPLANE_TILED;
740 else
741 dspcntr &= ~DISPPLANE_TILED;
742 }
743
734 I915_WRITE(dspcntr_reg, dspcntr); 744 I915_WRITE(dspcntr_reg, dspcntr);
735 745
736 Start = obj_priv->gtt_offset; 746 Start = obj_priv->gtt_offset;
@@ -743,6 +753,7 @@ intel_pipe_set_base(struct drm_crtc *crtc, int x, int y,
743 I915_READ(dspbase); 753 I915_READ(dspbase);
744 I915_WRITE(dspsurf, Start); 754 I915_WRITE(dspsurf, Start);
745 I915_READ(dspsurf); 755 I915_READ(dspsurf);
756 I915_WRITE(dsptileoff, (y << 16) | x);
746 } else { 757 } else {
747 I915_WRITE(dspbase, Start + Offset); 758 I915_WRITE(dspbase, Start + Offset);
748 I915_READ(dspbase); 759 I915_READ(dspbase);