mbox series

[0/4,Artful,linux-oem,8086:3e92] display becomes blank after S3

Message ID 1523518121-28375-1-git-send-email-acelan.kao@canonical.com
Headers show
Series display becomes blank after S3 | expand

Message

AceLan Kao April 12, 2018, 7:28 a.m. UTC
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 <manasi.d.navare@intel.com>
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.
To avoid conflicts, we introduce 4 commits, I'll try explaining them below

a306343 drm/i915/edp: Do not do link training fallback or prune modes on EDP
   This is the fix commit and 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.

1853a9d drm/i915/dp: make is_edp non-static and rename to intel_dp_is_edp
7b91bf7 drm/i915/dp: rename intel_dp_is_edp to intel_dp_is_port_edp
   Above 2 commits do function name renaming only.

dc911f5 drm/i915/edp: Allow alternate fixed mode for eDP if available.
   Change the prototype of function "intel_panel_init()" and adding one extra argument, should have small impact on the display.

Jani Nikula (2):
  drm/i915/dp: rename intel_dp_is_edp to intel_dp_is_port_edp
  drm/i915/dp: make is_edp non-static and rename to intel_dp_is_edp

Jim Bride (1):
  drm/i915/edp: Allow alternate fixed mode for eDP if available.

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

 drivers/gpu/drm/i915/intel_display.c          |   6 +-
 drivers/gpu/drm/i915/intel_dp.c               | 117 ++++++++++++++++----------
 drivers/gpu/drm/i915/intel_dp_link_training.c |  24 ++++--
 drivers/gpu/drm/i915/intel_drv.h              |   5 +-
 drivers/gpu/drm/i915/intel_dsi.c              |   2 +-
 drivers/gpu/drm/i915/intel_dvo.c              |   2 +-
 drivers/gpu/drm/i915/intel_lvds.c             |   3 +-
 drivers/gpu/drm/i915/intel_panel.c            |   6 ++
 8 files changed, 108 insertions(+), 57 deletions(-)

Comments

Timo Aaltonen April 12, 2018, 8:30 a.m. UTC | #1
On 12.04.2018 10:28, 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 <manasi.d.navare@intel.com>
> 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.
> To avoid conflicts, we introduce 4 commits, I'll try explaining them below
> 
> a306343 drm/i915/edp: Do not do link training fallback or prune modes on EDP
>    This is the fix commit and 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.
> 
> 1853a9d drm/i915/dp: make is_edp non-static and rename to intel_dp_is_edp
> 7b91bf7 drm/i915/dp: rename intel_dp_is_edp to intel_dp_is_port_edp
>    Above 2 commits do function name renaming only.
> 
> dc911f5 drm/i915/edp: Allow alternate fixed mode for eDP if available.
>    Change the prototype of function "intel_panel_init()" and adding one extra argument, should have small impact on the display.
> 
> Jani Nikula (2):
>   drm/i915/dp: rename intel_dp_is_edp to intel_dp_is_port_edp
>   drm/i915/dp: make is_edp non-static and rename to intel_dp_is_edp
> 
> Jim Bride (1):
>   drm/i915/edp: Allow alternate fixed mode for eDP if available.
> 
> Manasi Navare (1):
>   drm/i915/edp: Do not do link training fallback or prune modes on EDP
> 
>  drivers/gpu/drm/i915/intel_display.c          |   6 +-
>  drivers/gpu/drm/i915/intel_dp.c               | 117 ++++++++++++++++----------
>  drivers/gpu/drm/i915/intel_dp_link_training.c |  24 ++++--
>  drivers/gpu/drm/i915/intel_drv.h              |   5 +-
>  drivers/gpu/drm/i915/intel_dsi.c              |   2 +-
>  drivers/gpu/drm/i915/intel_dvo.c              |   2 +-
>  drivers/gpu/drm/i915/intel_lvds.c             |   3 +-
>  drivers/gpu/drm/i915/intel_panel.c            |   6 ++
>  8 files changed, 108 insertions(+), 57 deletions(-)

yeah, applied to artful/oem-next, thanks
Kleber Sacilotto de Souza April 18, 2018, 7:57 a.m. UTC | #2
On 04/12/18 09:28, 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 <manasi.d.navare@intel.com>
> 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.
> To avoid conflicts, we introduce 4 commits, I'll try explaining them below
> 
> a306343 drm/i915/edp: Do not do link training fallback or prune modes on EDP
>    This is the fix commit and 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.
> 
> 1853a9d drm/i915/dp: make is_edp non-static and rename to intel_dp_is_edp
> 7b91bf7 drm/i915/dp: rename intel_dp_is_edp to intel_dp_is_port_edp
>    Above 2 commits do function name renaming only.
> 
> dc911f5 drm/i915/edp: Allow alternate fixed mode for eDP if available.
>    Change the prototype of function "intel_panel_init()" and adding one extra argument, should have small impact on the display.
> 
> Jani Nikula (2):
>   drm/i915/dp: rename intel_dp_is_edp to intel_dp_is_port_edp
>   drm/i915/dp: make is_edp non-static and rename to intel_dp_is_edp
> 
> Jim Bride (1):
>   drm/i915/edp: Allow alternate fixed mode for eDP if available.
> 
> Manasi Navare (1):
>   drm/i915/edp: Do not do link training fallback or prune modes on EDP
> 
>  drivers/gpu/drm/i915/intel_display.c          |   6 +-
>  drivers/gpu/drm/i915/intel_dp.c               | 117 ++++++++++++++++----------
>  drivers/gpu/drm/i915/intel_dp_link_training.c |  24 ++++--
>  drivers/gpu/drm/i915/intel_drv.h              |   5 +-
>  drivers/gpu/drm/i915/intel_dsi.c              |   2 +-
>  drivers/gpu/drm/i915/intel_dvo.c              |   2 +-
>  drivers/gpu/drm/i915/intel_lvds.c             |   3 +-
>  drivers/gpu/drm/i915/intel_panel.c            |   6 ++
>  8 files changed, 108 insertions(+), 57 deletions(-)
> 

The prereq patches are a bit large, but looks reasonable to me.

Acked-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
Stefan Bader April 20, 2018, 8:28 a.m. UTC | #3
On 12.04.2018 09:28, 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 <manasi.d.navare@intel.com>
> 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.
> To avoid conflicts, we introduce 4 commits, I'll try explaining them below
> 
> a306343 drm/i915/edp: Do not do link training fallback or prune modes on EDP
>    This is the fix commit and 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.
> 
> 1853a9d drm/i915/dp: make is_edp non-static and rename to intel_dp_is_edp
> 7b91bf7 drm/i915/dp: rename intel_dp_is_edp to intel_dp_is_port_edp
>    Above 2 commits do function name renaming only.
> 
> dc911f5 drm/i915/edp: Allow alternate fixed mode for eDP if available.
>    Change the prototype of function "intel_panel_init()" and adding one extra argument, should have small impact on the display.
> 
> Jani Nikula (2):
>   drm/i915/dp: rename intel_dp_is_edp to intel_dp_is_port_edp
>   drm/i915/dp: make is_edp non-static and rename to intel_dp_is_edp
> 
> Jim Bride (1):
>   drm/i915/edp: Allow alternate fixed mode for eDP if available.
> 
> Manasi Navare (1):
>   drm/i915/edp: Do not do link training fallback or prune modes on EDP
> 
>  drivers/gpu/drm/i915/intel_display.c          |   6 +-
>  drivers/gpu/drm/i915/intel_dp.c               | 117 ++++++++++++++++----------
>  drivers/gpu/drm/i915/intel_dp_link_training.c |  24 ++++--
>  drivers/gpu/drm/i915/intel_drv.h              |   5 +-
>  drivers/gpu/drm/i915/intel_dsi.c              |   2 +-
>  drivers/gpu/drm/i915/intel_dvo.c              |   2 +-
>  drivers/gpu/drm/i915/intel_lvds.c             |   3 +-
>  drivers/gpu/drm/i915/intel_panel.c            |   6 ++
>  8 files changed, 108 insertions(+), 57 deletions(-)
> 
The amount of breaking and fixing again in i915 is always scary. With the
explanation it sounds like the impact is limited to eDP connected screens.
That hopefully is limited enough to be testable and not affect too much usecases.

-Stefan


Acked-by: Stefan Bader <stefan.bader@canonical.com>
Stefan Bader April 20, 2018, 11:54 a.m. UTC | #4
On 12.04.2018 09:28, 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 <manasi.d.navare@intel.com>
> 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.
> To avoid conflicts, we introduce 4 commits, I'll try explaining them below
> 
> a306343 drm/i915/edp: Do not do link training fallback or prune modes on EDP
>    This is the fix commit and 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.
> 
> 1853a9d drm/i915/dp: make is_edp non-static and rename to intel_dp_is_edp
> 7b91bf7 drm/i915/dp: rename intel_dp_is_edp to intel_dp_is_port_edp
>    Above 2 commits do function name renaming only.
> 
> dc911f5 drm/i915/edp: Allow alternate fixed mode for eDP if available.
>    Change the prototype of function "intel_panel_init()" and adding one extra argument, should have small impact on the display.
> 
> Jani Nikula (2):
>   drm/i915/dp: rename intel_dp_is_edp to intel_dp_is_port_edp
>   drm/i915/dp: make is_edp non-static and rename to intel_dp_is_edp
> 
> Jim Bride (1):
>   drm/i915/edp: Allow alternate fixed mode for eDP if available.
> 
> Manasi Navare (1):
>   drm/i915/edp: Do not do link training fallback or prune modes on EDP
> 
>  drivers/gpu/drm/i915/intel_display.c          |   6 +-
>  drivers/gpu/drm/i915/intel_dp.c               | 117 ++++++++++++++++----------
>  drivers/gpu/drm/i915/intel_dp_link_training.c |  24 ++++--
>  drivers/gpu/drm/i915/intel_drv.h              |   5 +-
>  drivers/gpu/drm/i915/intel_dsi.c              |   2 +-
>  drivers/gpu/drm/i915/intel_dvo.c              |   2 +-
>  drivers/gpu/drm/i915/intel_lvds.c             |   3 +-
>  drivers/gpu/drm/i915/intel_panel.c            |   6 ++
>  8 files changed, 108 insertions(+), 57 deletions(-)
> 
Applied to artful/master-next