public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
From: Jani Nikula <jani.nikula@linux.intel.com>
To: intel-gfx@lists.freedesktop.org
Cc: Dave Airlie <airlied@redhat.com>,
	dri-devel@lists.freedesktop.org,
	Rodrigo Vivi <rodrigo.vivi@intel.com>
Subject: Re: [PATCH 1/8] drm: Introduce EAGAIN handling for	immediatelly aux retries
Date: Mon, 23 Nov 2015 11:39:33 +0200	[thread overview]
Message-ID: <87h9kd9hre.fsf@intel.com> (raw)
In-Reply-To: <1448066790-19591-2-git-send-email-rodrigo.vivi@intel.com>

On Sat, 21 Nov 2015, Rodrigo Vivi <rodrigo.vivi@intel.com> wrote:
> The goal here is to offload aux retries handling from the
> drivers to drm.
>
> However there are 2 differents cases for retry:
> 1. Immediately retry - Hardware already took care of needed timeouts
>    	       	       before answering that a retry is possible.
> 2. Busy - Wait some time and retry.
>
> This driver introduce the support for EAGAIN that can handle the
> first case and a following patch will introduce EBUSY waits,
> after all drivers counting on immediately retries are changed.
>
> Cc: Dave Airlie <airlied@redhat.com>
> Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
> ---
>  drivers/gpu/drm/drm_dp_helper.c | 5 +++++
>  1 file changed, 5 insertions(+)
>
> diff --git a/drivers/gpu/drm/drm_dp_helper.c b/drivers/gpu/drm/drm_dp_helper.c
> index 9535c5b..ee7c955 100644
> --- a/drivers/gpu/drm/drm_dp_helper.c
> +++ b/drivers/gpu/drm/drm_dp_helper.c
> @@ -198,6 +198,11 @@ static int drm_dp_dpcd_access(struct drm_dp_aux *aux, u8 request,
>  		err = aux->transfer(aux, &msg);
>  		mutex_unlock(&aux->hw_mutex);
>  		if (err < 0) {
> +			/* Immediately retry */
> +			if (err == -EAGAIN)
> +				continue;

How about the ->transfer call in drm_dp_i2c_do_msg? If we leave that for
the i2c layer (which does do retries on -EAGAIN, but also handles
timeouts for repeated -EAGAINs) it deserves a comment in in
drm_dp_i2c_do_msg.

BR,
Jani.

> +
> +			/* FIXME: On BUSY we could wait before retrying */
>  			if (err == -EBUSY)
>  				continue;

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

  reply	other threads:[~2015-11-23  9:39 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 [this message]
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
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=87h9kd9hre.fsf@intel.com \
    --to=jani.nikula@linux.intel.com \
    --cc=airlied@redhat.com \
    --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