public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
From: Jani Nikula <jani.nikula@linux.intel.com>
To: Todd Previte <tprevite@gmail.com>, intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH 1/4] drm/i915/dp: retry i2c-over-aux seven times on AUX DEFER
Date: Tue, 24 Sep 2013 09:39:23 +0300	[thread overview]
Message-ID: <87ioxq67vo.fsf@intel.com> (raw)
In-Reply-To: <523CB256.4050101@gmail.com>


Hi Todd -

On Fri, 20 Sep 2013, Todd Previte <tprevite@gmail.com> wrote:
> On 09/20/2013 06:42 AM, Jani Nikula wrote:
>> Per DP1.2 spec.
>>
>> Signed-off-by: Jani Nikula <jani.nikula@intel.com>
>> ---
>>   drivers/gpu/drm/i915/intel_dp.c |    7 ++++++-
>>   1 file changed, 6 insertions(+), 1 deletion(-)
>>
>> diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c
>> index 9770160..6626514 100644
>> --- a/drivers/gpu/drm/i915/intel_dp.c
>> +++ b/drivers/gpu/drm/i915/intel_dp.c
>> @@ -654,7 +654,12 @@ intel_dp_i2c_aux_ch(struct i2c_adapter *adapter, int mode,
>>   		break;
>>   	}
>>   
>> -	for (retry = 0; retry < 5; retry++) {
>> +	/*
>> +	 * DP1.2 sections 2.7.7.1.5.6.1 and 2.7.7.1.6.6.1: A DP Source device is
>> +	 * required to retry at least seven times upon receiving AUX_DEFER
>> +	 * before giving up the AUX transaction.
>> +	 */
>> +	for (retry = 0; retry < 7; retry++) {
>>   		ret = intel_dp_aux_ch(intel_dp,
>>   				      msg, msg_bytes,
>>   				      reply, reply_bytes);
>>
> Hey Jani,
>
> Although it's not explicitly stated in the specification (I went through 
> both the 1.1a and 1.2a specifications and couldn't find it), I think the 
> the retry count of 7 applies to all AUX transactions, both native and 
> I2C. That's alluded to in the description of the link training sequence 
> (pg 382, 2nd paragraph from the bottom) where the sink may defer up to 
> seven times before the source can abort training.
>
> With that in mind, it might be a good idea to use a defined constant for 
> the retry count for both native and I2C AUX transactions. That would 
> keep it consistent throughout the code and be easier to update moving 
> forward should the specification change.

I agree in principle; defines good, magic values bad.

However we don't currently have a retry max for AUX DEFER in native
transactions. Maybe we should. But I'm wary of adding 7 there, because
we don't have a max now, and the spec is vague on this. It just might
break stuff.

Also, for i2c over AUX the retry count of 7 is the minimum by the
spec. And it goes on to say that depending on the moon position and some
other variables, like i2c bit rate, it is recommended the source adjusts
the retry count and interval.

So the retry count currently isn't the same in our code, and I don't
think it's reasonable to force them to be the same either.


BR,
Jani.



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

-- 
Jani Nikula, Intel Open Source Technology Center

  reply	other threads:[~2013-09-24  6:37 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-09-20 13:42 [PATCH 0/4] drm/i915/dp: aux and dpcd fixes Jani Nikula
2013-09-20 13:42 ` [PATCH 1/4] drm/i915/dp: retry i2c-over-aux seven times on AUX DEFER Jani Nikula
2013-09-20 20:38   ` Todd Previte
2013-09-24  6:39     ` Jani Nikula [this message]
2013-09-27 11:51     ` Jani Nikula
2013-09-27 19:07       ` Todd Previte
2013-09-27 19:59         ` Daniel Vetter
2013-09-20 13:42 ` [PATCH 2/4] drm/i915/dp: increase i2c-over-aux retry interval " Jani Nikula
2013-09-20 20:56   ` Todd Previte
2013-09-20 21:53     ` Daniel Vetter
2013-09-20 13:42 ` [PATCH 3/4] drm/i915/dp: downstream port capabilities are not present in DPCD 1.0 Jani Nikula
2013-09-20 13:42 ` [PATCH 4/4] drm/i915/dp: read DPCD PSR capability only on eDP Jani Nikula
2013-09-20 20:50   ` Todd Previte
2013-09-20 20:57     ` Paulo Zanoni
2013-09-20 22:31       ` Todd Previte
2013-09-23  7:29         ` Daniel Vetter
2013-09-23  5:59 ` [PATCH 0/4] drm/i915/dp: aux and dpcd fixes Jani Nikula
2013-09-23  7:30   ` Daniel Vetter

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=87ioxq67vo.fsf@intel.com \
    --to=jani.nikula@linux.intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=tprevite@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