public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
From: Daniel Vetter <daniel@ffwll.ch>
To: Paulo Zanoni <przanoni@gmail.com>
Cc: Intel Graphics Development <intel-gfx@lists.freedesktop.org>
Subject: Re: [PATCH 08/12] drm/i915: Improve reliability for Displayport link training
Date: Wed, 30 Jul 2014 17:25:16 +0200	[thread overview]
Message-ID: <20140730152516.GU4747@phenom.ffwll.local> (raw)
In-Reply-To: <CA+gsUGSEMS2nPwa5MbQ-6TeXEaOkAvoAKtB45XHmMCdn_5R7fQ@mail.gmail.com>

On Wed, Jul 30, 2014 at 11:07:34AM -0300, Paulo Zanoni wrote:
> 2014-07-14 16:10 GMT-03:00 Todd Previte <tprevite@gmail.com>:
> > Link training for Displayport can fail in many ways and at multiple different points
> > during the training process. Previously, errors were logged but no additional action
> > was taken based on them. Consequently, training attempts could continue even after
> > errors have occured that would prevent successful link training. This patch updates
> > the link training functions and where/how they're used to be more intelligent about
> > failures and to stop trying to train the link when it's a lost cause.
> 
> I agree we need to do something about this problem, but I'm not sure
> how this patch improves the situation. Can you please describe more
> how exactly the changes you did are getting us towards the solution of
> the problem? Of course, the points where you start signaling
> previously-unsignaled errors are obviously an improvement.
> 
> Anyway, this patch should probably be split in 3:
> - A patch to add the boolean return values and change
> intel_dp_check_link_status() + intel_enable_dp() +
> intel_ddi_pre_enable().
> - A patch to signal dpcd error cases we were previously ignoring.
> - A patch to that changes how intel_dp_start_link_train() and
> intel_dp_stop_link_train() currently behave (the "goto"s replacing
> "break" statements).
> Se below for better explanations.
> 
> 
> The big problem here is that these encoder callbacks never fail, so
> there's not really much to do after we detect a sink failure.
> 
> In the current code (without your patch), we already clearly signal
> the link training failures with debug+error messages, so the new debug
> messages at places linke intel_enable_dp() are not much of an
> improvement. Also, we already run intel_dp_set_idle_link_train() at
> the end of intel_dp_complete_link_train(), and we do additional things
> such as calling intel_dp_stop_link_train(). And I guess we do the
> non-DDI equivalent steps at some point too, so I'm not sure how
> jumping straight to intel_dp_set_idle_link_train() helps, since we do
> it anyway as part of the normal sequence. Also, our mode set sequence
> is currently completely followed - even though the sink fails to
> understand what we throw at it - and I'm always afraid of not
> following the sequence exactly as described in the spec, since it
> could lead to unpredicted bugs (we had this problem dozens of times in
> the past).
> 
> I think the real cool solution would be to retry link training with
> different parameters (different clock and number of lanes), but I
> imagine this would require a lot of code refactoring since we probably
> need to go back to the compute_config stages of the modeset sequence.
> Or maybe just finding a way to tell the user-space modesetting app
> that it has a black screen would already be helpful.
> 
> Other people may think that the real-real long-term solution would be
> to fix our code so it never fails link training or gives black screens
> :)

DP spec says that we need to be able to retrain. My rough idea was that we
set some flags in pipe config (or wire up return values) which signals
that we need to rerun the modeset (including compute_config and all that).

To keep the link bw/count limits around we could add some flags to the
pipe config or something (and not completely clear it ofc).
-Daniel
-- 
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch

  reply	other threads:[~2014-07-30 15:25 UTC|newest]

Thread overview: 44+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-14 19:10 [PATCH v2] Displayport compliance testing Todd Previte
2014-07-14 19:10 ` [PATCH 01/12] drm/i915: Add automated testing support for " Todd Previte
2014-07-21 22:09   ` Paulo Zanoni
2014-07-30 14:49   ` Paulo Zanoni
2014-07-14 19:10 ` [PATCH 02/12] drm/i915: Add a function to compute the EDID checksum for Displayport compliance Todd Previte
2014-07-21 22:28   ` Paulo Zanoni
2014-07-14 19:10 ` [PATCH 03/12] drm/i915: Add counters in the drm_dp_aux struct for I2C NACKs and DEFERs Todd Previte
2014-07-21 22:37   ` Paulo Zanoni
2014-11-04 22:17     ` [PATCH 02/10] " Todd Previte
2014-11-04 22:26       ` Daniel Vetter
2014-07-14 19:10 ` [PATCH 04/12] drm/i915: Add wrapper function for intel_crtc_set_config() Todd Previte
2014-07-21 23:34   ` Paulo Zanoni
2014-07-14 19:10 ` [PATCH 05/12] drm/i915: Add a function to get the EDID preferred mode for Displayport compliance testing Todd Previte
2014-07-21 23:41   ` Paulo Zanoni
2014-07-14 19:10 ` [PATCH 06/12] drm/i915: Add a constant and function for getting the Displayport compliance failsafe video mode Todd Previte
2014-07-21 23:42   ` Paulo Zanoni
2014-07-14 19:10 ` [PATCH 07/12] drm/i915: Update EDID automated test function for Displayport compliance Todd Previte
2014-07-29 22:37   ` Paulo Zanoni
2014-07-31 18:27     ` Todd Previte
2014-07-14 19:10 ` [PATCH 08/12] drm/i915: Improve reliability for Displayport link training Todd Previte
2014-07-30 14:07   ` Paulo Zanoni
2014-07-30 15:25     ` Daniel Vetter [this message]
2014-07-14 19:10 ` [PATCH 09/12] drm/i915: Update intel_dp_check_link_status() for Displayport compliance testing Todd Previte
2014-07-30 14:29   ` Paulo Zanoni
2014-07-14 19:10 ` [PATCH 10/12] drm/i915: Update link training automated test function for Displayport compliance Todd Previte
2014-07-22  6:15   ` Daniel Vetter
2014-07-22 20:40     ` Jesse Barnes
2014-07-22 20:44       ` Daniel Vetter
2014-07-22 21:03         ` Jesse Barnes
2014-07-14 19:10 ` [PATCH 11/12] drm/i915: Minor code clean up in intel_dp.c Todd Previte
2014-07-15  7:47   ` Daniel Vetter
2014-07-15 15:35     ` Todd Previte
2014-07-14 19:10 ` [PATCH 12/12] drm/i915: Add a delay in Displayport AUX transactions for compliance testing Todd Previte
2014-07-15  7:46   ` Daniel Vetter
2014-07-15 15:34     ` Todd Previte
2014-07-30 14:46       ` Paulo Zanoni
2014-07-22  6:41 ` [PATCH v2] Displayport " Daniel Vetter
2014-07-22 20:48   ` Jesse Barnes
2014-07-22 20:53     ` Daniel Vetter
2014-07-22 21:11       ` Jesse Barnes
2014-07-29 21:53         ` Paulo Zanoni
2014-07-30  9:31           ` Daniel Vetter
2014-07-31 18:27           ` Todd Previte
2014-07-22 20:57     ` Jesse Barnes

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20140730152516.GU4747@phenom.ffwll.local \
    --to=daniel@ffwll.ch \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=przanoni@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox