From: "Thulasimani, Sivakumar" <sivakumar.thulasimani@intel.com>
To: Daniel Vetter <daniel@ffwll.ch>, Rodrigo Vivi <rodrigo.vivi@intel.com>
Cc: Jani Nikula <jani.nikula@intel.com>,
Daniel Vetter <daniel.vetter@ffwll.ch>,
intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH 3/4] drm/i915: Fix random aux transactions failures.
Date: Wed, 21 Oct 2015 23:47:15 +0530 [thread overview]
Message-ID: <5627D6AA.4010801@intel.com> (raw)
In-Reply-To: <20151021072311.GM13786@phenom.ffwll.local>
On 10/21/2015 12:53 PM, Daniel Vetter wrote:
> On Wed, Oct 21, 2015 at 09:18:06AM +0200, Daniel Vetter wrote:
>> On Wed, Oct 21, 2015 at 10:28:53AM -0700, Rodrigo Vivi wrote:
>>> Mainly aux communications on sink_crc
>>> were failing a lot randomly on recent platforms.
>>> The first solution was to try to use intel_dp_dpcd_read_wake, but then
>>> it was suggested to move retries to drm level.
>>>
>>> Since drm level was already taking care of retries and didn't want
>>> to through random retries on that level the second solution was to
>>> put the retries at aux_transfer layer what was nacked.
>>>
>>> So I realized we had so many retries in different places and
>>> started to organize that a bit. During this organization I noticed
>>> that we weren't handing at all the case were the message size was
>>> zeroed. And this was exactly the case that was affecting sink_crc.
>>>
>>> Also we weren't respect BSPec who says this size message = 0 or > 20
>>> are forbidden.
>>>
>>> It is a fact that we still have no clue why we are getting this
>>> forbidden value there. But anyway we need to handle that for now
>>> so we return -EBUSY and drm level takes care of the retries that
>>> are already in place.
>>>
>>> Cc: Jani Nikula <jani.nikula@intel.com>
>>> Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
>>> Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
>>> ---
>>> drivers/gpu/drm/i915/intel_dp.c | 11 +++++++++++
>>> 1 file changed, 11 insertions(+)
>>>
>>> diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c
>>> index aa3d8f6..80850d6 100644
>>> --- a/drivers/gpu/drm/i915/intel_dp.c
>>> +++ b/drivers/gpu/drm/i915/intel_dp.c
>>> @@ -911,6 +911,17 @@ done:
>>> /* Unload any bytes sent back from the other side */
>>> recv_bytes = ((status & DP_AUX_CH_CTL_MESSAGE_SIZE_MASK) >>
>>> DP_AUX_CH_CTL_MESSAGE_SIZE_SHIFT);
>>> +
>>> + /*
>>> + * By BSpec: "Message sizes of 0 or >20 are not allowed."
>>> + * We have no idea of what happened so we return -EBUSY so
>>> + * drm layer takes care for the necessary retries.
>>> + */
>>> + if (recv_bytes == 0 || recv_bytes > 20) {
>>> + ret = -EBUSY;
>>> + goto out;
>>> + }
>> Hm, this should be caught be the dp aux helper library. Both callers for
>> ->transfer should check for this and reject with -EINVAL (since such a
>> transaction is simply not allowed by dp aux). In the case of
>> drm_dp_i2c_do_msg maybe even with a WARN_ON since the i2c logic should
>> split things up correctly.
> Meh, totally misread what's going on here, this is from the hardware. How
> does this even happen? Do you get some kind of garbage value? Should we
> maybe clear this register field first? It certainly would explain a lot of
> our random dp aux retry fun ...
> -Daniel
we are already checking for read size in intel_dp_aux_transfer
if (WARN_ON(rxsize > 20))
return -E2BIG;
and again inside intel_dp_aux_ch
843 /* Only 5 data registers! */
844 if (WARN_ON(send_bytes > 20 || recv_size > 20)) {
845 ret = -E2BIG;
846 goto out;
847 }
Also isn't it possible that a simple write command will have 0 for
receive size ?
can you share bit more details on what scenario this patch is helping ?
regards,
Sivakumar
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2015-10-21 18:17 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-21 17:28 [PATCH 0/4] Organize aux retries Rodrigo Vivi
2015-10-21 17:28 ` [PATCH 1/4] drm/i915: Avoid EBUSY retry on intel_dp_aux_ch Rodrigo Vivi
2015-10-21 9:19 ` Ville Syrjälä
2015-10-21 14:24 ` Vivi, Rodrigo
2015-10-21 18:01 ` Thulasimani, Sivakumar
2015-10-21 19:55 ` Vivi, Rodrigo
2015-10-21 17:28 ` [PATCH 2/4] drm/i915: Remove remaining retries from intel_dp_aux_ch Rodrigo Vivi
2015-10-21 17:28 ` [PATCH 3/4] drm/i915: Fix random aux transactions failures Rodrigo Vivi
2015-10-21 7:18 ` Daniel Vetter
2015-10-21 7:23 ` Daniel Vetter
2015-10-21 18:17 ` Thulasimani, Sivakumar [this message]
2015-10-21 19:57 ` Vivi, Rodrigo
2015-10-21 17:28 ` [PATCH 4/4] drm/i915: Kill intel_dp_dpcd_read_wake Rodrigo Vivi
2015-10-21 9:23 ` Ville Syrjälä
2015-10-21 14:31 ` Vivi, Rodrigo
2015-10-21 14:34 ` Ville Syrjälä
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=5627D6AA.4010801@intel.com \
--to=sivakumar.thulasimani@intel.com \
--cc=daniel.vetter@ffwll.ch \
--cc=daniel@ffwll.ch \
--cc=intel-gfx@lists.freedesktop.org \
--cc=jani.nikula@intel.com \
--cc=rodrigo.vivi@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox