All of lore.kernel.org
 help / color / mirror / Atom feed
* [stable:v4.15] drm/i915/dp: Write to SET_POWER dpcd to enable MST hub.
@ 2018-03-29 19:51 ` Dhinakaran Pandiyan
  0 siblings, 0 replies; 7+ messages in thread
From: Dhinakaran Pandiyan @ 2018-03-29 19:51 UTC (permalink / raw)
  To: intel-gfx
  Cc: Dhinakaran Pandiyan, Ville Syrjälä, Jani Nikula, stable

If bios sets up an MST output and hardware state readout code sees this is
an SST configuration, when disabling the encoder we end up calling
->post_disable_dp() hook instead of the MST version. Consequently, we write
to the DP_SET_POWER dpcd to set it D3 state. Further along when we try
enable the encoder in MST mode, POWER_UP_PHY transaction fails to power up
the MST hub. This results in continuous link training failures which keep
the system busy delaying boot. We could identify bios MST boot discrepancy
and handle it accordingly but a simple way to solve this is to write to the
DP_SET_POWER dpcd for MST too.

v2: Rebased on stable/linux-4.15.y and fixed minor conflict.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=105470
Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Cc: Jani Nikula <jani.nikula@intel.com>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Reported-by: Laura Abbott <labbott@redhat.com>
Cc: <stable@vger.kernel.org> # 4.15+
Fixes: 5ea2355a100a ("drm/i915/mst: Use MST sideband message transactions for dpms control")
Tested-by: Laura Abbott <labbott@redhat.com>
Signed-off-by: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com>
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20180314054825.1718-1-dhinakaran.pandiyan@intel.com
(cherry picked from commit ad260ab32a4d94fa974f58262f8000472d34fd5b)
Signed-off-by: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com>
---
 drivers/gpu/drm/i915/intel_ddi.c | 12 ++----------
 1 file changed, 2 insertions(+), 10 deletions(-)

diff --git a/drivers/gpu/drm/i915/intel_ddi.c b/drivers/gpu/drm/i915/intel_ddi.c
index 58a3755544b2..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,19 +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;
-	/*
-	 * old_crtc_state and old_conn_state are NULL when called from
-	 * DP_MST. The main connector associated with this port is never
-	 * bound to a crtc for MST.
-	 */
-	bool is_mst = !old_crtc_state;
 
 	/*
 	 * 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);
 
-- 
2.14.1

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [stable:v4.15] drm/i915/dp: Write to SET_POWER dpcd to enable MST hub.
@ 2018-03-29 19:51 ` Dhinakaran Pandiyan
  0 siblings, 0 replies; 7+ messages in thread
From: Dhinakaran Pandiyan @ 2018-03-29 19:51 UTC (permalink / raw)
  To: intel-gfx; +Cc: Jani Nikula, stable, Dhinakaran Pandiyan

If bios sets up an MST output and hardware state readout code sees this is
an SST configuration, when disabling the encoder we end up calling
->post_disable_dp() hook instead of the MST version. Consequently, we write
to the DP_SET_POWER dpcd to set it D3 state. Further along when we try
enable the encoder in MST mode, POWER_UP_PHY transaction fails to power up
the MST hub. This results in continuous link training failures which keep
the system busy delaying boot. We could identify bios MST boot discrepancy
and handle it accordingly but a simple way to solve this is to write to the
DP_SET_POWER dpcd for MST too.

v2: Rebased on stable/linux-4.15.y and fixed minor conflict.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=105470
Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Cc: Jani Nikula <jani.nikula@intel.com>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Reported-by: Laura Abbott <labbott@redhat.com>
Cc: <stable@vger.kernel.org> # 4.15+
Fixes: 5ea2355a100a ("drm/i915/mst: Use MST sideband message transactions for dpms control")
Tested-by: Laura Abbott <labbott@redhat.com>
Signed-off-by: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com>
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20180314054825.1718-1-dhinakaran.pandiyan@intel.com
(cherry picked from commit ad260ab32a4d94fa974f58262f8000472d34fd5b)
Signed-off-by: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com>
---
 drivers/gpu/drm/i915/intel_ddi.c | 12 ++----------
 1 file changed, 2 insertions(+), 10 deletions(-)

diff --git a/drivers/gpu/drm/i915/intel_ddi.c b/drivers/gpu/drm/i915/intel_ddi.c
index 58a3755544b2..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,19 +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;
-	/*
-	 * old_crtc_state and old_conn_state are NULL when called from
-	 * DP_MST. The main connector associated with this port is never
-	 * bound to a crtc for MST.
-	 */
-	bool is_mst = !old_crtc_state;
 
 	/*
 	 * 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);
 
-- 
2.14.1

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* ✗ Fi.CI.BAT: failure for drm/i915/dp: Write to SET_POWER dpcd to enable MST hub. (rev2)
  2018-03-29 19:51 ` Dhinakaran Pandiyan
  (?)
@ 2018-03-29 19:54 ` Patchwork
  -1 siblings, 0 replies; 7+ messages in thread
From: Patchwork @ 2018-03-29 19:54 UTC (permalink / raw)
  To: Dhinakaran Pandiyan; +Cc: intel-gfx

== Series Details ==

Series: drm/i915/dp: Write to SET_POWER dpcd to enable MST hub. (rev2)
URL   : https://patchwork.freedesktop.org/series/39927/
State : failure

== Summary ==

Applying: drm/i915/dp: Write to SET_POWER dpcd to enable MST hub.
Using index info to reconstruct a base tree...
M	drivers/gpu/drm/i915/intel_ddi.c
Falling back to patching base and 3-way merge...
No changes -- Patch already applied.

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [stable:v4.15] drm/i915/dp: Write to SET_POWER dpcd to enable MST hub.
  2018-03-29 19:51 ` Dhinakaran Pandiyan
@ 2018-04-03  7:27   ` Jani Nikula
  -1 siblings, 0 replies; 7+ messages in thread
From: Jani Nikula @ 2018-04-03  7:27 UTC (permalink / raw)
  To: Dhinakaran Pandiyan, intel-gfx
  Cc: Dhinakaran Pandiyan, Ville Syrjälä, stable


DK, please start stable backport commit messages with:

commit b1e314462bba76660eec62760bb2e87f28f58866 upstream.

Referencing the upstream commit.

BR,
Jani.


On Thu, 29 Mar 2018, Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com> wrote:
> If bios sets up an MST output and hardware state readout code sees this is
> an SST configuration, when disabling the encoder we end up calling
> ->post_disable_dp() hook instead of the MST version. Consequently, we write
> to the DP_SET_POWER dpcd to set it D3 state. Further along when we try
> enable the encoder in MST mode, POWER_UP_PHY transaction fails to power up
> the MST hub. This results in continuous link training failures which keep
> the system busy delaying boot. We could identify bios MST boot discrepancy
> and handle it accordingly but a simple way to solve this is to write to the
> DP_SET_POWER dpcd for MST too.
>
> v2: Rebased on stable/linux-4.15.y and fixed minor conflict.
>
> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=105470
> Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
> Cc: Jani Nikula <jani.nikula@intel.com>
> Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> Reported-by: Laura Abbott <labbott@redhat.com>
> Cc: <stable@vger.kernel.org> # 4.15+
> Fixes: 5ea2355a100a ("drm/i915/mst: Use MST sideband message transactions for dpms control")
> Tested-by: Laura Abbott <labbott@redhat.com>
> Signed-off-by: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com>
> Signed-off-by: Jani Nikula <jani.nikula@intel.com>
> Link: https://patchwork.freedesktop.org/patch/msgid/20180314054825.1718-1-dhinakaran.pandiyan@intel.com
> (cherry picked from commit ad260ab32a4d94fa974f58262f8000472d34fd5b)
> Signed-off-by: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com>
> ---
>  drivers/gpu/drm/i915/intel_ddi.c | 12 ++----------
>  1 file changed, 2 insertions(+), 10 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/intel_ddi.c b/drivers/gpu/drm/i915/intel_ddi.c
> index 58a3755544b2..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,19 +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;
> -	/*
> -	 * old_crtc_state and old_conn_state are NULL when called from
> -	 * DP_MST. The main connector associated with this port is never
> -	 * bound to a crtc for MST.
> -	 */
> -	bool is_mst = !old_crtc_state;
>  
>  	/*
>  	 * 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);

-- 
Jani Nikula, Intel Open Source Technology Center

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [stable:v4.15] drm/i915/dp: Write to SET_POWER dpcd to enable MST hub.
@ 2018-04-03  7:27   ` Jani Nikula
  0 siblings, 0 replies; 7+ messages in thread
From: Jani Nikula @ 2018-04-03  7:27 UTC (permalink / raw)
  To: intel-gfx; +Cc: stable, Dhinakaran Pandiyan


DK, please start stable backport commit messages with:

commit b1e314462bba76660eec62760bb2e87f28f58866 upstream.

Referencing the upstream commit.

BR,
Jani.


On Thu, 29 Mar 2018, Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com> wrote:
> If bios sets up an MST output and hardware state readout code sees this is
> an SST configuration, when disabling the encoder we end up calling
> ->post_disable_dp() hook instead of the MST version. Consequently, we write
> to the DP_SET_POWER dpcd to set it D3 state. Further along when we try
> enable the encoder in MST mode, POWER_UP_PHY transaction fails to power up
> the MST hub. This results in continuous link training failures which keep
> the system busy delaying boot. We could identify bios MST boot discrepancy
> and handle it accordingly but a simple way to solve this is to write to the
> DP_SET_POWER dpcd for MST too.
>
> v2: Rebased on stable/linux-4.15.y and fixed minor conflict.
>
> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=105470
> Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
> Cc: Jani Nikula <jani.nikula@intel.com>
> Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> Reported-by: Laura Abbott <labbott@redhat.com>
> Cc: <stable@vger.kernel.org> # 4.15+
> Fixes: 5ea2355a100a ("drm/i915/mst: Use MST sideband message transactions for dpms control")
> Tested-by: Laura Abbott <labbott@redhat.com>
> Signed-off-by: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com>
> Signed-off-by: Jani Nikula <jani.nikula@intel.com>
> Link: https://patchwork.freedesktop.org/patch/msgid/20180314054825.1718-1-dhinakaran.pandiyan@intel.com
> (cherry picked from commit ad260ab32a4d94fa974f58262f8000472d34fd5b)
> Signed-off-by: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com>
> ---
>  drivers/gpu/drm/i915/intel_ddi.c | 12 ++----------
>  1 file changed, 2 insertions(+), 10 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/intel_ddi.c b/drivers/gpu/drm/i915/intel_ddi.c
> index 58a3755544b2..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,19 +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;
> -	/*
> -	 * old_crtc_state and old_conn_state are NULL when called from
> -	 * DP_MST. The main connector associated with this port is never
> -	 * bound to a crtc for MST.
> -	 */
> -	bool is_mst = !old_crtc_state;
>  
>  	/*
>  	 * 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);

-- 
Jani Nikula, Intel Open Source Technology Center
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [stable:v4.15] drm/i915/dp: Write to SET_POWER dpcd to enable MST hub.
  2018-04-03  7:27   ` Jani Nikula
  (?)
@ 2018-04-03 17:40   ` Greg KH
  2018-04-03 17:55     ` Pandiyan, Dhinakaran
  -1 siblings, 1 reply; 7+ messages in thread
From: Greg KH @ 2018-04-03 17:40 UTC (permalink / raw)
  To: Jani Nikula
  Cc: Dhinakaran Pandiyan, intel-gfx, Ville Syrjälä, stable

On Tue, Apr 03, 2018 at 10:27:16AM +0300, Jani Nikula wrote:
> 
> DK, please start stable backport commit messages with:
> 
> commit b1e314462bba76660eec62760bb2e87f28f58866 upstream.

Thank you for that, it helped me figure this out...

greg k-h

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [stable:v4.15] drm/i915/dp: Write to SET_POWER dpcd to enable MST hub.
  2018-04-03 17:40   ` Greg KH
@ 2018-04-03 17:55     ` Pandiyan, Dhinakaran
  0 siblings, 0 replies; 7+ messages in thread
From: Pandiyan, Dhinakaran @ 2018-04-03 17:55 UTC (permalink / raw)
  To: greg; +Cc: ville.syrjala, intel-gfx, Nikula, Jani, stable




On Tue, 2018-04-03 at 19:40 +0200, Greg KH wrote:
> On Tue, Apr 03, 2018 at 10:27:16AM +0300, Jani Nikula wrote:
> > 
> > DK, please start stable backport commit messages with:
> > 
> > commit b1e314462bba76660eec62760bb2e87f28f58866 upstream.
Got it, I'll do that next time onwards since Greg took care of this
patch. Thanks!


> 
> Thank you for that, it helped me figure this out...
> 
> greg k-h

Thanks for fixing up the commit message.

-DK

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2018-04-03 17:55 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-03-29 19:51 [stable:v4.15] drm/i915/dp: Write to SET_POWER dpcd to enable MST hub Dhinakaran Pandiyan
2018-03-29 19:51 ` Dhinakaran Pandiyan
2018-03-29 19:54 ` ✗ Fi.CI.BAT: failure for drm/i915/dp: Write to SET_POWER dpcd to enable MST hub. (rev2) Patchwork
2018-04-03  7:27 ` [stable:v4.15] drm/i915/dp: Write to SET_POWER dpcd to enable MST hub Jani Nikula
2018-04-03  7:27   ` Jani Nikula
2018-04-03 17:40   ` Greg KH
2018-04-03 17:55     ` Pandiyan, Dhinakaran

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.