Re: [PATCH] drm/i915: Refactor common list iteration over GGTT vma

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Dec 07, 2017 at 04:46:37PM +0000, Chris Wilson wrote:
> 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.

Ah. I probably should have read the comment :)

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

Maybe. I guess open coding it here is fine until the pattern
starts to repeat all over the place.

-- 
Ville Syrjälä
Intel OTC
_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/intel-gfx




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux