[Intel-gfx] [PATCH] drm/i915: Refactor common list iteration over GGTT vma

Chris Wilson chris at chris-wilson.co.uk
Thu Dec 7 16:46:37 UTC 2017


Quoting Ville Syrjälä (2017-12-07 16:40:49)
> On Thu, Dec 07, 2017 at 04:27:17PM +0000, Chris Wilson wrote:
> > +#define for_each_ggtt_vma(V, OBJ) \
> > +     list_for_each_entry(V, &(OBJ)->vma_list, obj_link)              \
> > +             if (!i915_vma_is_ggtt(vma)) break; else
> 
> for_each_if() ?

for_each_if() doesn't perform a break.

for_each_until() ? I think that may be a bit too magical.
-Chris


More information about the Intel-gfx mailing list