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

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
9 messages Options
Reply | Threaded
Open this post in threaded view
|

[PATCH 0/4][Artful][linux-oem][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.
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(-)

--
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 1/4][Artful][linux-oem] drm/i915/edp: Allow alternate fixed mode for eDP if available.

AceLan Kao
From: Jim Bride <[hidden email]>

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

Some fixed resolution panels actually support more than one mode,
with the only thing different being the refresh rate.  Having this
alternate mode available to us is desirable, because it allows us to
test PSR on panels whose setup time at the preferred mode is too long.
With this patch we allow the use of the alternate mode if it's
available and it was specifically requested.

v2 and v3: Rebase
v4: * Fix up some leaky mode stuff (Chris)
    * Rebase
v5: * Fix a NULL pointer derefrence (David Weinehall)
v6: * Whitespace / spelling / checkpatch clean-up; no functional
      change. (David)
    * Rebase

Cc: David Weinehall <[hidden email]>
Cc: Rodrigo Vivi <[hidden email]>
Cc: Paulo Zanoni <[hidden email]>
Cc: Jani Nikula <[hidden email]>
Cc: Chris Wilson <[hidden email]>
Reviewed-by: David Weinehall <[hidden email]>
Signed-off-by: Jim Bride <[hidden email]>
Signed-off-by: Rodrigo Vivi <[hidden email]>
Link: https://patchwork.freedesktop.org/patch/msgid/1502308133-26892-1-git-send-email-jim.bride@...
(cherry picked from commit dc911f5bd8aacfcf8aabd5c26c88e04c837a938e)
Signed-off-by: AceLan Kao <[hidden email]>
---
 drivers/gpu/drm/i915/intel_dp.c    | 38 +++++++++++++++++++++++++++++++++-----
 drivers/gpu/drm/i915/intel_drv.h   |  2 ++
 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 ++++++
 6 files changed, 45 insertions(+), 8 deletions(-)

diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c
index b629e2b..3a24b0e 100644
--- a/drivers/gpu/drm/i915/intel_dp.c
+++ b/drivers/gpu/drm/i915/intel_dp.c
@@ -1606,6 +1606,23 @@ static int intel_dp_compute_bpp(struct intel_dp *intel_dp,
  return bpp;
 }
 
+static bool intel_edp_compare_alt_mode(struct drm_display_mode *m1,
+       struct drm_display_mode *m2)
+{
+ bool bres = false;
+
+ if (m1 && m2)
+ bres = (m1->hdisplay == m2->hdisplay &&
+ m1->hsync_start == m2->hsync_start &&
+ m1->hsync_end == m2->hsync_end &&
+ m1->htotal == m2->htotal &&
+ m1->vdisplay == m2->vdisplay &&
+ m1->vsync_start == m2->vsync_start &&
+ m1->vsync_end == m2->vsync_end &&
+ m1->vtotal == m2->vtotal);
+ return bres;
+}
+
 bool
 intel_dp_compute_config(struct intel_encoder *encoder,
  struct intel_crtc_state *pipe_config,
@@ -1652,8 +1669,16 @@ intel_dp_compute_config(struct intel_encoder *encoder,
  pipe_config->has_audio = intel_conn_state->force_audio == HDMI_AUDIO_ON;
 
  if (is_edp(intel_dp) && intel_connector->panel.fixed_mode) {
- intel_fixed_panel_mode(intel_connector->panel.fixed_mode,
-       adjusted_mode);
+ struct drm_display_mode *panel_mode =
+ intel_connector->panel.alt_fixed_mode;
+ struct drm_display_mode *req_mode = &pipe_config->base.mode;
+
+ if (!intel_edp_compare_alt_mode(req_mode, panel_mode))
+ panel_mode = intel_connector->panel.fixed_mode;
+
+ drm_mode_debug_printmodeline(panel_mode);
+
+ intel_fixed_panel_mode(panel_mode, adjusted_mode);
 
  if (INTEL_GEN(dev_priv) >= 9) {
  int ret;
@@ -5722,6 +5747,7 @@ static bool intel_edp_init_connector(struct intel_dp *intel_dp,
  struct drm_device *dev = intel_encoder->base.dev;
  struct drm_i915_private *dev_priv = to_i915(dev);
  struct drm_display_mode *fixed_mode = NULL;
+ struct drm_display_mode *alt_fixed_mode = NULL;
  struct drm_display_mode *downclock_mode = NULL;
  bool has_dpcd;
  struct drm_display_mode *scan;
@@ -5777,13 +5803,14 @@ static bool intel_edp_init_connector(struct intel_dp *intel_dp,
  }
  intel_connector->edid = edid;
 
- /* prefer fixed mode from EDID if available */
+ /* prefer fixed mode from EDID if available, save an alt mode also */
  list_for_each_entry(scan, &connector->probed_modes, head) {
  if ((scan->type & DRM_MODE_TYPE_PREFERRED)) {
  fixed_mode = drm_mode_duplicate(dev, scan);
  downclock_mode = intel_dp_drrs_init(
  intel_connector, fixed_mode);
- break;
+ } else if (!alt_fixed_mode) {
+ alt_fixed_mode = drm_mode_duplicate(dev, scan);
  }
  }
 
@@ -5820,7 +5847,8 @@ static bool intel_edp_init_connector(struct intel_dp *intel_dp,
       pipe_name(pipe));
  }
 
- intel_panel_init(&intel_connector->panel, fixed_mode, downclock_mode);
+ intel_panel_init(&intel_connector->panel, fixed_mode, alt_fixed_mode,
+ downclock_mode);
  intel_connector->panel.backlight.power = intel_edp_backlight_power;
  intel_panel_setup_backlight(connector, pipe);
 
diff --git a/drivers/gpu/drm/i915/intel_drv.h b/drivers/gpu/drm/i915/intel_drv.h
index a350c6b..9833e5e 100644
--- a/drivers/gpu/drm/i915/intel_drv.h
+++ b/drivers/gpu/drm/i915/intel_drv.h
@@ -265,6 +265,7 @@ struct intel_encoder {
 
 struct intel_panel {
  struct drm_display_mode *fixed_mode;
+ struct drm_display_mode *alt_fixed_mode;
  struct drm_display_mode *downclock_mode;
 
  /* backlight */
@@ -1697,6 +1698,7 @@ void intel_overlay_reset(struct drm_i915_private *dev_priv);
 /* intel_panel.c */
 int intel_panel_init(struct intel_panel *panel,
      struct drm_display_mode *fixed_mode,
+     struct drm_display_mode *alt_fixed_mode,
      struct drm_display_mode *downclock_mode);
 void intel_panel_fini(struct intel_panel *panel);
 void intel_fixed_panel_mode(const struct drm_display_mode *fixed_mode,
diff --git a/drivers/gpu/drm/i915/intel_dsi.c b/drivers/gpu/drm/i915/intel_dsi.c
index 4b8f6e0..0fdd4f1 100644
--- a/drivers/gpu/drm/i915/intel_dsi.c
+++ b/drivers/gpu/drm/i915/intel_dsi.c
@@ -1840,7 +1840,7 @@ void intel_dsi_init(struct drm_i915_private *dev_priv)
  connector->display_info.width_mm = fixed_mode->width_mm;
  connector->display_info.height_mm = fixed_mode->height_mm;
 
- intel_panel_init(&intel_connector->panel, fixed_mode, NULL);
+ intel_panel_init(&intel_connector->panel, fixed_mode, NULL, NULL);
  intel_panel_setup_backlight(connector, INVALID_PIPE);
 
  intel_dsi_add_properties(intel_connector);
diff --git a/drivers/gpu/drm/i915/intel_dvo.c b/drivers/gpu/drm/i915/intel_dvo.c
index c1544a5..39fd4f3 100644
--- a/drivers/gpu/drm/i915/intel_dvo.c
+++ b/drivers/gpu/drm/i915/intel_dvo.c
@@ -554,7 +554,7 @@ void intel_dvo_init(struct drm_i915_private *dev_priv)
  */
  intel_panel_init(&intel_connector->panel,
  intel_dvo_get_current_mode(connector),
- NULL);
+ NULL, NULL);
  intel_dvo->panel_wants_dither = true;
  }
 
diff --git a/drivers/gpu/drm/i915/intel_lvds.c b/drivers/gpu/drm/i915/intel_lvds.c
index 6fe5d7c..a995ccb 100644
--- a/drivers/gpu/drm/i915/intel_lvds.c
+++ b/drivers/gpu/drm/i915/intel_lvds.c
@@ -1140,7 +1140,8 @@ void intel_lvds_init(struct drm_i915_private *dev_priv)
 out:
  mutex_unlock(&dev->mode_config.mutex);
 
- intel_panel_init(&intel_connector->panel, fixed_mode, downclock_mode);
+ intel_panel_init(&intel_connector->panel, fixed_mode, NULL,
+ downclock_mode);
  intel_panel_setup_backlight(connector, INVALID_PIPE);
 
  lvds_encoder->is_dual_link = compute_is_dual_link_lvds(lvds_encoder);
diff --git a/drivers/gpu/drm/i915/intel_panel.c b/drivers/gpu/drm/i915/intel_panel.c
index 593349b..cf395cd 100644
--- a/drivers/gpu/drm/i915/intel_panel.c
+++ b/drivers/gpu/drm/i915/intel_panel.c
@@ -1919,11 +1919,13 @@ intel_panel_init_backlight_funcs(struct intel_panel *panel)
 
 int intel_panel_init(struct intel_panel *panel,
      struct drm_display_mode *fixed_mode,
+     struct drm_display_mode *alt_fixed_mode,
      struct drm_display_mode *downclock_mode)
 {
  intel_panel_init_backlight_funcs(panel);
 
  panel->fixed_mode = fixed_mode;
+ panel->alt_fixed_mode = alt_fixed_mode;
  panel->downclock_mode = downclock_mode;
 
  return 0;
@@ -1937,6 +1939,10 @@ void intel_panel_fini(struct intel_panel *panel)
  if (panel->fixed_mode)
  drm_mode_destroy(intel_connector->base.dev, panel->fixed_mode);
 
+ if (panel->alt_fixed_mode)
+ drm_mode_destroy(intel_connector->base.dev,
+ panel->alt_fixed_mode);
+
  if (panel->downclock_mode)
  drm_mode_destroy(intel_connector->base.dev,
  panel->downclock_mode);
--
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 2/4][Artful][linux-oem] drm/i915/dp: rename intel_dp_is_edp to intel_dp_is_port_edp

AceLan Kao
In reply to this post by AceLan Kao
From: Jani Nikula <[hidden email]>

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

Emphasize that this is based on the port, not intel_dp. This is also in
line with the underlying intel_bios_is_port_edp() function. No
functional changes.

Cc: Manasi Navare <[hidden email]>
Cc: Jim Bride <[hidden email]>
Reviewed-by: Jim Bride <[hidden email]>
Reviewed-by: Manasi Navare <[hidden email]>
Signed-off-by: Jani Nikula <[hidden email]>
Link: https://patchwork.freedesktop.org/patch/msgid/20170818093020.19160-1-jani.nikula@...
(cherry picked from commit 7b91bf7f9196c8192b65a904ac7de7ecf989904f)
Signed-off-by: AceLan Kao <[hidden email]>
---
 drivers/gpu/drm/i915/intel_display.c | 6 +++---
 drivers/gpu/drm/i915/intel_dp.c      | 4 ++--
 drivers/gpu/drm/i915/intel_drv.h     | 2 +-
 3 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index 0368863..74b3ea2 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -14219,7 +14219,7 @@ static void intel_setup_outputs(struct drm_i915_private *dev_priv)
 
  } else if (HAS_PCH_SPLIT(dev_priv)) {
  int found;
- dpd_is_edp = intel_dp_is_edp(dev_priv, PORT_D);
+ dpd_is_edp = intel_dp_is_port_edp(dev_priv, PORT_D);
 
  if (has_edp_a(dev_priv))
  intel_dp_init(dev_priv, DP_A, PORT_A);
@@ -14262,14 +14262,14 @@ static void intel_setup_outputs(struct drm_i915_private *dev_priv)
  * trust the port type the VBT declares as we've seen at least
  * HDMI ports that the VBT claim are DP or eDP.
  */
- has_edp = intel_dp_is_edp(dev_priv, PORT_B);
+ has_edp = intel_dp_is_port_edp(dev_priv, PORT_B);
  has_port = intel_bios_is_port_present(dev_priv, PORT_B);
  if (I915_READ(VLV_DP_B) & DP_DETECTED || has_port)
  has_edp &= intel_dp_init(dev_priv, VLV_DP_B, PORT_B);
  if ((I915_READ(VLV_HDMIB) & SDVO_DETECTED || has_port) && !has_edp)
  intel_hdmi_init(dev_priv, VLV_HDMIB, PORT_B);
 
- has_edp = intel_dp_is_edp(dev_priv, PORT_C);
+ has_edp = intel_dp_is_port_edp(dev_priv, PORT_C);
  has_port = intel_bios_is_port_present(dev_priv, PORT_C);
  if (I915_READ(VLV_DP_C) & DP_DETECTED || has_port)
  has_edp &= intel_dp_init(dev_priv, VLV_DP_C, PORT_C);
diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c
index 3a24b0e..e339932 100644
--- a/drivers/gpu/drm/i915/intel_dp.c
+++ b/drivers/gpu/drm/i915/intel_dp.c
@@ -5076,7 +5076,7 @@ intel_dp_hpd_pulse(struct intel_digital_port *intel_dig_port, bool long_hpd)
 }
 
 /* check the VBT to see whether the eDP is on another port */
-bool intel_dp_is_edp(struct drm_i915_private *dev_priv, enum port port)
+bool intel_dp_is_port_edp(struct drm_i915_private *dev_priv, enum port port)
 {
  /*
  * eDP not supported on g4x. so bail out early just
@@ -5974,7 +5974,7 @@ intel_dp_init_connector(struct intel_digital_port *intel_dig_port,
  intel_dp->DP = I915_READ(intel_dp->output_reg);
  intel_dp->attached_connector = intel_connector;
 
- if (intel_dp_is_edp(dev_priv, port))
+ if (intel_dp_is_port_edp(dev_priv, port))
  type = DRM_MODE_CONNECTOR_eDP;
  else
  type = DRM_MODE_CONNECTOR_DisplayPort;
diff --git a/drivers/gpu/drm/i915/intel_drv.h b/drivers/gpu/drm/i915/intel_drv.h
index 9833e5e..488223e 100644
--- a/drivers/gpu/drm/i915/intel_drv.h
+++ b/drivers/gpu/drm/i915/intel_drv.h
@@ -1523,7 +1523,7 @@ int intel_dp_sink_crc(struct intel_dp *intel_dp, u8 *crc);
 bool intel_dp_compute_config(struct intel_encoder *encoder,
      struct intel_crtc_state *pipe_config,
      struct drm_connector_state *conn_state);
-bool intel_dp_is_edp(struct drm_i915_private *dev_priv, enum port port);
+bool intel_dp_is_port_edp(struct drm_i915_private *dev_priv, enum port port);
 enum irqreturn intel_dp_hpd_pulse(struct intel_digital_port *intel_dig_port,
   bool long_hpd);
 void intel_edp_backlight_on(const struct intel_crtc_state *crtc_state,
--
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 3/4][Artful][linux-oem] drm/i915/dp: make is_edp non-static and rename to intel_dp_is_edp

AceLan Kao
In reply to this post by AceLan Kao
From: Jani Nikula <[hidden email]>

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

Expose across driver for future work. No functional changes.

Cc: Manasi Navare <[hidden email]>
Cc: Jim Bride <[hidden email]>
Reviewed-by: Jim Bride <[hidden email]>
Reviewed-by: Manasi Navare <[hidden email]>
Signed-off-by: Jani Nikula <[hidden email]>
Link: https://patchwork.freedesktop.org/patch/msgid/20170818093020.19160-2-jani.nikula@...
(cherry picked from commit 1853a9daa19e150c32d0082e4f006391a7c6a997)
Signed-off-by: AceLan Kao <[hidden email]>
---
 drivers/gpu/drm/i915/intel_dp.c  | 77 +++++++++++++++++++++-------------------
 drivers/gpu/drm/i915/intel_drv.h |  1 +
 2 files changed, 41 insertions(+), 37 deletions(-)

diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c
index e339932..64e59e2 100644
--- a/drivers/gpu/drm/i915/intel_dp.c
+++ b/drivers/gpu/drm/i915/intel_dp.c
@@ -100,13 +100,13 @@ static const int skl_rates[] = { 162000, 216000, 270000,
 static const int default_rates[] = { 162000, 270000, 540000 };
 
 /**
- * is_edp - is the given port attached to an eDP panel (either CPU or PCH)
+ * intel_dp_is_edp - is the given port attached to an eDP panel (either CPU or PCH)
  * @intel_dp: DP struct
  *
  * If a CPU or PCH DP output is attached to an eDP panel, this function
  * will return true, and false otherwise.
  */
-static bool is_edp(struct intel_dp *intel_dp)
+bool intel_dp_is_edp(struct intel_dp *intel_dp)
 {
  struct intel_digital_port *intel_dig_port = dp_to_dig_port(intel_dp);
 
@@ -375,7 +375,7 @@ intel_dp_mode_valid(struct drm_connector *connector,
 
  max_dotclk = intel_dp_downstream_max_dotclock(intel_dp);
 
- if (is_edp(intel_dp) && fixed_mode) {
+ if (intel_dp_is_edp(intel_dp) && fixed_mode) {
  if (mode->hdisplay > fixed_mode->hdisplay)
  return MODE_PANEL;
 
@@ -584,7 +584,7 @@ vlv_power_sequencer_pipe(struct intel_dp *intel_dp)
  lockdep_assert_held(&dev_priv->pps_mutex);
 
  /* We should never land here with regular DP ports */
- WARN_ON(!is_edp(intel_dp));
+ WARN_ON(!intel_dp_is_edp(intel_dp));
 
  WARN_ON(intel_dp->active_pipe != INVALID_PIPE &&
  intel_dp->active_pipe != intel_dp->pps_pipe);
@@ -631,7 +631,7 @@ bxt_power_sequencer_idx(struct intel_dp *intel_dp)
  lockdep_assert_held(&dev_priv->pps_mutex);
 
  /* We should never land here with regular DP ports */
- WARN_ON(!is_edp(intel_dp));
+ WARN_ON(!intel_dp_is_edp(intel_dp));
 
  /*
  * TODO: BXT has 2 PPS instances. The correct port->PPS instance
@@ -834,7 +834,7 @@ static int edp_notify_handler(struct notifier_block *this, unsigned long code,
  struct drm_device *dev = intel_dp_to_dev(intel_dp);
  struct drm_i915_private *dev_priv = to_i915(dev);
 
- if (!is_edp(intel_dp) || code != SYS_RESTART)
+ if (!intel_dp_is_edp(intel_dp) || code != SYS_RESTART)
  return 0;
 
  pps_lock(intel_dp);
@@ -894,7 +894,7 @@ intel_dp_check_edp(struct intel_dp *intel_dp)
  struct drm_device *dev = intel_dp_to_dev(intel_dp);
  struct drm_i915_private *dev_priv = to_i915(dev);
 
- if (!is_edp(intel_dp))
+ if (!intel_dp_is_edp(intel_dp))
  return;
 
  if (!edp_have_panel_power(intel_dp) && !edp_have_panel_vdd(intel_dp)) {
@@ -1668,7 +1668,7 @@ intel_dp_compute_config(struct intel_encoder *encoder,
  else
  pipe_config->has_audio = intel_conn_state->force_audio == HDMI_AUDIO_ON;
 
- if (is_edp(intel_dp) && intel_connector->panel.fixed_mode) {
+ if (intel_dp_is_edp(intel_dp) && intel_connector->panel.fixed_mode) {
  struct drm_display_mode *panel_mode =
  intel_connector->panel.alt_fixed_mode;
  struct drm_display_mode *req_mode = &pipe_config->base.mode;
@@ -1717,7 +1717,7 @@ intel_dp_compute_config(struct intel_encoder *encoder,
  /* Walk through all bpp values. Luckily they're all nicely spaced with 2
  * bpc in between. */
  bpp = intel_dp_compute_bpp(intel_dp, pipe_config);
- if (is_edp(intel_dp)) {
+ if (intel_dp_is_edp(intel_dp)) {
 
  /* Get bpp from vbt only for panels that dont have bpp in edid */
  if (intel_connector->base.display_info.bpc == 0 &&
@@ -1810,7 +1810,7 @@ intel_dp_compute_config(struct intel_encoder *encoder,
  * DPLL0 VCO may need to be adjusted to get the correct
  * clock for eDP. This will affect cdclk as well.
  */
- if (is_edp(intel_dp) && IS_GEN9_BC(dev_priv)) {
+ if (intel_dp_is_edp(intel_dp) && IS_GEN9_BC(dev_priv)) {
  int vco;
 
  switch (pipe_config->port_clock / 2) {
@@ -2050,7 +2050,7 @@ static bool edp_panel_vdd_on(struct intel_dp *intel_dp)
 
  lockdep_assert_held(&dev_priv->pps_mutex);
 
- if (!is_edp(intel_dp))
+ if (!intel_dp_is_edp(intel_dp))
  return false;
 
  cancel_delayed_work(&intel_dp->panel_vdd_work);
@@ -2100,7 +2100,7 @@ void intel_edp_panel_vdd_on(struct intel_dp *intel_dp)
 {
  bool vdd;
 
- if (!is_edp(intel_dp))
+ if (!intel_dp_is_edp(intel_dp))
  return;
 
  pps_lock(intel_dp);
@@ -2184,7 +2184,7 @@ static void edp_panel_vdd_off(struct intel_dp *intel_dp, bool sync)
 
  lockdep_assert_held(&dev_priv->pps_mutex);
 
- if (!is_edp(intel_dp))
+ if (!intel_dp_is_edp(intel_dp))
  return;
 
  I915_STATE_WARN(!intel_dp->want_panel_vdd, "eDP port %c VDD not forced on",
@@ -2207,7 +2207,7 @@ static void edp_panel_on(struct intel_dp *intel_dp)
 
  lockdep_assert_held(&dev_priv->pps_mutex);
 
- if (!is_edp(intel_dp))
+ if (!intel_dp_is_edp(intel_dp))
  return;
 
  DRM_DEBUG_KMS("Turn eDP port %c panel power on\n",
@@ -2248,7 +2248,7 @@ static void edp_panel_on(struct intel_dp *intel_dp)
 
 void intel_edp_panel_on(struct intel_dp *intel_dp)
 {
- if (!is_edp(intel_dp))
+ if (!intel_dp_is_edp(intel_dp))
  return;
 
  pps_lock(intel_dp);
@@ -2266,7 +2266,7 @@ static void edp_panel_off(struct intel_dp *intel_dp)
 
  lockdep_assert_held(&dev_priv->pps_mutex);
 
- if (!is_edp(intel_dp))
+ if (!intel_dp_is_edp(intel_dp))
  return;
 
  DRM_DEBUG_KMS("Turn eDP port %c panel power off\n",
@@ -2297,7 +2297,7 @@ static void edp_panel_off(struct intel_dp *intel_dp)
 
 void intel_edp_panel_off(struct intel_dp *intel_dp)
 {
- if (!is_edp(intel_dp))
+ if (!intel_dp_is_edp(intel_dp))
  return;
 
  pps_lock(intel_dp);
@@ -2341,7 +2341,7 @@ void intel_edp_backlight_on(const struct intel_crtc_state *crtc_state,
 {
  struct intel_dp *intel_dp = enc_to_intel_dp(conn_state->best_encoder);
 
- if (!is_edp(intel_dp))
+ if (!intel_dp_is_edp(intel_dp))
  return;
 
  DRM_DEBUG_KMS("\n");
@@ -2358,7 +2358,7 @@ static void _intel_edp_backlight_off(struct intel_dp *intel_dp)
  u32 pp;
  i915_reg_t pp_ctrl_reg;
 
- if (!is_edp(intel_dp))
+ if (!intel_dp_is_edp(intel_dp))
  return;
 
  pps_lock(intel_dp);
@@ -2382,7 +2382,7 @@ void intel_edp_backlight_off(const struct drm_connector_state *old_conn_state)
 {
  struct intel_dp *intel_dp = enc_to_intel_dp(old_conn_state->best_encoder);
 
- if (!is_edp(intel_dp))
+ if (!intel_dp_is_edp(intel_dp))
  return;
 
  DRM_DEBUG_KMS("\n");
@@ -2647,7 +2647,7 @@ static void intel_dp_get_config(struct intel_encoder *encoder,
  intel_dotclock_calculate(pipe_config->port_clock,
  &pipe_config->dp_m_n);
 
- if (is_edp(intel_dp) && dev_priv->vbt.edp.bpp &&
+ if (intel_dp_is_edp(intel_dp) && dev_priv->vbt.edp.bpp &&
     pipe_config->pipe_bpp > dev_priv->vbt.edp.bpp) {
  /*
  * This is a big fat ugly hack.
@@ -3022,7 +3022,7 @@ static void vlv_init_panel_power_sequencer(struct intel_dp *intel_dp)
 
  intel_dp->active_pipe = crtc->pipe;
 
- if (!is_edp(intel_dp))
+ if (!intel_dp_is_edp(intel_dp))
  return;
 
  /* now it's all ours */
@@ -3773,7 +3773,7 @@ intel_dp_get_dpcd(struct intel_dp *intel_dp)
  return false;
 
  /* Don't clobber cached eDP rates. */
- if (!is_edp(intel_dp)) {
+ if (!intel_dp_is_edp(intel_dp)) {
  intel_dp_set_sink_rates(intel_dp);
  intel_dp_set_common_rates(intel_dp);
  }
@@ -3795,7 +3795,7 @@ intel_dp_get_dpcd(struct intel_dp *intel_dp)
  * downstream port information. So, an early return here saves
  * time from performing other operations which are not required.
  */
- if (!is_edp(intel_dp) && !intel_dp->sink_count)
+ if (!intel_dp_is_edp(intel_dp) && !intel_dp->sink_count)
  return false;
 
  if (!drm_dp_is_branch(intel_dp->dpcd))
@@ -4390,7 +4390,7 @@ intel_dp_detect_dpcd(struct intel_dp *intel_dp)
  if (!intel_dp_get_dpcd(intel_dp))
  return connector_status_disconnected;
 
- if (is_edp(intel_dp))
+ if (intel_dp_is_edp(intel_dp))
  return connector_status_connected;
 
  /* if there's no downstream port, we're done */
@@ -4649,7 +4649,7 @@ intel_dp_long_pulse(struct intel_connector *intel_connector)
  intel_display_power_get(to_i915(dev), intel_dp->aux_power_domain);
 
  /* Can't disconnect eDP, but you can close the lid... */
- if (is_edp(intel_dp))
+ if (intel_dp_is_edp(intel_dp))
  status = edp_detect(intel_dp);
  else if (intel_digital_port_connected(to_i915(dev),
       dp_to_dig_port(intel_dp)))
@@ -4729,7 +4729,7 @@ intel_dp_long_pulse(struct intel_connector *intel_connector)
  intel_dp->aux.i2c_defer_count = 0;
 
  intel_dp_set_edid(intel_dp);
- if (is_edp(intel_dp) || intel_connector->detect_edid)
+ if (intel_dp_is_edp(intel_dp) || intel_connector->detect_edid)
  status = connector_status_connected;
  intel_dp->detect_done = true;
 
@@ -4813,7 +4813,7 @@ static int intel_dp_get_modes(struct drm_connector *connector)
  }
 
  /* if eDP has no EDID, fall back to fixed mode */
- if (is_edp(intel_attached_dp(connector)) &&
+ if (intel_dp_is_edp(intel_attached_dp(connector)) &&
     intel_connector->panel.fixed_mode) {
  struct drm_display_mode *mode;
 
@@ -4864,8 +4864,10 @@ intel_dp_connector_destroy(struct drm_connector *connector)
  if (!IS_ERR_OR_NULL(intel_connector->edid))
  kfree(intel_connector->edid);
 
- /* Can't call is_edp() since the encoder may have been destroyed
- * already. */
+ /*
+ * Can't call intel_dp_is_edp() since the encoder may have been
+ * destroyed already.
+ */
  if (connector->connector_type == DRM_MODE_CONNECTOR_eDP)
  intel_panel_fini(&intel_connector->panel);
 
@@ -4879,7 +4881,7 @@ void intel_dp_encoder_destroy(struct drm_encoder *encoder)
  struct intel_dp *intel_dp = &intel_dig_port->dp;
 
  intel_dp_mst_encoder_cleanup(intel_dig_port);
- if (is_edp(intel_dp)) {
+ if (intel_dp_is_edp(intel_dp)) {
  cancel_delayed_work_sync(&intel_dp->panel_vdd_work);
  /*
  * vdd might still be enabled do to the delayed vdd off.
@@ -4905,7 +4907,7 @@ void intel_dp_encoder_suspend(struct intel_encoder *intel_encoder)
 {
  struct intel_dp *intel_dp = enc_to_intel_dp(&intel_encoder->base);
 
- if (!is_edp(intel_dp))
+ if (!intel_dp_is_edp(intel_dp))
  return;
 
  /*
@@ -4973,7 +4975,7 @@ void intel_dp_encoder_reset(struct drm_encoder *encoder)
  if (IS_VALLEYVIEW(dev_priv) || IS_CHERRYVIEW(dev_priv))
  intel_dp->active_pipe = vlv_active_pipe(intel_dp);
 
- if (is_edp(intel_dp)) {
+ if (intel_dp_is_edp(intel_dp)) {
  /* Reinit the power sequencer, in case BIOS did something with it. */
  intel_dp_pps_init(encoder->dev, intel_dp);
  intel_edp_panel_vdd_sanitize(intel_dp);
@@ -5099,7 +5101,7 @@ intel_dp_add_properties(struct intel_dp *intel_dp, struct drm_connector *connect
  intel_attach_force_audio_property(connector);
  intel_attach_broadcast_rgb_property(connector);
 
- if (is_edp(intel_dp)) {
+ if (intel_dp_is_edp(intel_dp)) {
  u32 allowed_scalers;
 
  allowed_scalers = BIT(DRM_MODE_SCALE_ASPECT) | BIT(DRM_MODE_SCALE_FULLSCREEN);
@@ -5754,7 +5756,7 @@ static bool intel_edp_init_connector(struct intel_dp *intel_dp,
  struct edid *edid;
  enum pipe pipe = INVALID_PIPE;
 
- if (!is_edp(intel_dp))
+ if (!intel_dp_is_edp(intel_dp))
  return true;
 
  /*
@@ -5992,7 +5994,8 @@ intel_dp_init_connector(struct intel_digital_port *intel_dig_port,
 
  /* eDP only on port B and/or C on vlv/chv */
  if (WARN_ON((IS_VALLEYVIEW(dev_priv) || IS_CHERRYVIEW(dev_priv)) &&
-    is_edp(intel_dp) && port != PORT_B && port != PORT_C))
+    intel_dp_is_edp(intel_dp) &&
+    port != PORT_B && port != PORT_C))
  return false;
 
  DRM_DEBUG_KMS("Adding %s connector on port %c\n",
@@ -6020,7 +6023,7 @@ intel_dp_init_connector(struct intel_digital_port *intel_dig_port,
  intel_connector->get_hw_state = intel_connector_get_hw_state;
 
  /* init MST on ports that can support it */
- if (HAS_DP_MST(dev_priv) && !is_edp(intel_dp) &&
+ if (HAS_DP_MST(dev_priv) && !intel_dp_is_edp(intel_dp) &&
     (port == PORT_B || port == PORT_C || port == PORT_D))
  intel_dp_mst_encoder_init(intel_dig_port,
   intel_connector->base.base.id);
diff --git a/drivers/gpu/drm/i915/intel_drv.h b/drivers/gpu/drm/i915/intel_drv.h
index 488223e..45815ca 100644
--- a/drivers/gpu/drm/i915/intel_drv.h
+++ b/drivers/gpu/drm/i915/intel_drv.h
@@ -1523,6 +1523,7 @@ int intel_dp_sink_crc(struct intel_dp *intel_dp, u8 *crc);
 bool intel_dp_compute_config(struct intel_encoder *encoder,
      struct intel_crtc_state *pipe_config,
      struct drm_connector_state *conn_state);
+bool intel_dp_is_edp(struct intel_dp *intel_dp);
 bool intel_dp_is_port_edp(struct drm_i915_private *dev_priv, enum port port);
 enum irqreturn intel_dp_hpd_pulse(struct intel_digital_port *intel_dig_port,
   bool long_hpd);
--
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 4/4][Artful][linux-oem] drm/i915/edp: Do not do link training fallback or prune modes on EDP

AceLan Kao
In reply to this post by 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]>
(backported from commit a306343bcd7df89d9d45a601929e26866e7b7a81)
Signed-off-by: AceLan Kao <[hidden email]>
---
 drivers/gpu/drm/i915/intel_dp_link_training.c | 24 +++++++++++++++++-------
 1 file changed, 17 insertions(+), 7 deletions(-)

diff --git a/drivers/gpu/drm/i915/intel_dp_link_training.c b/drivers/gpu/drm/i915/intel_dp_link_training.c
index b79c1c0..4b1d012 100644
--- a/drivers/gpu/drm/i915/intel_dp_link_training.c
+++ b/drivers/gpu/drm/i915/intel_dp_link_training.c
@@ -326,12 +326,22 @@ intel_dp_start_link_train(struct intel_dp *intel_dp)
  return;
 
  failure_handling:
- DRM_DEBUG_KMS("Link Training failed at link rate = %d, lane count = %d",
-      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
|

APPLIED/OEM: Re: [PATCH 0/4][Artful][linux-oem][8086:3e92] display becomes blank after S3

Timo Aaltonen-6
In reply to this post by AceLan Kao
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 <[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.
> 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


--
t

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

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

Kleber Sacilotto de Souza
In reply to this post by AceLan Kao
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 <[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.
> 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 <[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/cmnt: [PATCH 0/4][Artful][linux-oem][8086:3e92] display becomes blank after S3

Stefan Bader-2
In reply to this post by AceLan Kao
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 <[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.
> 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 <[hidden email]>



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

signature.asc (836 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

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

Stefan Bader-2
In reply to this post by AceLan Kao
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 <[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.
> 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



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

signature.asc (836 bytes) Download Attachment