[PATCH][SRU][Bionic][8086:3e92] display becomes blank after S3

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

[PATCH][SRU][Bionic][8086:3e92] display becomes blank after S3

AceLan Kao
BugLink: https://bugs.launchpad.net/bugs/1763271

[Impact]
The display becomes black after S3 with the following error messages.

dmesg:
[ 60.546305] [drm:intel_dp_start_link_train [i915]] Link Training failed at link rate = 540000, lane count = 4

Xorg.0.log:
[ 60.748] (EE) modeset(0): failed to set mode: Invalid argument
[ 60.748] (WW) modeset(0): hotplug event: connector 48's link-state is BAD, tried resetting the current mode. You may be left with a black screen if this fails...

[Fix]
Looks like link training fallback fails sometimes with eDP, we need this commit to fix the issue.

commit a306343bcd7df89d9d45a601929e26866e7b7a81 (refs/bisect/bad)
Author: Manasi Navare <[hidden email]>
Date: Thu Oct 12 12:13:38 2017 -0700

    drm/i915/edp: Do not do link training fallback or prune modes on EDP

[Regression Potential]
Should be low. The behavior only changes when DP is eDP, it does nothing if DP is eDP. Should be fine to not do link training fallback and not emit Hotplug Uevent to userspace to start modeset, since its eDP, the display is fixed.

Manasi Navare (1):
  drm/i915/edp: Do not do link training fallback or prune modes on EDP

 drivers/gpu/drm/i915/intel_dp_link_training.c | 26 +++++++++++++++++---------
 1 file changed, 17 insertions(+), 9 deletions(-)

--
2.7.4


--
kernel-team mailing list
[hidden email]
https://lists.ubuntu.com/mailman/listinfo/kernel-team
Reply | Threaded
Open this post in threaded view
|

[PATCH][SRU][Bionic] drm/i915/edp: Do not do link training fallback or prune modes on EDP

AceLan Kao
From: Manasi Navare <[hidden email]>

BugLink: https://bugs.launchpad.net/bugs/1763271

In case of eDP because the panel has a fixed mode, the link rate
and lane count at which it is trained corresponds to the link BW
required to support the native resolution of the panel. In case of
panles with lower resolutions where fewer lanes are hooked up internally,
that number is reflected in the MAX_LANE_COUNT DPCD register of the panel.
So it is pointless to fallback to lower link rate/lane count in case
of link training failure on eDP connector since the lower link BW
will not support the native resolution of the panel and we cannot
prune the preferred mode on the eDP connector.

In case of Link training failure on the eDP panel, something is wrong
in the HW internally and hence driver errors out with a loud
and clear DRM_ERROR message.

v2:
* Fix the DEBUG_ERROR and add {} in else (Ville Syrjala)

Cc: Clinton Taylor <[hidden email]>
Cc: Jim Bride <[hidden email]>
Cc: Jani Nikula <[hidden email]>
Cc: Ville Syrjala <[hidden email]>
Cc: Dave Airlie <[hidden email]>
Cc: Daniel Vetter <[hidden email]>
Signed-off-by: Manasi Navare <[hidden email]>
Reviewed-by: Ville Syrjala <[hidden email]>
Reference: https://bugs.freedesktop.org/show_bug.cgi?id=103369
Signed-off-by: Imre Deak <[hidden email]>
Link: https://patchwork.freedesktop.org/patch/msgid/1507835618-23051-1-git-send-email-manasi.d.navare@...
(cherry picked from commit c0cfb10d9e1de490e36d3b9d4228c0ea0ca30677)
Signed-off-by: Rodrigo Vivi <[hidden email]>
(cherry picked from commit a306343bcd7df89d9d45a601929e26866e7b7a81)
Signed-off-by: AceLan Kao <[hidden email]>
---
 drivers/gpu/drm/i915/intel_dp_link_training.c | 26 +++++++++++++++++---------
 1 file changed, 17 insertions(+), 9 deletions(-)

diff --git a/drivers/gpu/drm/i915/intel_dp_link_training.c b/drivers/gpu/drm/i915/intel_dp_link_training.c
index 05907fa..cf8fef8 100644
--- a/drivers/gpu/drm/i915/intel_dp_link_training.c
+++ b/drivers/gpu/drm/i915/intel_dp_link_training.c
@@ -328,14 +328,22 @@ intel_dp_start_link_train(struct intel_dp *intel_dp)
  return;
 
  failure_handling:
- DRM_DEBUG_KMS("[CONNECTOR:%d:%s] Link Training failed at link rate = %d, lane count = %d",
-      intel_connector->base.base.id,
-      intel_connector->base.name,
-      intel_dp->link_rate, intel_dp->lane_count);
- if (!intel_dp_get_link_train_fallback_values(intel_dp,
-     intel_dp->link_rate,
-     intel_dp->lane_count))
- /* Schedule a Hotplug Uevent to userspace to start modeset */
- schedule_work(&intel_connector->modeset_retry_work);
+ /* Dont fallback and prune modes if its eDP */
+ if (!intel_dp_is_edp(intel_dp)) {
+ DRM_DEBUG_KMS("[CONNECTOR:%d:%s] Link Training failed at link rate = %d, lane count = %d",
+      intel_connector->base.base.id,
+      intel_connector->base.name,
+      intel_dp->link_rate, intel_dp->lane_count);
+ if (!intel_dp_get_link_train_fallback_values(intel_dp,
+     intel_dp->link_rate,
+     intel_dp->lane_count))
+ /* Schedule a Hotplug Uevent to userspace to start modeset */
+ schedule_work(&intel_connector->modeset_retry_work);
+ } else {
+ DRM_ERROR("[CONNECTOR:%d:%s] Link Training failed at link rate = %d, lane count = %d",
+  intel_connector->base.base.id,
+  intel_connector->base.name,
+  intel_dp->link_rate, intel_dp->lane_count);
+ }
  return;
 }
--
2.7.4


--
kernel-team mailing list
[hidden email]
https://lists.ubuntu.com/mailman/listinfo/kernel-team
Reply | Threaded
Open this post in threaded view
|

ACK: [PATCH][SRU][Bionic][8086:3e92] display becomes blank after S3

Seth Forshee
In reply to this post by AceLan Kao
On Fri, Apr 13, 2018 at 09:44:05AM +0800, AceLan Kao wrote:

> BugLink: https://bugs.launchpad.net/bugs/1763271
>
> [Impact]
> The display becomes black after S3 with the following error messages.
>
> dmesg:
> [ 60.546305] [drm:intel_dp_start_link_train [i915]] Link Training failed at link rate = 540000, lane count = 4
>
> Xorg.0.log:
> [ 60.748] (EE) modeset(0): failed to set mode: Invalid argument
> [ 60.748] (WW) modeset(0): hotplug event: connector 48's link-state is BAD, tried resetting the current mode. You may be left with a black screen if this fails...
>
> [Fix]
> Looks like link training fallback fails sometimes with eDP, we need this commit to fix the issue.
>
> commit a306343bcd7df89d9d45a601929e26866e7b7a81 (refs/bisect/bad)
> Author: Manasi Navare <[hidden email]>
> Date: Thu Oct 12 12:13:38 2017 -0700
>
>     drm/i915/edp: Do not do link training fallback or prune modes on EDP
>
> [Regression Potential]
> Should be low. The behavior only changes when DP is eDP, it does nothing if DP is eDP. Should be fine to not do link training fallback and not emit Hotplug Uevent to userspace to start modeset, since its eDP, the display is fixed.

Acked-by: Seth Forshee <[hidden email]>

--
kernel-team mailing list
[hidden email]
https://lists.ubuntu.com/mailman/listinfo/kernel-team
Reply | Threaded
Open this post in threaded view
|

ACK: [PATCH][SRU][Bionic][8086:3e92] display becomes blank after S3

Colin Ian King-2
In reply to this post by AceLan Kao
On 13/04/18 02:44, AceLan Kao wrote:

> BugLink: https://bugs.launchpad.net/bugs/1763271
>
> [Impact]
> The display becomes black after S3 with the following error messages.
>
> dmesg:
> [ 60.546305] [drm:intel_dp_start_link_train [i915]] Link Training failed at link rate = 540000, lane count = 4
>
> Xorg.0.log:
> [ 60.748] (EE) modeset(0): failed to set mode: Invalid argument
> [ 60.748] (WW) modeset(0): hotplug event: connector 48's link-state is BAD, tried resetting the current mode. You may be left with a black screen if this fails...
>
> [Fix]
> Looks like link training fallback fails sometimes with eDP, we need this commit to fix the issue.
>
> commit a306343bcd7df89d9d45a601929e26866e7b7a81 (refs/bisect/bad)
> Author: Manasi Navare <[hidden email]>
> Date: Thu Oct 12 12:13:38 2017 -0700
>
>     drm/i915/edp: Do not do link training fallback or prune modes on EDP
>
> [Regression Potential]
> Should be low. The behavior only changes when DP is eDP, it does nothing if DP is eDP. Should be fine to not do link training fallback and not emit Hotplug Uevent to userspace to start modeset, since its eDP, the display is fixed.
>
> Manasi Navare (1):
>   drm/i915/edp: Do not do link training fallback or prune modes on EDP
>
>  drivers/gpu/drm/i915/intel_dp_link_training.c | 26 +++++++++++++++++---------
>  1 file changed, 17 insertions(+), 9 deletions(-)
>
Upstream fix, I'm happy with this.

Acked-by: Colin Ian King <[hidden email]>

--
kernel-team mailing list
[hidden email]
https://lists.ubuntu.com/mailman/listinfo/kernel-team
Reply | Threaded
Open this post in threaded view
|

APPLIED: [PATCH][SRU][Bionic][8086:3e92] display becomes blank after S3

Kleber Souza
In reply to this post by AceLan Kao
On 04/13/18 03:44, AceLan Kao wrote:

> BugLink: https://bugs.launchpad.net/bugs/1763271
>
> [Impact]
> The display becomes black after S3 with the following error messages.
>
> dmesg:
> [ 60.546305] [drm:intel_dp_start_link_train [i915]] Link Training failed at link rate = 540000, lane count = 4
>
> Xorg.0.log:
> [ 60.748] (EE) modeset(0): failed to set mode: Invalid argument
> [ 60.748] (WW) modeset(0): hotplug event: connector 48's link-state is BAD, tried resetting the current mode. You may be left with a black screen if this fails...
>
> [Fix]
> Looks like link training fallback fails sometimes with eDP, we need this commit to fix the issue.
>
> commit a306343bcd7df89d9d45a601929e26866e7b7a81 (refs/bisect/bad)
> Author: Manasi Navare <[hidden email]>
> Date: Thu Oct 12 12:13:38 2017 -0700
>
>     drm/i915/edp: Do not do link training fallback or prune modes on EDP
>
> [Regression Potential]
> Should be low. The behavior only changes when DP is eDP, it does nothing if DP is eDP. Should be fine to not do link training fallback and not emit Hotplug Uevent to userspace to start modeset, since its eDP, the display is fixed.
>
> Manasi Navare (1):
>   drm/i915/edp: Do not do link training fallback or prune modes on EDP
>
>  drivers/gpu/drm/i915/intel_dp_link_training.c | 26 +++++++++++++++++---------
>  1 file changed, 17 insertions(+), 9 deletions(-)
>

Applied to bionic/master-next branch.

Thanks,
Kleber

--
kernel-team mailing list
[hidden email]
https://lists.ubuntu.com/mailman/listinfo/kernel-team