Patch "drm/i915/ddi: Fix eDP VDD handling during booting and suspend/resume" has been added to the 4.4-stable tree
Subsystems (3)
This is a note to let you know that I've just added the patch titled
drm/i915/ddi: Fix eDP VDD handling during booting and suspend/resume
to the 4.4-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
drm-i915-ddi-fix-edp-vdd-handling-during-booting-and-suspend-resume.patch
and it can be found in the queue-4.4 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.
Quoted 1 line
From
5eaa60c7109b40f17ac81090bc8b90482da76cd1Mon Sep 17 00:00:00 2001
From: Imre Deak <[email protected]>
Date: Mon, 18 Apr 2016 10:04:21 +0300
Subject: drm/i915/ddi: Fix eDP VDD handling during booting and suspend/resume
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
From: Imre Deak <[email protected]>
commit 5eaa60c7109b40f17ac81090bc8b90482da76cd1 upstream.
The driver's VDD on/off logic assumes that whenever the VDD is on we also hold an AUX power domain reference. Since BIOS can leave the VDD on during booting and resuming and on DDI platforms we won't take a corresponding power reference, the above assumption won't hold on those platforms and an eventual delayed VDD off work will do an extraneous AUX power domain put resulting in a refcount underflow. Fix this the same way we did this for non-DDI DP encoders:
commit 6d93c0c41760c0 ("drm/i915: fix VDD state tracking after system resume")
At the same time call the DP encoder suspend handler the same way as the non-DDI DP encoders do to flush any pending VDD off work. Leaving the work running may cause a HW access where we don't expect this (at a point where power domains are suspended already).
While at it remove an unnecessary function call indirection.
This fixed for me AUX refcount underflow problems on BXT during suspend/resume.
--- drivers/gpu/drm/i915/intel_ddi.c | 10 +++------- drivers/gpu/drm/i915/intel_dp.c | 4 ++-- drivers/gpu/drm/i915/intel_drv.h | 2 ++ 3 files changed, 7 insertions(+), 9 deletions(-)
drivers/gpu/drm/i915/intel_ddi.c +3 -7
@@ -3188,12 +3188,6 @@ void intel_ddi_get_config(struct intel_eintel_ddi_clock_get (encoder, pipe_config); } -static void intel_ddi_destroy (struct drm_encoder *encoder) -{ -/* HDMI has nothing special to destroy, so we can go with this. */ -intel_dp_encoder_destroy (encoder); -} -static bool intel_ddi_compute_config (struct intel_encoder *encoder,struct intel_crtc_state *pipe_config) {
@@ -3212,7 +3206,8 @@ static bool intel_ddi_compute_config(str }static const struct drm_encoder_funcs intel_ddi_funcs = { - .destroy = intel_ddi_destroy, + .reset = intel_dp_encoder_reset, + .destroy = intel_dp_encoder_destroy, }; static struct intel_connector *
@@ -3284,6 +3279,7 @@ void intel_ddi_init(struct drm_device *d intel_encoder->post_disable = intel_ddi_post_disable; intel_encoder->get_hw_state = intel_ddi_get_hw_state; intel_encoder->get_config = intel_ddi_get_config; + intel_encoder->suspend = intel_dp_encoder_suspend; intel_dig_port->port = port; intel_dig_port->saved_port_bits = I915_READ(DDI_BUF_CTL(port)) &
drivers/gpu/drm/i915/intel_dp.c +2 -2
@@ -5035,7 +5035,7 @@ void intel_dp_encoder_destroy(struct drmkfree (intel_dig_port); } -static void intel_dp_encoder_suspend (struct intel_encoder *intel_encoder) +void intel_dp_encoder_suspend (struct intel_encoder *intel_encoder) {struct intel_dp *intel_dp =enc_to_intel_dp (&intel_encoder->base);
@@ -5077,7 +5077,7 @@ static void intel_edp_panel_vdd_sanitizeedp_panel_vdd_schedule_off (intel_dp); } -static void intel_dp_encoder_reset (struct drm_encoder *encoder) +void intel_dp_encoder_reset (struct drm_encoder *encoder) {struct intel_dp *intel_dp;
drivers/gpu/drm/i915/intel_drv.h +2 -0
@@ -1204,6 +1204,8 @@ void intel_dp_set_link_params(struct intvoid intel_dp_start_link_train (struct intel_dp *intel_dp);void intel_dp_stop_link_train (struct intel_dp *intel_dp);void intel_dp_sink_dpms (struct intel_dp *intel_dp,int mode); +void intel_dp_encoder_reset (struct drm_encoder *encoder); +void intel_dp_encoder_suspend (struct intel_encoder *intel_encoder);void intel_dp_encoder_destroy (struct drm_encoder *encoder);int intel_dp_sink_crc (struct intel_dp *intel_dp,u8 *crc); bool intel_dp_compute_config(struct intel_encoder *encoder,
Patches currently in stable-queue which might be from [email protected] are
queue-4.4/drm-i915-ddi-fix-edp-vdd-handling-during-booting-and-suspend-resume.patch