Skip to content

Commit 3a84fd1

Browse files
zehortigozajlahtine-intel
authored andcommitted
drm/i915/display: Fix HPD short pulse handling for eDP
Commit 13ea6db ("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: 13ea6db ("drm/i915/edp: Ignore short pulse when panel powered off") Cc: Anshuman Gupta <[email protected]> Cc: Jani Nikula <[email protected]> Cc: Uma Shankar <[email protected]> Cc: Ville Syrjälä <[email protected]> Reviewed-by: Ville Syrjälä <[email protected]> Signed-off-by: José Roberto de Souza <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected] (cherry picked from commit 8f0c1c0) Signed-off-by: Joonas Lahtinen <[email protected]>
1 parent 3886a86 commit 3a84fd1

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

drivers/gpu/drm/i915/display/intel_dp.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4863,7 +4863,7 @@ intel_dp_hpd_pulse(struct intel_digital_port *dig_port, bool long_hpd)
48634863
struct intel_dp *intel_dp = &dig_port->dp;
48644864

48654865
if (dig_port->base.type == INTEL_OUTPUT_EDP &&
4866-
(long_hpd || !intel_pps_have_power(intel_dp))) {
4866+
(long_hpd || !intel_pps_have_panel_power_or_vdd(intel_dp))) {
48674867
/*
48684868
* vdd off can generate a long/short pulse on eDP which
48694869
* would require vdd on to handle it, and thus we

drivers/gpu/drm/i915/display/intel_pps.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1075,14 +1075,14 @@ static void intel_pps_vdd_sanitize(struct intel_dp *intel_dp)
10751075
edp_panel_vdd_schedule_off(intel_dp);
10761076
}
10771077

1078-
bool intel_pps_have_power(struct intel_dp *intel_dp)
1078+
bool intel_pps_have_panel_power_or_vdd(struct intel_dp *intel_dp)
10791079
{
10801080
intel_wakeref_t wakeref;
10811081
bool have_power = false;
10821082

10831083
with_intel_pps_lock(intel_dp, wakeref) {
1084-
have_power = edp_have_panel_power(intel_dp) &&
1085-
edp_have_panel_vdd(intel_dp);
1084+
have_power = edp_have_panel_power(intel_dp) ||
1085+
edp_have_panel_vdd(intel_dp);
10861086
}
10871087

10881088
return have_power;

drivers/gpu/drm/i915/display/intel_pps.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ void intel_pps_vdd_on(struct intel_dp *intel_dp);
3737
void intel_pps_on(struct intel_dp *intel_dp);
3838
void intel_pps_off(struct intel_dp *intel_dp);
3939
void intel_pps_vdd_off_sync(struct intel_dp *intel_dp);
40-
bool intel_pps_have_power(struct intel_dp *intel_dp);
40+
bool intel_pps_have_panel_power_or_vdd(struct intel_dp *intel_dp);
4141
void intel_pps_wait_power_cycle(struct intel_dp *intel_dp);
4242

4343
void intel_pps_init(struct intel_dp *intel_dp);

0 commit comments

Comments
 (0)