File 0155-drm-i915-edp-Get-the-Panel-Power-Off-timestamp-after.patch of Package drm.openSUSE_Leap_42.3_Update

From 7c82795f9612c58ce1969486ad2a9e7847cf6bde Mon Sep 17 00:00:00 2001
From: Manasi Navare <>
Date: Wed, 4 Oct 2017 09:48:26 -0700
Subject: [PATCH] drm/i915/edp: Get the Panel Power Off timestamp after panel
 is off

commit d7ba25bd9ef802ff02414e9105f4222d1795f27a upstream.

Kernel stores the time in jiffies at which the eDP panel is turned
off. This should be obtained after the panel is off (after the
wait_panel_off). When we next attempt to turn the panel on, we use the
difference between the timestamp at which we want to turn the panel on
and timestamp at which panel was turned off to ensure that this is equal
to panel power cycle delay and if not we wait for the remaining
time. Not waiting for the panel power cycle delay can cause the panel to
not turn on giving rise to AUX timeouts for the attempted AUX

* Separate lines for bugzilla (Jani Nikula)
* Suggested by tag (Daniel Vetter)

Cc: Daniel Vetter <>
Cc: Jani Nikula <>
Suggested-by: Daniel Vetter <>
Signed-off-by: Manasi Navare <>
Reviewed-by: Daniel Vetter <>
Reviewed-by: Jani Nikula <>
Signed-off-by: Jani Nikula <>
(cherry picked from commit cbacf02e7796fea02e5c6e46c90ed7cbe9e6f2c0)
Signed-off-by: Rodrigo Vivi <>
Signed-off-by: Greg Kroah-Hartman <>
 drivers/gpu/drm/i915/intel_dp.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/drivers/gpu/drm/i915/intel_dp.c
+++ b/drivers/gpu/drm/i915/intel_dp.c
@@ -2193,8 +2193,8 @@ static void edp_panel_off(struct intel_d
 	I915_WRITE(pp_ctrl_reg, pp);
-	intel_dp->panel_power_off_time = ktime_get_boottime();
+	intel_dp->panel_power_off_time = ktime_get_boottime();
 	/* We got a reference when we enabled the VDD. */
 	power_domain = intel_display_port_aux_power_domain(intel_encoder);