Quoting Matthew Auld (2019-08-29 21:19:19) > The sg_table for our backing store might contain addresses from > stolen-memory or in the future local-memory, at which point this is no > longer a dma-iterator. As a consequence we should now break on NULL > iter.sgp, instead of dmap == 0 which is considered an invalid dma > address. Function old new delta gen8_ggtt_insert_entries 211 192 -19 gen6_ggtt_insert_entries 292 262 -30 i915_error_object_create 996 954 -42 Why didn't you say so! > Signed-off-by: Matthew Auld <matthew.auld@xxxxxxxxx> > Cc: Chris Wilson <chris@xxxxxxxxxxxxxxxxxx> > -#define __for_each_sgt_dma(__dmap, __iter, __sgt, __step) \ > +#define __for_each_sgt_daddr(__dp, __iter, __sgt, __step) \ > for ((__iter) = __sgt_iter((__sgt)->sgl, true); \ > - ((__dmap) = (__iter).dma + (__iter).curr); \ > + ((__dp) = (__iter).dma + (__iter).curr), (__iter).sgp; \ > (((__iter).curr += (__step)) >= (__iter).max) ? \ > (__iter) = __sgt_iter(__sg_next((__iter).sgp), true), 0 : 0) __sgt_iter() sets all to 0 if __sg_next() reports the end of the chain. Reviewed-by: Chris Wilson <chris@xxxxxxxxxxxxxxxxxx> -Chris _______________________________________________ Intel-gfx mailing list Intel-gfx@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/intel-gfx