From 692376ecf7d274bbb6cae039e45444226624e0c6 Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Sun, 22 Apr 2012 10:10:01 +0100 Subject: [PATCH] drm/i915: check combination of VBT and register panel sequence timings for eDP Regression from commit bfa3384a9a84aaaa59443bbd776c142e7dba4b0f Author: Jesse Barnes Date: Tue Apr 10 11:58:04 2012 -0700 drm/i915: check PPS regs for sanity when using eDP Reported-by: Oleksij Rempel References: https://bugs.freedesktop.org/show_bug.cgi?id=48652 --- drivers/gpu/drm/i915/intel_dp.c | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c index 44500ea..09a6554 100644 --- a/drivers/gpu/drm/i915/intel_dp.c +++ b/drivers/gpu/drm/i915/intel_dp.c @@ -2485,13 +2485,6 @@ intel_dp_init(struct drm_device *dev, int output_reg) pp_off = I915_READ(PCH_PP_OFF_DELAYS); pp_div = I915_READ(PCH_PP_DIVISOR); - if (!pp_on || !pp_off || !pp_div) { - DRM_INFO("bad panel power sequencing delays, disabling panel\n"); - intel_dp_encoder_destroy(&intel_dp->base.base); - intel_dp_destroy(&intel_connector->base); - return; - } - /* Pull timing values out of registers */ cur.t1_t3 = (pp_on & PANEL_POWER_UP_DELAY_MASK) >> PANEL_POWER_UP_DELAY_SHIFT; @@ -2531,6 +2524,18 @@ intel_dp_init(struct drm_device *dev, int output_reg) DRM_DEBUG_KMS("backlight on delay %d, off delay %d\n", intel_dp->backlight_on_delay, intel_dp->backlight_off_delay); + /* Sanity check that we have legal sequence timings */ + if (intel_dp->panel_power_up_delay == 0 || + intel_dp->backlight_on_delay == 0 || + intel_dp->backlight_off_delay == 0 || + intel_dp->panel_power_down_delay == 0 || + intel_dp->panel_power_cycle_delay == 0) { + DRM_INFO("bad panel power sequencing delays, disabling panel\n"); + intel_dp_encoder_destroy(&intel_dp->base.base); + intel_dp_destroy(&intel_connector->base); + return; + } + ironlake_edp_panel_vdd_on(intel_dp); ret = intel_dp_get_dpcd(intel_dp); ironlake_edp_panel_vdd_off(intel_dp, false); -- 1.7.10