]> git.itanic.dy.fi Git - linux-stable/commitdiff
drm/i915/display: Fix HPD short pulse handling for eDP
authorJosé Roberto de Souza <jose.souza@intel.com>
Fri, 11 Mar 2022 18:51:48 +0000 (10:51 -0800)
committerJoonas Lahtinen <joonas.lahtinen@linux.intel.com>
Wed, 16 Mar 2022 06:17:36 +0000 (08:17 +0200)
Commit 13ea6db2cf24 ("drm/i915/edp: Ignore short pulse when panel
powered off") completely broke short pulse handling for eDP as it is
usually generated by sink when it is displaying image and there is
some error or status that source needs to handle.

When power panel is enabled, this state is enough to power aux
transactions and VDD override is disabled, so intel_pps_have_power()
is always returning false causing short pulses to be ignored.

So here better naming this function that intends to check if aux
lines are powered to avoid the endless cycle mentioned in the commit
being fixed and fixing the check for what it is intended.

v2:
- renamed to intel_pps_have_panel_power_or_vdd()
- fixed indentation

Fixes: 13ea6db2cf24 ("drm/i915/edp: Ignore short pulse when panel powered off")
Cc: Anshuman Gupta <anshuman.gupta@intel.com>
Cc: Jani Nikula <jani.nikula@intel.com>
Cc: Uma Shankar <uma.shankar@intel.com>
Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20220311185149.110527-1-jose.souza@intel.com
(cherry picked from commit 8f0c1c0949b609acfad62b8d5f742a3b5e7b05ab)
Signed-off-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
drivers/gpu/drm/i915/display/intel_dp.c
drivers/gpu/drm/i915/display/intel_pps.c
drivers/gpu/drm/i915/display/intel_pps.h

index 1046e7fe310a9e61c3edd5c1f003823dee95e447..d667657e360624eeb80543cab361361891ae11eb 100644 (file)
@@ -4863,7 +4863,7 @@ intel_dp_hpd_pulse(struct intel_digital_port *dig_port, bool long_hpd)
        struct intel_dp *intel_dp = &dig_port->dp;
 
        if (dig_port->base.type == INTEL_OUTPUT_EDP &&
-           (long_hpd || !intel_pps_have_power(intel_dp))) {
+           (long_hpd || !intel_pps_have_panel_power_or_vdd(intel_dp))) {
                /*
                 * vdd off can generate a long/short pulse on eDP which
                 * would require vdd on to handle it, and thus we
index 9c986e8932f87109a551ed320231012c466b1b8e..64bd4ca0edd47bc73f1dc66face7b66089e561ab 100644 (file)
@@ -1075,14 +1075,14 @@ static void intel_pps_vdd_sanitize(struct intel_dp *intel_dp)
        edp_panel_vdd_schedule_off(intel_dp);
 }
 
-bool intel_pps_have_power(struct intel_dp *intel_dp)
+bool intel_pps_have_panel_power_or_vdd(struct intel_dp *intel_dp)
 {
        intel_wakeref_t wakeref;
        bool have_power = false;
 
        with_intel_pps_lock(intel_dp, wakeref) {
-               have_power = edp_have_panel_power(intel_dp) &&
-                                                 edp_have_panel_vdd(intel_dp);
+               have_power = edp_have_panel_power(intel_dp) ||
+                            edp_have_panel_vdd(intel_dp);
        }
 
        return have_power;
index fbb47f6f453e49353430ff00a406b2c2f732d90a..e64144659d31fe50406513c092330dae3f38d08c 100644 (file)
@@ -37,7 +37,7 @@ void intel_pps_vdd_on(struct intel_dp *intel_dp);
 void intel_pps_on(struct intel_dp *intel_dp);
 void intel_pps_off(struct intel_dp *intel_dp);
 void intel_pps_vdd_off_sync(struct intel_dp *intel_dp);
-bool intel_pps_have_power(struct intel_dp *intel_dp);
+bool intel_pps_have_panel_power_or_vdd(struct intel_dp *intel_dp);
 void intel_pps_wait_power_cycle(struct intel_dp *intel_dp);
 
 void intel_pps_init(struct intel_dp *intel_dp);