public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
From: Jani Nikula <jani.nikula@linux.intel.com>
To: Daniel Vetter <daniel@ffwll.ch>, Rodrigo Vivi <rodrigo.vivi@intel.com>
Cc: intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org
Subject: Re: [PATCH 3/8] drm/i915: Use EAGAIN instead EBUSY for aux retry.
Date: Mon, 23 Nov 2015 11:41:33 +0200	[thread overview]
Message-ID: <87egfh9ho2.fsf@intel.com> (raw)
In-Reply-To: <20151123090230.GY17050@phenom.ffwll.local>

On Mon, 23 Nov 2015, Daniel Vetter <daniel@ffwll.ch> wrote:
> On Fri, Nov 20, 2015 at 04:46:25PM -0800, Rodrigo Vivi wrote:
>> Current EBUSY meaning is immediately retry, but this is
>> about to change. DRM aux transfer is about to change and
>> make EAGAIN the immediately retry and use EBUSY to wait
>> a bit for aux channels to recover for any error or wake up.
>> 
>> This has no functional change if the EAGAIN support is in
>> place already for drm aux transfer.
>> 
>> Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
>
> Please document the EAGAIN and EBUSY return codes for the ->transfer
> member fo drm_dp_aux in the kerneldoc properly. While at it would be great
> if you could document any other error codes that are treated specially for
> this function.

See my comment in reply to patch 1 about the difference in handling of
the ->transfer return values for native aux and i2c-over-aux.

BR,
Jani.

>
> Since this will be a bit more text please convert the kerneldoc to the new
> per-member comment layout that 4.4 supports, i.e.
>
> /**
>  * struct foo - foo structure
>  *
>  * top-level blabla
>  */
> struct foo {
> 	/**
> 	 * @bar:
> 	 *
> 	 * Long text (with paragraphs) explaining bar.
> 	 */
> };
>
> Otherwise this looks really tidy and I really like how this allows us to
> get rid of the intel_read_wake hack.
> -Daniel
>
>> ---
>>  drivers/gpu/drm/i915/intel_dp.c | 4 ++--
>>  1 file changed, 2 insertions(+), 2 deletions(-)
>> 
>> diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c
>> index bec443a..ed07f0a 100644
>> --- a/drivers/gpu/drm/i915/intel_dp.c
>> +++ b/drivers/gpu/drm/i915/intel_dp.c
>> @@ -835,7 +835,7 @@ intel_dp_aux_ch(struct intel_dp *intel_dp,
>>  			last_status = status;
>>  		}
>>  
>> -		ret = -EBUSY;
>> +		ret = -EAGAIN;
>>  		goto out;
>>  	}
>>  
>> @@ -890,7 +890,7 @@ intel_dp_aux_ch(struct intel_dp *intel_dp,
>>  
>>  	if ((status & DP_AUX_CH_CTL_DONE) == 0) {
>>  		DRM_ERROR("dp_aux_ch not done status 0x%08x\n", status);
>> -		ret = -EBUSY;
>> +		ret = -EAGAIN;
>>  		goto out;
>>  	}
>>  
>> -- 
>> 2.4.3
>> 
>> _______________________________________________
>> dri-devel mailing list
>> dri-devel@lists.freedesktop.org
>> http://lists.freedesktop.org/mailman/listinfo/dri-devel

-- 
Jani Nikula, Intel Open Source Technology Center
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel

  reply	other threads:[~2015-11-23  9:41 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-21  0:46 [PATCH 0/8] Organize and offload aux retries to drm. (v2) Rodrigo Vivi
2015-11-21  0:46 ` [PATCH 1/8] drm: Introduce EAGAIN handling for immediatelly aux retries Rodrigo Vivi
2015-11-23  9:39   ` Jani Nikula
2015-11-21  0:46 ` [PATCH 2/8] drm/nouveau: Use EAGAIN instead EBUSY for aux retry Rodrigo Vivi
2015-11-21  0:46 ` [PATCH 3/8] drm/i915: " Rodrigo Vivi
2015-11-23  9:02   ` Daniel Vetter
2015-11-23  9:41     ` Jani Nikula [this message]
2015-11-21  0:46 ` [PATCH 4/8] drm: Wait 1ms before retrying aux transactions on EBUSY Rodrigo Vivi
2015-11-23  9:45   ` Jani Nikula
2015-11-21  0:46 ` [PATCH 5/8] drm/i915: Avoid EBUSY retry on intel_dp_aux_ch Rodrigo Vivi
2015-11-21  0:46 ` [PATCH 6/8] drm/i915: Remove remaining retries from intel_dp_aux_ch Rodrigo Vivi
2015-11-23  9:56   ` Jani Nikula
2015-11-21  0:46 ` [PATCH 7/8] drm/i915: Fix random aux transactions failures Rodrigo Vivi
2015-11-23 10:00   ` Jani Nikula
2015-11-21  0:46 ` Rodrigo Vivi
2015-11-23 10:10   ` Jani Nikula
2015-11-24 17:10 ` [Intel-gfx] [PATCH 0/8] Organize and offload aux retries to drm. (v2) Daniel Stone

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=87egfh9ho2.fsf@intel.com \
    --to=jani.nikula@linux.intel.com \
    --cc=daniel@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=intel-gfx@lists.freedesktop.org \
    --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