Commit 05ce1a49 authored by Keith Packard's avatar Keith Packard

drm/i915: Restrict ILK-specific eDP power hack to ILK

This eliminates a fairly long delay when power sequencing newer
hardware
Signed-off-by: default avatarKeith Packard <keithp@keithp.com>
Reviewed-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
parent bd943159
...@@ -992,10 +992,12 @@ static void ironlake_edp_panel_on (struct intel_dp *intel_dp) ...@@ -992,10 +992,12 @@ static void ironlake_edp_panel_on (struct intel_dp *intel_dp)
pp &= ~PANEL_UNLOCK_MASK; pp &= ~PANEL_UNLOCK_MASK;
pp |= PANEL_UNLOCK_REGS; pp |= PANEL_UNLOCK_REGS;
/* ILK workaround: disable reset around power sequence */ if (IS_GEN5(dev)) {
pp &= ~PANEL_POWER_RESET; /* ILK workaround: disable reset around power sequence */
I915_WRITE(PCH_PP_CONTROL, pp); pp &= ~PANEL_POWER_RESET;
POSTING_READ(PCH_PP_CONTROL); I915_WRITE(PCH_PP_CONTROL, pp);
POSTING_READ(PCH_PP_CONTROL);
}
pp |= POWER_TARGET_ON; pp |= POWER_TARGET_ON;
I915_WRITE(PCH_PP_CONTROL, pp); I915_WRITE(PCH_PP_CONTROL, pp);
...@@ -1006,9 +1008,11 @@ static void ironlake_edp_panel_on (struct intel_dp *intel_dp) ...@@ -1006,9 +1008,11 @@ static void ironlake_edp_panel_on (struct intel_dp *intel_dp)
DRM_ERROR("panel on wait timed out: 0x%08x\n", DRM_ERROR("panel on wait timed out: 0x%08x\n",
I915_READ(PCH_PP_STATUS)); I915_READ(PCH_PP_STATUS));
pp |= PANEL_POWER_RESET; /* restore panel reset bit */ if (IS_GEN5(dev)) {
I915_WRITE(PCH_PP_CONTROL, pp); pp |= PANEL_POWER_RESET; /* restore panel reset bit */
POSTING_READ(PCH_PP_CONTROL); I915_WRITE(PCH_PP_CONTROL, pp);
POSTING_READ(PCH_PP_CONTROL);
}
} }
static void ironlake_edp_panel_off(struct drm_encoder *encoder) static void ironlake_edp_panel_off(struct drm_encoder *encoder)
...@@ -1025,24 +1029,32 @@ static void ironlake_edp_panel_off(struct drm_encoder *encoder) ...@@ -1025,24 +1029,32 @@ static void ironlake_edp_panel_off(struct drm_encoder *encoder)
pp &= ~PANEL_UNLOCK_MASK; pp &= ~PANEL_UNLOCK_MASK;
pp |= PANEL_UNLOCK_REGS; pp |= PANEL_UNLOCK_REGS;
/* ILK workaround: disable reset around power sequence */ if (IS_GEN5(dev)) {
pp &= ~PANEL_POWER_RESET; /* ILK workaround: disable reset around power sequence */
I915_WRITE(PCH_PP_CONTROL, pp); pp &= ~PANEL_POWER_RESET;
POSTING_READ(PCH_PP_CONTROL); I915_WRITE(PCH_PP_CONTROL, pp);
POSTING_READ(PCH_PP_CONTROL);
}
pp &= ~POWER_TARGET_ON; intel_dp->panel_off_jiffies = jiffies;
I915_WRITE(PCH_PP_CONTROL, pp);
POSTING_READ(PCH_PP_CONTROL);
msleep(intel_dp->panel_power_cycle_delay);
if (wait_for((I915_READ(PCH_PP_STATUS) & idle_off_mask) == 0, 5000)) if (IS_GEN5(dev)) {
DRM_ERROR("panel off wait timed out: 0x%08x\n", pp &= ~POWER_TARGET_ON;
I915_READ(PCH_PP_STATUS)); I915_WRITE(PCH_PP_CONTROL, pp);
POSTING_READ(PCH_PP_CONTROL);
pp &= ~POWER_TARGET_ON;
I915_WRITE(PCH_PP_CONTROL, pp);
POSTING_READ(PCH_PP_CONTROL);
msleep(intel_dp->panel_power_cycle_delay);
pp |= PANEL_POWER_RESET; /* restore panel reset bit */ if (wait_for((I915_READ(PCH_PP_STATUS) & idle_off_mask) == 0, 5000))
I915_WRITE(PCH_PP_CONTROL, pp); DRM_ERROR("panel off wait timed out: 0x%08x\n",
POSTING_READ(PCH_PP_CONTROL); I915_READ(PCH_PP_STATUS));
intel_dp->panel_off_jiffies = jiffies;
pp |= PANEL_POWER_RESET; /* restore panel reset bit */
I915_WRITE(PCH_PP_CONTROL, pp);
POSTING_READ(PCH_PP_CONTROL);
}
} }
static void ironlake_edp_backlight_on (struct intel_dp *intel_dp) static void ironlake_edp_backlight_on (struct intel_dp *intel_dp)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment