From: Mika Kahola <mika.kahola@intel.com>
To: Matthew Auld <matthew.auld@intel.com>, intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH] drm/i915/dp: add lane_count check in intel_dp_check_link_status
Date: Wed, 31 Aug 2016 14:20:09 +0300 [thread overview]
Message-ID: <1472642409.13725.4.camel@intel.com> (raw)
In-Reply-To: <1472304805-4409-1-git-send-email-matthew.auld@intel.com>
On Sat, 2016-08-27 at 14:33 +0100, Matthew Auld wrote:
> Currently it's entirely possible to go through the link training step
> without first determining the lane_count, which is silly since we end
> up
> doing a bunch of aux transfers of size = 0, as highlighted by
> WARN_ON(!msg->buffer != !msg->size), and can only ever result in a
> 'failed to update link training' message. This can be observed during
> intel_dp_long_pulse where we can do the link training step, but
> before
> we have had a chance to set the link params. To avoid this we add an
> extra check for the lane_count in intel_dp_check_link_status, which
> should prevent us from doing the link training step prematurely.
>
> References: https://bugs.freedesktop.org/show_bug.cgi?id=97344
> Cc: Jani Nikula <jani.nikula@linux.intel.com>
> Signed-off-by: Matthew Auld <matthew.auld@intel.com>
> ---
> drivers/gpu/drm/i915/intel_dp.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/drivers/gpu/drm/i915/intel_dp.c
> b/drivers/gpu/drm/i915/intel_dp.c
> index a3c7dd8..0dbb672 100644
> --- a/drivers/gpu/drm/i915/intel_dp.c
> +++ b/drivers/gpu/drm/i915/intel_dp.c
> @@ -3927,6 +3927,9 @@ intel_dp_check_link_status(struct intel_dp
> *intel_dp)
> if (!to_intel_crtc(intel_encoder->base.crtc)->active)
> return;
>
> + if (!intel_dp->lane_count)
> + return;
> +
> /* if link training is requested we should perform it always
> */
> if ((intel_dp->compliance_test_type ==
> DP_TEST_LINK_TRAINING) ||
> (!drm_dp_channel_eq_ok(link_status, intel_dp-
> >lane_count))) {
Should we place this check as part drm_dp_helper()'s
drm_dp_channel_eq_ok() routine as this may happen with other than our
i915 driver as well?
--
Mika Kahola - Intel OTC
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2016-08-31 11:20 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-08-27 13:33 [PATCH] drm/i915/dp: add lane_count check in intel_dp_check_link_status Matthew Auld
2016-08-27 14:19 ` ✗ Fi.CI.BAT: failure for " Patchwork
2016-08-31 11:20 ` Mika Kahola [this message]
2016-09-06 14:43 ` [PATCH] " Ville Syrjälä
2016-10-19 17:05 ` Ville Syrjälä
-- strict thread matches above, loose matches on Subject: below --
2016-10-19 21:29 Matthew Auld
2016-10-20 8:37 ` Ville Syrjälä
2016-10-24 14:21 ` Jani Nikula
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=1472642409.13725.4.camel@intel.com \
--to=mika.kahola@intel.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=matthew.auld@intel.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 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.