All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/5] Link Training failure handling during modeset
@ 2016-11-18  7:13 Manasi Navare
  2016-11-18  7:13 ` [PATCH 1/5] drm: Add a new connector property for link status Manasi Navare
                   ` (6 more replies)
  0 siblings, 7 replies; 41+ messages in thread
From: Manasi Navare @ 2016-11-18  7:13 UTC (permalink / raw)
  To: dri-devel, intel-gfx; +Cc: Manasi Navare

Submitting this series again since it had to be rebased dur to changes
in drm that got merged.

The idea presented in these patches is to address link training failure
in a way that:
a) changes the current happy day scenario as little as possible, to avoid
regressions, b) can be implemented the same way by all drm drivers, c)
is still opt-in for the drivers and userspace, and opting out doesn't
regress the user experience, d) doesn't prevent drivers from
implementing better or alternate approaches, possibly without userspace
involvement. And, of course, handles all the issues presented.

The solution is to add a "link status" connector property. In the usual
happy day scenario, this is always "good". If something fails during or
after a mode set, the kernel driver can set the link status to "bad",
prune the mode list based on new information as necessary, and send a
hotplug uevent for userspace to have it re-check the valid modes through
getconnector, and try again. If the theoretical capabilities of the link
can't be reached, the mode list is trimmed based on that.

If the userspace is not aware of the property, the user experience is
the same as it currently is. If the userspace is aware of the property,
it has a chance to improve user experience. If a drm driver does not
modify the property (it stays "good"), the user experience is the same
as it currently is. A drm driver can also choose to try to handle more
of the failures in kernel, hardware not limiting, or it can choose to
involve userspace more. Up to the drivers.

The reason for adding the property is to handle link training failures,
but it is not limited to DP or link training. For example, if we
implement asynchronous setcrtc, we can use this to report any failures
in that.

Finally, while DP CTS compliance is advertized (which is great, and
could be made to work similarly for all drm drivers), this can be used
for the more important goal of improving user experience on link
training failures, by avoiding black screens.

Manasi Navare (5):
  drm: Add a new connector property for link status
  drm: Set DRM connector link status property
  drm/i915: Update CRTC state if connector link status property changed
  drm/i915: Find fallback link rate/lane count
  drm/i915: Implement Link Rate fallback on Link training failure

 drivers/gpu/drm/drm_atomic_helper.c           |   7 ++
 drivers/gpu/drm/drm_connector.c               |  54 ++++++++++++++
 drivers/gpu/drm/i915/intel_dp.c               | 103 +++++++++++++++++++++++++-
 drivers/gpu/drm/i915/intel_dp_link_training.c |  28 ++++++-
 drivers/gpu/drm/i915/intel_drv.h              |   7 ++
 include/drm/drm_connector.h                   |   9 ++-
 include/drm/drm_mode_config.h                 |   5 ++
 include/uapi/drm/drm_mode.h                   |   4 +
 8 files changed, 212 insertions(+), 5 deletions(-)

-- 
1.9.1

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 41+ messages in thread
* [PATCH 0/5] Clean series for Link training failure handling
@ 2016-11-19  2:58 Manasi Navare
  2016-11-19  2:59 ` [PATCH 3/5] drm/i915: Update CRTC state if connector link status property changed Manasi Navare
  0 siblings, 1 reply; 41+ messages in thread
From: Manasi Navare @ 2016-11-19  2:58 UTC (permalink / raw)
  To: intel-gfx, dri-devel

The idea presented in these patches is to address link training failure
in a way that:
a) changes the current happy day scenario as little as possible, to avoid
regressions, b) can be implemented the same way by all drm drivers, c)
is still opt-in for the drivers and userspace, and opting out doesn't
regress the user experience, d) doesn't prevent drivers from
implementing better or alternate approaches, possibly without userspace
involvement. And, of course, handles all the issues presented.

The solution is to add a "link status" connector property. In the usual
happy day scenario, this is always "good". If something fails during or
after a mode set, the kernel driver can set the link status to "bad",
prune the mode list based on new information as necessary, and send a
hotplug uevent for userspace to have it re-check the valid modes through
getconnector, and try again. If the theoretical capabilities of the link
can't be reached, the mode list is trimmed based on that.

If the userspace is not aware of the property, the user experience is
the same as it currently is. If the userspace is aware of the property,
it has a chance to improve user experience. If a drm driver does not
modify the property (it stays "good"), the user experience is the same
as it currently is. A drm driver can also choose to try to handle more
of the failures in kernel, hardware not limiting, or it can choose to
involve userspace more. Up to the drivers.

The reason for adding the property is to handle link training failures,
but it is not limited to DP or link training. For example, if we
implement asynchronous setcrtc, we can use this to report any failures
in that.

Finally, while DP CTS compliance is advertized (which is great, and
could be made to work similarly for all drm drivers), this can be used
for the more important goal of improving user experience on link
training failures, by avoiding black screens.


Manasi Navare (5):
  drm: Add a new connector property for link status
  drm: Set DRM connector link status property
  drm/i915: Update CRTC state if connector link status property changed
  drm/i915: Find fallback link rate/lane count
  drm/i915: Implement Link Rate fallback on Link training failure

 drivers/gpu/drm/drm_atomic_helper.c           |   7 ++
 drivers/gpu/drm/drm_connector.c               |  65 +++++++++++++++-
 drivers/gpu/drm/i915/intel_dp.c               | 103 +++++++++++++++++++++++++-
 drivers/gpu/drm/i915/intel_dp_link_training.c |  28 ++++++-
 drivers/gpu/drm/i915/intel_drv.h              |   7 ++
 include/drm/drm_connector.h                   |   9 ++-
 include/drm/drm_mode_config.h                 |   5 ++
 include/uapi/drm/drm_mode.h                   |   4 +
 8 files changed, 221 insertions(+), 7 deletions(-)

-- 
1.9.1

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

^ permalink raw reply	[flat|nested] 41+ messages in thread
* [PATCH 0/5] Handle link training failure during modeset
@ 2016-11-15  3:13 Manasi Navare
  2016-11-15  3:13 ` [PATCH 3/5] drm/i915: Update CRTC state if connector link status property changed Manasi Navare
  0 siblings, 1 reply; 41+ messages in thread
From: Manasi Navare @ 2016-11-15  3:13 UTC (permalink / raw)
  To: intel-gfx, dri-devel; +Cc: Manasi Navare

Submitting new series that adds proper commit messages/cover letter
and kernel documentation. It also moved the set_link_status function
to drm core so other kernel drivers can make use of it.

The idea presented in these patches is to address link training failure
in a way that:
a) changes the current happy day scenario as little as possible, to avoid
regressions, b) can be implemented the same way by all drm drivers, c)
is still opt-in for the drivers and userspace, and opting out doesn't
regress the user experience, d) doesn't prevent drivers from
implementing better or alternate approaches, possibly without userspace
involvement. And, of course, handles all the issues presented.

The solution is to add a "link status" connector property. In the usual
happy day scenario, this is always "good". If something fails during or
after a mode set, the kernel driver can set the link status to "bad",
prune the mode list based on new information as necessary, and send a
hotplug uevent for userspace to have it re-check the valid modes through
getconnector, and try again. If the theoretical capabilities of the link
can't be reached, the mode list is trimmed based on that.

If the userspace is not aware of the property, the user experience is
the same as it currently is. If the userspace is aware of the property,
it has a chance to improve user experience. If a drm driver does not
modify the property (it stays "good"), the user experience is the same
as it currently is. A drm driver can also choose to try to handle more
of the failures in kernel, hardware not limiting, or it can choose to
involve userspace more. Up to the drivers.

The reason for adding the property is to handle link training failures,
but it is not limited to DP or link training. For example, if we
implement asynchronous setcrtc, we can use this to report any failures
in that.

Finally, while DP CTS compliance is advertized (which is great, and
could be made to work similarly for all drm drivers), this can be used
for the more important goal of improving user experience on link
training failures, by avoiding black screens.

Acked-by: Tony Cheng <tony.cheng@amd.com>
Acked-by: Harry Wentland <Harry.wentland@amd.com>

Manasi Navare (5):
  drm: Add a new connector property for link status
  drm: Set DRM connector link status property
  drm/i915: Update CRTC state if connector link status property changed
  drm/i915: Find fallback link rate/lane count
  drm/i915: Implement Link Rate fallback on Link training failure

 drivers/gpu/drm/drm_atomic_helper.c           |   7 ++
 drivers/gpu/drm/drm_connector.c               |  55 ++++++++++
 drivers/gpu/drm/i915/intel_ddi.c              |  21 +++-
 drivers/gpu/drm/i915/intel_dp.c               | 144 +++++++++++++++++++++++++-
 drivers/gpu/drm/i915/intel_dp_link_training.c |  12 ++-
 drivers/gpu/drm/i915/intel_drv.h              |  10 +-
 include/drm/drm_connector.h                   |   9 +-
 include/drm/drm_crtc.h                        |   5 +
 include/uapi/drm/drm_mode.h                   |   4 +
 9 files changed, 257 insertions(+), 10 deletions(-)

-- 
1.9.1

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 41+ messages in thread
* [PATCH 0/5] Handle Link Training Failure during modeset
@ 2016-11-10  4:42 Manasi Navare
  2016-11-10  4:42 ` [PATCH 3/5] drm/i915: Update CRTC state if connector link status property changed Manasi Navare
  0 siblings, 1 reply; 41+ messages in thread
From: Manasi Navare @ 2016-11-10  4:42 UTC (permalink / raw)
  To: dri-devel, intel-gfx

Link training failure is handled by lowering the link rate first
until it reaches the minimum and keeping the lane count maximum
and then lowering the lane count until it reaches minimim. These
fallback values are saved and hotplug uevent is sent to the userspace
after setting the connector link status property to BAD. Userspace
should triiger another modeset on a uevent and if link status property
is BAD. This will retrain the link at fallback values.
This is repeated until the link is successfully trained.

This has been validated to pass DP compliance.

Manasi Navare (5):
  drm: Add a new connector property for link status
  drm/i915: Set link status property for DP connector
  drm/i915: Update CRTC state if connector link status property changed
  drm/i915: Find fallback link rate/lane count
  drm/i915: Implement Link Rate fallback on Link training failure

 drivers/gpu/drm/drm_atomic_helper.c           |   7 ++
 drivers/gpu/drm/drm_connector.c               |  17 ++++
 drivers/gpu/drm/i915/intel_ddi.c              |  21 +++-
 drivers/gpu/drm/i915/intel_dp.c               | 138 +++++++++++++++++++++++++-
 drivers/gpu/drm/i915/intel_dp_link_training.c |  12 ++-
 drivers/gpu/drm/i915/intel_drv.h              |  12 ++-
 include/drm/drm_connector.h                   |   7 +-
 include/drm/drm_crtc.h                        |   5 +
 include/uapi/drm/drm_mode.h                   |   4 +
 9 files changed, 214 insertions(+), 9 deletions(-)

-- 
1.9.1

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

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

end of thread, other threads:[~2016-11-23  7:44 UTC | newest]

Thread overview: 41+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-11-18  7:13 [PATCH 0/5] Link Training failure handling during modeset Manasi Navare
2016-11-18  7:13 ` [PATCH 1/5] drm: Add a new connector property for link status Manasi Navare
2016-11-19  2:50   ` [PATCH v5 " Manasi Navare
2016-11-21  9:33     ` Daniel Vetter
2016-11-18  7:13 ` [PATCH 2/5] drm: Set DRM connector link status property Manasi Navare
2016-11-19  2:50   ` [PATCH v3 " Manasi Navare
2016-11-18  7:13 ` [PATCH 3/5] drm/i915: Update CRTC state if connector link status property changed Manasi Navare
2016-11-18 13:50   ` Maarten Lankhorst
2016-11-18 14:11     ` Ville Syrjälä
2016-11-18 14:18       ` Maarten Lankhorst
2016-11-18 15:28         ` Ville Syrjälä
2016-11-18 15:35           ` [Intel-gfx] " Daniel Vetter
2016-11-18 16:21             ` Ville Syrjälä
2016-11-18 17:44               ` [Intel-gfx] " Manasi Navare
2016-11-21  9:38                 ` Daniel Vetter
2016-11-21  9:42                   ` Chris Wilson
2016-11-21 10:10                     ` [Intel-gfx] " Daniel Vetter
2016-11-21 15:48                       ` Daniel Vetter
2016-11-21 19:00                         ` Manasi Navare
2016-11-21 20:46                           ` Chris Wilson
2016-11-21 21:07                             ` [Intel-gfx] " Manasi Navare
2016-11-23  1:15                         ` Manasi Navare
2016-11-23  7:44                           ` Daniel Vetter
2016-11-18 18:13             ` [Intel-gfx] " Manasi Navare
2016-11-18 15:23       ` Manasi Navare
2016-11-18  7:13 ` [PATCH 4/5] drm/i915: Find fallback link rate/lane count Manasi Navare
2016-11-18  7:29   ` Manasi Navare
2016-11-18 13:22     ` Jani Nikula
2016-11-18 15:39       ` Manasi Navare
2016-11-19  2:09         ` Manasi Navare
2016-11-19  2:50   ` [PATCH v6 4/56 4/56 4/56 4/56 4/56 " Manasi Navare
2016-11-18  7:13 ` [PATCH 5/5] drm/i915: Implement Link Rate fallback on Link training failure Manasi Navare
2016-11-18  7:29   ` Manasi Navare
2016-11-18 13:31     ` Jani Nikula
2016-11-18 15:29       ` Manasi Navare
2016-11-19  2:50   ` [PATCH v8 " Manasi Navare
2016-11-18  8:31 ` ✗ Fi.CI.BAT: failure for Link Training failure handling during modeset (rev3) Patchwork
2016-11-19  4:01 ` ✗ Fi.CI.BAT: failure for Link Training failure handling during modeset (rev4) Patchwork
  -- strict thread matches above, loose matches on Subject: below --
2016-11-19  2:58 [PATCH 0/5] Clean series for Link training failure handling Manasi Navare
2016-11-19  2:59 ` [PATCH 3/5] drm/i915: Update CRTC state if connector link status property changed Manasi Navare
2016-11-15  3:13 [PATCH 0/5] Handle link training failure during modeset Manasi Navare
2016-11-15  3:13 ` [PATCH 3/5] drm/i915: Update CRTC state if connector link status property changed Manasi Navare
2016-11-10  4:42 [PATCH 0/5] Handle Link Training Failure during modeset Manasi Navare
2016-11-10  4:42 ` [PATCH 3/5] drm/i915: Update CRTC state if connector link status property changed Manasi Navare

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.