diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c index 0b2e842..b80162e 100644 --- a/drivers/gpu/drm/i915/intel_dp.c +++ b/drivers/gpu/drm/i915/intel_dp.c @@ -1150,8 +1150,18 @@ static void ironlake_panel_vdd_work(struct work_struct *__work) struct intel_dp, panel_vdd_work); struct drm_device *dev = intel_dp_to_dev(intel_dp); + DRM_DEBUG_KMS("XXX: dev=%p intel_dp=%p\n", dev, intel_dp); + + if (mutex_is_locked(&dev->mode_config.mutex)) { + DRM_DEBUG_KMS("XXX: mutex_is_locked, trying to unlock\n"); + mutex_unlock(&dev->mode_config.mutex); + } + + DRM_DEBUG_KMS("XXX: before lock mode_config\n"); mutex_lock(&dev->mode_config.mutex); + DRM_DEBUG_KMS("XXX: inside lock mode_config\n"); ironlake_panel_vdd_off_sync(intel_dp); + DRM_DEBUG_KMS("XXX: leaving lock mode_config\n"); mutex_unlock(&dev->mode_config.mutex); } @@ -1172,6 +1182,7 @@ void ironlake_edp_panel_vdd_off(struct intel_dp *intel_dp, bool sync) * time from now (relative to the power down delay) * to keep the panel power up across a sequence of operations */ + DRM_DEBUG_KMS("XXX: schedule work (msecs_to_jiffies) intel_dp=%p\n", intel_dp); schedule_delayed_work(&intel_dp->panel_vdd_work, msecs_to_jiffies(intel_dp->panel_power_cycle_delay * 5)); } @@ -3272,9 +3283,13 @@ void intel_dp_encoder_destroy(struct drm_encoder *encoder) i2c_del_adapter(&intel_dp->adapter); drm_encoder_cleanup(encoder); if (is_edp(intel_dp)) { + DRM_DEBUG_KMS("XXX: cancel_delayed_work_sync intel_dp=%p dev=%p\n", intel_dp, dev); cancel_delayed_work_sync(&intel_dp->panel_vdd_work); + DRM_DEBUG_KMS("XXX: before lock mode_config\n"); mutex_lock(&dev->mode_config.mutex); + DRM_DEBUG_KMS("XXX: inside lock mode_config\n"); ironlake_panel_vdd_off_sync(intel_dp); + DRM_DEBUG_KMS("XXX: leaving lock mode_config\n"); mutex_unlock(&dev->mode_config.mutex); } kfree(intel_dig_port); @@ -3655,6 +3670,7 @@ intel_dp_init_connector(struct intel_digital_port *intel_dig_port, connector->interlace_allowed = true; connector->doublescan_allowed = 0; + DRM_DEBUG_KMS("XXX: INIT_DELAYED_WORK intel_dp=%p dev=%p\n", intel_dp, dev); INIT_DELAYED_WORK(&intel_dp->panel_vdd_work, ironlake_panel_vdd_work); @@ -3717,9 +3733,13 @@ intel_dp_init_connector(struct intel_digital_port *intel_dig_port, if (!intel_edp_init_connector(intel_dp, intel_connector)) { i2c_del_adapter(&intel_dp->adapter); if (is_edp(intel_dp)) { + DRM_DEBUG_KMS("XXX: cancel_delayed_work_sync intel_dp=%p dev=%p\n", intel_dp, dev); cancel_delayed_work_sync(&intel_dp->panel_vdd_work); + DRM_DEBUG_KMS("XXX: before lock mode_config\n"); mutex_lock(&dev->mode_config.mutex); + DRM_DEBUG_KMS("XXX: inside lock mode_config\n"); ironlake_panel_vdd_off_sync(intel_dp); + DRM_DEBUG_KMS("XXX: leaving lock mode_config\n"); mutex_unlock(&dev->mode_config.mutex); } drm_sysfs_connector_remove(connector);