commit 3302d985e1afbe68dbf447006ca8e0a5df626882 Author: Jesse Barnes Date: Mon Oct 11 12:22:49 2010 -0700 drm/i915/dp: ignore ready bit when checking for panel idleness In some configs, the panel will be ready when we power it up, so ignore the ready bit or we may indicate a timeout when none was necessary. Signed-off-by: Jesse Barnes diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c index 8e019c8..f724d5b 100644 --- a/drivers/gpu/drm/i915/intel_dp.c +++ b/drivers/gpu/drm/i915/intel_dp.c @@ -790,7 +790,8 @@ static bool ironlake_edp_panel_on (struct intel_dp *intel_dp) { struct drm_device *dev = intel_dp->base.base.dev; struct drm_i915_private *dev_priv = dev->dev_private; - u32 pp, idle_on_mask = PP_ON | PP_SEQUENCE_STATE_ON_IDLE; + u32 pp, idle_on = PP_ON | PP_SEQUENCE_STATE_ON_IDLE; + u32 idle_on_mask = PP_ON | PP_SEQUENCE_STATE_MASK; if (I915_READ(PCH_PP_STATUS) & PP_ON) return true; @@ -811,7 +812,7 @@ static bool ironlake_edp_panel_on (struct intel_dp *intel_dp) */ msleep(300); - if (wait_for(I915_READ(PCH_PP_STATUS) == idle_on_mask, + if (wait_for((I915_READ(PCH_PP_STATUS) & idle_on_mask) == idle_on, 5000)) DRM_ERROR("panel on wait timed out: 0x%08x\n", I915_READ(PCH_PP_STATUS));