All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
To: Chris Wilson <chris@chris-wilson.co.uk>, intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH 04/12] drm/i915/gt: Treat a busy timeline as 'active' while waiting
Date: Mon, 7 Oct 2019 18:00:29 +0100	[thread overview]
Message-ID: <6ae55e8a-acc3-3ef6-77d9-2fc9e66dd758@linux.intel.com> (raw)
In-Reply-To: <20191006165002.30312-4-chris@chris-wilson.co.uk>


On 06/10/2019 17:49, Chris Wilson wrote:
> If we cannot claim the timeline->mutex while preparing for a wait on it,
> we have to skip the timeline. In doing so, treat it as active so that
> under a intel_gt_wait_for_idle() loop, we repeat the wait after
> scheduling away.
> 
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
> ---
>   drivers/gpu/drm/i915/gt/intel_gt_requests.c | 4 +++-
>   1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/i915/gt/intel_gt_requests.c b/drivers/gpu/drm/i915/gt/intel_gt_requests.c
> index d69e78478eea..ca606b79fd5e 100644
> --- a/drivers/gpu/drm/i915/gt/intel_gt_requests.c
> +++ b/drivers/gpu/drm/i915/gt/intel_gt_requests.c
> @@ -34,8 +34,10 @@ long intel_gt_retire_requests_timeout(struct intel_gt *gt, long timeout)
>   
>   	spin_lock_irqsave(&timelines->lock, flags);
>   	list_for_each_entry_safe(tl, tn, &timelines->active_list, link) {
> -		if (!mutex_trylock(&tl->mutex))
> +		if (!mutex_trylock(&tl->mutex)) {
> +			active_count++; /* report busy to caller, try again? */
>   			continue;
> +		}
>   
>   		intel_timeline_get(tl);
>   		GEM_BUG_ON(!tl->active_count);
> 

Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>

Regards,

Tvrtko
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2019-10-07 17:00 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-06 16:49 [PATCH 01/12] drm/i915/execlists: Fix annotation for decoupling virtual request Chris Wilson
2019-10-06 16:49 ` [PATCH 02/12] drm/i915/selftests: Appease lockdep Chris Wilson
2019-10-06 16:49 ` [PATCH 03/12] drm/i915/gt: Restore dropped 'interruptible' flag Chris Wilson
2019-10-07 12:25   ` Tvrtko Ursulin
2019-10-06 16:49 ` [PATCH 04/12] drm/i915/gt: Treat a busy timeline as 'active' while waiting Chris Wilson
2019-10-07 17:00   ` Tvrtko Ursulin [this message]
2019-10-06 16:49 ` [PATCH 05/12] drm/i915: Expose engine properties via sysfs Chris Wilson
2019-10-06 16:49 ` [PATCH 06/12] drm/i915/execlists: Force preemption Chris Wilson
2019-10-06 16:49 ` [PATCH 07/12] drm/i915: Mark up "sentinel" requests Chris Wilson
2019-10-06 16:49 ` [PATCH 08/12] drm/i915/gt: Introduce barrier pulses along engines Chris Wilson
2019-10-06 16:49 ` [PATCH 09/12] drm/i915/execlists: Cancel banned contexts on schedule-out Chris Wilson
2019-10-06 16:50 ` [PATCH 10/12] drm/i915: Cancel non-persistent contexts on close Chris Wilson
2019-10-06 16:50 ` [PATCH 11/12] drm/i915: Replace hangcheck by heartbeats Chris Wilson
2019-10-06 16:50 ` [PATCH 12/12] drm/i915: Flush idle barriers when waiting Chris Wilson
2019-10-06 17:03 ` ✗ Fi.CI.CHECKPATCH: warning for series starting with [01/12] drm/i915/execlists: Fix annotation for decoupling virtual request Patchwork
2019-10-06 17:27 ` ✓ Fi.CI.BAT: success " Patchwork
2019-10-06 18:34 ` ✗ Fi.CI.IGT: failure " Patchwork

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=6ae55e8a-acc3-3ef6-77d9-2fc9e66dd758@linux.intel.com \
    --to=tvrtko.ursulin@linux.intel.com \
    --cc=chris@chris-wilson.co.uk \
    --cc=intel-gfx@lists.freedesktop.org \
    /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.