From: Keith Packard Date: Thu, 29 Sep 2011 23:51:26 +0000 (-0700) Subject: drm/i915: No need to wait for eDP power off delay if panel is on X-Git-Tag: MMI-PSA29.97-13-9~18200^2~2^2~45^2 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=32ce697c53f41290c3a2d3807b521b0fe4f42d2a;p=GitHub%2FMotorolaMobilityLLC%2Fkernel-slsi.git drm/i915: No need to wait for eDP power off delay if panel is on If the panel is powered up, there's no need to delay for the 'off' interval when turning the panel on. Signed-off-by: Keith Packard --- diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c index f5303e18e791..6db2a2d824c0 100644 --- a/drivers/gpu/drm/i915/intel_dp.c +++ b/drivers/gpu/drm/i915/intel_dp.c @@ -869,7 +869,16 @@ static void ironlake_wait_panel_off(struct intel_dp *intel_dp) { unsigned long off_time; unsigned long delay; + DRM_DEBUG_KMS("Wait for panel power off time\n"); + + if (ironlake_edp_have_panel_power(intel_dp) || + ironlake_edp_have_panel_vdd(intel_dp)) + { + DRM_DEBUG_KMS("Panel still on, no delay needed\n"); + return; + } + off_time = intel_dp->panel_off_jiffies + msecs_to_jiffies(intel_dp->panel_power_down_delay); if (time_after(jiffies, off_time)) { DRM_DEBUG_KMS("Time already passed");