diff options
| -rw-r--r-- | drivers/gpu/drm/i915/i915_reg.h | 1 | ||||
| -rw-r--r-- | drivers/gpu/drm/i915/intel_display.c | 29 |
2 files changed, 29 insertions, 1 deletions
diff --git a/drivers/gpu/drm/i915/i915_reg.h b/drivers/gpu/drm/i915/i915_reg.h index f1bc0fb6a72c..160903adf706 100644 --- a/drivers/gpu/drm/i915/i915_reg.h +++ b/drivers/gpu/drm/i915/i915_reg.h | |||
| @@ -2825,6 +2825,7 @@ | |||
| 2825 | #define ILK_eDP_A_DISABLE (1<<24) | 2825 | #define ILK_eDP_A_DISABLE (1<<24) |
| 2826 | #define ILK_DESKTOP (1<<23) | 2826 | #define ILK_DESKTOP (1<<23) |
| 2827 | #define ILK_DSPCLK_GATE 0x42020 | 2827 | #define ILK_DSPCLK_GATE 0x42020 |
| 2828 | #define IVB_VRHUNIT_CLK_GATE (1<<28) | ||
| 2828 | #define ILK_DPARB_CLK_GATE (1<<5) | 2829 | #define ILK_DPARB_CLK_GATE (1<<5) |
| 2829 | #define ILK_DPFD_CLK_GATE (1<<7) | 2830 | #define ILK_DPFD_CLK_GATE (1<<7) |
| 2830 | 2831 | ||
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c index 7eeffaf775ed..b8b4a2e4bbb0 100644 --- a/drivers/gpu/drm/i915/intel_display.c +++ b/drivers/gpu/drm/i915/intel_display.c | |||
| @@ -7336,6 +7336,33 @@ static void gen6_init_clock_gating(struct drm_device *dev) | |||
| 7336 | DISPPLANE_TRICKLE_FEED_DISABLE); | 7336 | DISPPLANE_TRICKLE_FEED_DISABLE); |
| 7337 | } | 7337 | } |
| 7338 | 7338 | ||
| 7339 | static void ivybridge_init_clock_gating(struct drm_device *dev) | ||
| 7340 | { | ||
| 7341 | struct drm_i915_private *dev_priv = dev->dev_private; | ||
| 7342 | int pipe; | ||
| 7343 | uint32_t dspclk_gate = VRHUNIT_CLOCK_GATE_DISABLE; | ||
| 7344 | |||
| 7345 | I915_WRITE(PCH_DSPCLK_GATE_D, dspclk_gate); | ||
| 7346 | |||
| 7347 | /* | ||
| 7348 | * On Ibex Peak and Cougar Point, we need to disable clock | ||
| 7349 | * gating for the panel power sequencer or it will fail to | ||
| 7350 | * start up when no ports are active. | ||
| 7351 | */ | ||
| 7352 | I915_WRITE(SOUTH_DSPCLK_GATE_D, PCH_DPLSUNIT_CLOCK_GATE_DISABLE); | ||
| 7353 | |||
| 7354 | I915_WRITE(WM3_LP_ILK, 0); | ||
| 7355 | I915_WRITE(WM2_LP_ILK, 0); | ||
| 7356 | I915_WRITE(WM1_LP_ILK, 0); | ||
| 7357 | |||
| 7358 | I915_WRITE(ILK_DSPCLK_GATE, IVB_VRHUNIT_CLK_GATE); | ||
| 7359 | |||
| 7360 | for_each_pipe(pipe) | ||
| 7361 | I915_WRITE(DSPCNTR(pipe), | ||
| 7362 | I915_READ(DSPCNTR(pipe)) | | ||
| 7363 | DISPPLANE_TRICKLE_FEED_DISABLE); | ||
| 7364 | } | ||
| 7365 | |||
| 7339 | static void g4x_init_clock_gating(struct drm_device *dev) | 7366 | static void g4x_init_clock_gating(struct drm_device *dev) |
| 7340 | { | 7367 | { |
| 7341 | struct drm_i915_private *dev_priv = dev->dev_private; | 7368 | struct drm_i915_private *dev_priv = dev->dev_private; |
| @@ -7603,7 +7630,7 @@ static void intel_init_display(struct drm_device *dev) | |||
| 7603 | "Disable CxSR\n"); | 7630 | "Disable CxSR\n"); |
| 7604 | dev_priv->display.update_wm = NULL; | 7631 | dev_priv->display.update_wm = NULL; |
| 7605 | } | 7632 | } |
| 7606 | dev_priv->display.init_clock_gating = gen6_init_clock_gating; | 7633 | dev_priv->display.init_clock_gating = ivybridge_init_clock_gating; |
| 7607 | 7634 | ||
| 7608 | } else | 7635 | } else |
| 7609 | dev_priv->display.update_wm = NULL; | 7636 | dev_priv->display.update_wm = NULL; |
