After a follow-up change on non-eDP outputs
intel_pps_vdd_{on,off}_unlocked() can be called without the PPS lock
held, allow for this.

Suggested-by: Jani Nikula <[email protected]>
Signed-off-by: Imre Deak <[email protected]>
---
 drivers/gpu/drm/i915/display/intel_pps.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/gpu/drm/i915/display/intel_pps.c 
b/drivers/gpu/drm/i915/display/intel_pps.c
index 617ce49931726..c883e872c9c82 100644
--- a/drivers/gpu/drm/i915/display/intel_pps.c
+++ b/drivers/gpu/drm/i915/display/intel_pps.c
@@ -744,11 +744,11 @@ bool intel_pps_vdd_on_unlocked(struct intel_dp *intel_dp)
        i915_reg_t pp_stat_reg, pp_ctrl_reg;
        bool need_to_disable = !intel_dp->pps.want_panel_vdd;
 
-       lockdep_assert_held(&display->pps.mutex);
-
        if (!intel_dp_is_edp(intel_dp))
                return false;
 
+       lockdep_assert_held(&display->pps.mutex);
+
        cancel_delayed_work(&intel_dp->pps.panel_vdd_work);
        intel_dp->pps.want_panel_vdd = true;
 
@@ -925,11 +925,11 @@ void intel_pps_vdd_off_unlocked(struct intel_dp 
*intel_dp, bool sync)
 {
        struct intel_display *display = to_intel_display(intel_dp);
 
-       lockdep_assert_held(&display->pps.mutex);
-
        if (!intel_dp_is_edp(intel_dp))
                return;
 
+       lockdep_assert_held(&display->pps.mutex);
+
        INTEL_DISPLAY_STATE_WARN(display, !intel_dp->pps.want_panel_vdd,
                                 "[ENCODER:%d:%s] %s VDD not forced on",
                                 dp_to_dig_port(intel_dp)->base.base.base.id,
-- 
2.44.2

Reply via email to