From 9572d05f34f2e76f87e26b6e2915a7ec1d2a4a5e Mon Sep 17 00:00:00 2001 From: jsg Date: Mon, 11 Apr 2022 03:57:39 +0000 Subject: [PATCH] drm/i915/display: Fix HPD short pulse handling for eDP From Jose Souza 7ff346ee019bcf3b008a56a43b7aac45e771479b in linux 5.15.y/5.15.33 3a84fd1ed53582b31e843a152ee3219e9e4ccb8c in mainline linux --- sys/dev/pci/drm/i915/display/intel_dp.c | 2 +- sys/dev/pci/drm/i915/display/intel_pps.c | 6 +++--- sys/dev/pci/drm/i915/display/intel_pps.h | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/sys/dev/pci/drm/i915/display/intel_dp.c b/sys/dev/pci/drm/i915/display/intel_dp.c index b5fc1bc3c42..465cb36bb22 100644 --- a/sys/dev/pci/drm/i915/display/intel_dp.c +++ b/sys/dev/pci/drm/i915/display/intel_dp.c @@ -4601,7 +4601,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 diff --git a/sys/dev/pci/drm/i915/display/intel_pps.c b/sys/dev/pci/drm/i915/display/intel_pps.c index 697ff05dee1..16e6c11213c 100644 --- a/sys/dev/pci/drm/i915/display/intel_pps.c +++ b/sys/dev/pci/drm/i915/display/intel_pps.c @@ -1074,14 +1074,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; diff --git a/sys/dev/pci/drm/i915/display/intel_pps.h b/sys/dev/pci/drm/i915/display/intel_pps.h index fbbcca782e7..9fe7be4fe86 100644 --- a/sys/dev/pci/drm/i915/display/intel_pps.h +++ b/sys/dev/pci/drm/i915/display/intel_pps.h @@ -36,7 +36,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); -- 2.20.1