Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 15e899a0 authored by Ville Syrjälä's avatar Ville Syrjälä Committed by Daniel Vetter
Browse files

drm/i915: Warn about want_panel_vdd in edp_panel_vdd_off_sync()



If we force vdd off warn if someone is still using it. With this
change the delayed vdd off work needs to check want_panel_vdd
itself to make sure it doesn't try to turn vdd off when someone
is using it.

Signed-off-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
parent be2c9196
Loading
Loading
Loading
Loading
+5 −2
Original line number Diff line number Diff line
@@ -1241,7 +1241,9 @@ static void edp_panel_vdd_off_sync(struct intel_dp *intel_dp)

	WARN_ON(!drm_modeset_is_locked(&dev->mode_config.connection_mutex));

	if (intel_dp->want_panel_vdd || !edp_have_panel_vdd(intel_dp))
	WARN_ON(intel_dp->want_panel_vdd);

	if (!edp_have_panel_vdd(intel_dp))
		return;

	DRM_DEBUG_KMS("Turning eDP VDD off\n");
@@ -1273,6 +1275,7 @@ static void edp_panel_vdd_work(struct work_struct *__work)
	struct drm_device *dev = intel_dp_to_dev(intel_dp);

	drm_modeset_lock(&dev->mode_config.connection_mutex, NULL);
	if (!intel_dp->want_panel_vdd)
		edp_panel_vdd_off_sync(intel_dp);
	drm_modeset_unlock(&dev->mode_config.connection_mutex);
}