[1/1] UBUNTU: SAUCE: Revert "drm/i915/dp: Send DPCD ON for MST before phy_up"

Message ID 20190129113700.21201-2-kai.heng.feng@canonical.com
State New
Headers show
Series
  • Urgent fix for docking station
Related show

Commit Message

Kai-Heng Feng Jan. 29, 2019, 11:37 a.m.
BugLink: https://bugs.launchpad.net/bugs/1813663

This reverts commit e417085e79136d9f9559a956bd4bc2c34d6a9180.

Signed-off-by: Kai-Heng Feng <kai.heng.feng@canonical.com>
---
 drivers/gpu/drm/i915/intel_ddi.c    | 8 ++------
 drivers/gpu/drm/i915/intel_dp_mst.c | 5 -----
 2 files changed, 2 insertions(+), 11 deletions(-)

Comments

Stefan Bader Jan. 29, 2019, 2:48 p.m. | #1
On 29.01.19 12:37, Kai-Heng Feng wrote:
> BugLink: https://bugs.launchpad.net/bugs/1813663
> 
> This reverts commit e417085e79136d9f9559a956bd4bc2c34d6a9180.
> 
> Signed-off-by: Kai-Heng Feng <kai.heng.feng@canonical.com>
Acked-by: Stefan Bader <stefan.bader@canonical.com>
> ---

If I read the description of the reverted patch correctly it might be improving
some issues when enabling some ports(?), so long-term something we should pick
up. But right now it seems to regress more people until we figure out the
correct backport/dependencies.

So verified undo of regression counts more than potential improvement. Just as a
note we should duplicate all the other reports against this one.

-Stefan

>  drivers/gpu/drm/i915/intel_ddi.c    | 8 ++------
>  drivers/gpu/drm/i915/intel_dp_mst.c | 5 -----
>  2 files changed, 2 insertions(+), 11 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/intel_ddi.c b/drivers/gpu/drm/i915/intel_ddi.c
> index a890b031cfc2..38e53d6b8127 100644
> --- a/drivers/gpu/drm/i915/intel_ddi.c
> +++ b/drivers/gpu/drm/i915/intel_ddi.c
> @@ -2208,8 +2208,7 @@ static void intel_ddi_pre_enable_dp(struct intel_encoder *encoder,
>  		intel_prepare_dp_ddi_buffers(encoder);
>  
>  	intel_ddi_init_dp_buf_reg(encoder);
> -	if (!is_mst)
> -		intel_dp_sink_dpms(intel_dp, DRM_MODE_DPMS_ON);
> +	intel_dp_sink_dpms(intel_dp, DRM_MODE_DPMS_ON);
>  	intel_dp_start_link_train(intel_dp);
>  	if (port != PORT_A || INTEL_GEN(dev_priv) >= 9)
>  		intel_dp_stop_link_train(intel_dp);
> @@ -2294,15 +2293,12 @@ static void intel_ddi_post_disable_dp(struct intel_encoder *encoder,
>  	struct drm_i915_private *dev_priv = to_i915(encoder->base.dev);
>  	struct intel_digital_port *dig_port = enc_to_dig_port(&encoder->base);
>  	struct intel_dp *intel_dp = &dig_port->dp;
> -	bool is_mst = intel_crtc_has_type(old_crtc_state,
> -					  INTEL_OUTPUT_DP_MST);
>  
>  	/*
>  	 * Power down sink before disabling the port, otherwise we end
>  	 * up getting interrupts from the sink on detecting link loss.
>  	 */
> -	if (!is_mst)
> -		intel_dp_sink_dpms(intel_dp, DRM_MODE_DPMS_OFF);
> +	intel_dp_sink_dpms(intel_dp, DRM_MODE_DPMS_OFF);
>  
>  	intel_disable_ddi_buf(encoder);
>  
> diff --git a/drivers/gpu/drm/i915/intel_dp_mst.c b/drivers/gpu/drm/i915/intel_dp_mst.c
> index 824032e87c77..772521440a9f 100644
> --- a/drivers/gpu/drm/i915/intel_dp_mst.c
> +++ b/drivers/gpu/drm/i915/intel_dp_mst.c
> @@ -173,7 +173,6 @@ static void intel_mst_post_disable_dp(struct intel_encoder *encoder,
>  
>  	intel_mst->connector = NULL;
>  	if (intel_dp->active_mst_links == 0) {
> -		intel_dp_sink_dpms(intel_dp, DRM_MODE_DPMS_OFF);
>  		intel_dig_port->base.post_disable(&intel_dig_port->base,
>  						  NULL, NULL);
>  	}
> @@ -202,11 +201,7 @@ static void intel_mst_pre_enable_dp(struct intel_encoder *encoder,
>  
>  	DRM_DEBUG_KMS("active links %d\n", intel_dp->active_mst_links);
>  
> -	if (intel_dp->active_mst_links == 0)
> -		intel_dp_sink_dpms(intel_dp, DRM_MODE_DPMS_ON);
> -
>  	drm_dp_send_power_updown_phy(&intel_dp->mst_mgr, connector->port, true);
> -
>  	if (intel_dp->active_mst_links == 0)
>  		intel_dig_port->base.pre_enable(&intel_dig_port->base,
>  						pipe_config, NULL);
>

Patch

diff --git a/drivers/gpu/drm/i915/intel_ddi.c b/drivers/gpu/drm/i915/intel_ddi.c
index a890b031cfc2..38e53d6b8127 100644
--- a/drivers/gpu/drm/i915/intel_ddi.c
+++ b/drivers/gpu/drm/i915/intel_ddi.c
@@ -2208,8 +2208,7 @@  static void intel_ddi_pre_enable_dp(struct intel_encoder *encoder,
 		intel_prepare_dp_ddi_buffers(encoder);
 
 	intel_ddi_init_dp_buf_reg(encoder);
-	if (!is_mst)
-		intel_dp_sink_dpms(intel_dp, DRM_MODE_DPMS_ON);
+	intel_dp_sink_dpms(intel_dp, DRM_MODE_DPMS_ON);
 	intel_dp_start_link_train(intel_dp);
 	if (port != PORT_A || INTEL_GEN(dev_priv) >= 9)
 		intel_dp_stop_link_train(intel_dp);
@@ -2294,15 +2293,12 @@  static void intel_ddi_post_disable_dp(struct intel_encoder *encoder,
 	struct drm_i915_private *dev_priv = to_i915(encoder->base.dev);
 	struct intel_digital_port *dig_port = enc_to_dig_port(&encoder->base);
 	struct intel_dp *intel_dp = &dig_port->dp;
-	bool is_mst = intel_crtc_has_type(old_crtc_state,
-					  INTEL_OUTPUT_DP_MST);
 
 	/*
 	 * Power down sink before disabling the port, otherwise we end
 	 * up getting interrupts from the sink on detecting link loss.
 	 */
-	if (!is_mst)
-		intel_dp_sink_dpms(intel_dp, DRM_MODE_DPMS_OFF);
+	intel_dp_sink_dpms(intel_dp, DRM_MODE_DPMS_OFF);
 
 	intel_disable_ddi_buf(encoder);
 
diff --git a/drivers/gpu/drm/i915/intel_dp_mst.c b/drivers/gpu/drm/i915/intel_dp_mst.c
index 824032e87c77..772521440a9f 100644
--- a/drivers/gpu/drm/i915/intel_dp_mst.c
+++ b/drivers/gpu/drm/i915/intel_dp_mst.c
@@ -173,7 +173,6 @@  static void intel_mst_post_disable_dp(struct intel_encoder *encoder,
 
 	intel_mst->connector = NULL;
 	if (intel_dp->active_mst_links == 0) {
-		intel_dp_sink_dpms(intel_dp, DRM_MODE_DPMS_OFF);
 		intel_dig_port->base.post_disable(&intel_dig_port->base,
 						  NULL, NULL);
 	}
@@ -202,11 +201,7 @@  static void intel_mst_pre_enable_dp(struct intel_encoder *encoder,
 
 	DRM_DEBUG_KMS("active links %d\n", intel_dp->active_mst_links);
 
-	if (intel_dp->active_mst_links == 0)
-		intel_dp_sink_dpms(intel_dp, DRM_MODE_DPMS_ON);
-
 	drm_dp_send_power_updown_phy(&intel_dp->mst_mgr, connector->port, true);
-
 	if (intel_dp->active_mst_links == 0)
 		intel_dig_port->base.pre_enable(&intel_dig_port->base,
 						pipe_config, NULL);