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: [Intel-gfx] [PATCH 1/5] drm/i915: Add list_for_each_entry_safe_continue_reverse
Date: Fri, 5 Jun 2020 15:50:05 +0100	[thread overview]
Message-ID: <793dd101-48c9-7344-5291-8e7f5b65ca96@linux.intel.com> (raw)
In-Reply-To: <20200605095858.28455-1-chris@chris-wilson.co.uk>


On 05/06/2020 10:58, Chris Wilson wrote:
> One more list iterator variant, for when we want to unwind from inside
> one list iterator with the intention of restarting from the current
> entry as the new head of the list.
> 
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> ---
>   drivers/gpu/drm/i915/i915_utils.h | 6 ++++++
>   1 file changed, 6 insertions(+)
> 
> diff --git a/drivers/gpu/drm/i915/i915_utils.h b/drivers/gpu/drm/i915/i915_utils.h
> index 03a73d2bd50d..6ebccdd12d4c 100644
> --- a/drivers/gpu/drm/i915/i915_utils.h
> +++ b/drivers/gpu/drm/i915/i915_utils.h
> @@ -266,6 +266,12 @@ static inline int list_is_last_rcu(const struct list_head *list,
>   	return READ_ONCE(list->next) == head;
>   }
>   
> +#define list_for_each_entry_safe_continue_reverse(pos, n, head, member)	\
> +	for (pos = list_prev_entry(pos, member),			\
> +	     n = list_prev_entry(pos, member);				\
> +	     &pos->member != (head);					\
> +	     pos = n, n = list_prev_entry(n, member))
> +
>   /*
>    * Wait until the work is finally complete, even if it tries to postpone
>    * by requeueing itself. Note, that if the worker never cancels itself,
> 

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

  parent reply	other threads:[~2020-06-05 14:50 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-05  9:58 [Intel-gfx] [PATCH 1/5] drm/i915: Add list_for_each_entry_safe_continue_reverse Chris Wilson
2020-06-05  9:58 ` [Intel-gfx] [PATCH 2/5] drm/i915/gem: Separate reloc validation into an earlier step Chris Wilson
2020-06-05 15:27   ` Tvrtko Ursulin
2020-06-05 15:38     ` Chris Wilson
2020-06-05 16:07   ` [Intel-gfx] [PATCH v2] " Chris Wilson
2020-06-05  9:58 ` [Intel-gfx] [PATCH 3/5] drm/i915/gem: Lift GPU relocation allocation Chris Wilson
2020-06-05  9:58 ` [Intel-gfx] [PATCH 4/5] drm/i915/gem: Build the reloc request first Chris Wilson
2020-06-05  9:58 ` [Intel-gfx] [PATCH 5/5] drm/i915/gem: Add all GPU reloc awaits/signals en masse Chris Wilson
2020-06-05 10:30 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for series starting with [1/5] drm/i915: Add list_for_each_entry_safe_continue_reverse Patchwork
2020-06-05 10:31 ` [Intel-gfx] ✗ Fi.CI.SPARSE: " Patchwork
2020-06-05 10:52 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork
2020-06-05 12:10 ` [Intel-gfx] ✓ Fi.CI.IGT: " Patchwork
2020-06-05 14:50 ` Tvrtko Ursulin [this message]
2020-06-05 16:58 ` [Intel-gfx] ✗ Fi.CI.BUILD: failure for series starting with [1/5] drm/i915: Add list_for_each_entry_safe_continue_reverse (rev2) 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=793dd101-48c9-7344-5291-8e7f5b65ca96@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.