From: Ville Syrjälä <[email protected]>

Currently we do all kinds vdd frobbing from both the modeset and
->detect. ->detect isn't protected by the connection_mutex as the
current locking stuff seems to expect. Switch it all over the
mode_config.mutex instead since we hold that in both places.

In the long run we'll maybe need a private vdd mutex or somehting.

Signed-off-by: Ville Syrjälä <[email protected]>
---
 drivers/gpu/drm/i915/intel_dp.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c
index a825ff1..03ee9e8 100644
--- a/drivers/gpu/drm/i915/intel_dp.c
+++ b/drivers/gpu/drm/i915/intel_dp.c
@@ -1192,7 +1192,7 @@ static void edp_panel_vdd_off_sync(struct intel_dp 
*intel_dp)
        u32 pp;
        u32 pp_stat_reg, pp_ctrl_reg;
 
-       WARN_ON(!drm_modeset_is_locked(&dev->mode_config.connection_mutex));
+       WARN_ON(!mutex_is_locked(&dev->mode_config.mutex));
 
        if (!intel_dp->want_panel_vdd && edp_have_panel_vdd(intel_dp)) {
                struct intel_digital_port *intel_dig_port =
@@ -1229,9 +1229,9 @@ static void edp_panel_vdd_work(struct work_struct *__work)
                                                 struct intel_dp, 
panel_vdd_work);
        struct drm_device *dev = intel_dp_to_dev(intel_dp);
 
-       drm_modeset_lock(&dev->mode_config.connection_mutex, NULL);
+       mutex_lock(&dev->mode_config.mutex);
        edp_panel_vdd_off_sync(intel_dp);
-       drm_modeset_unlock(&dev->mode_config.connection_mutex);
+       mutex_unlock(&dev->mode_config.mutex);
 }
 
 static void edp_panel_vdd_off(struct intel_dp *intel_dp, bool sync)
-- 
1.8.5.5

_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

Reply via email to