On Wed, 2014-03-26 at 16:48 +0000, Tvrtko Ursulin wrote: > From: Tvrtko Ursulin <tvrtko.ursulin@xxxxxxxxx> > > Looks like there are some redundant lines in the main loop of > i915_gem_object_get_pages_gtt. > > I haven't tested this so just RFC please. > > Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@xxxxxxxxx> > Cc: Imre Deak <imre.deak@xxxxxxxxx> Looks good to me. Fwiw: Reviewed-by: Imre Deak <imre.deak@xxxxxxxxx> > --- > drivers/gpu/drm/i915/i915_gem.c | 16 +++------------- > 1 file changed, 3 insertions(+), 13 deletions(-) > > diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c > index 00c8361..5af3537 100644 > --- a/drivers/gpu/drm/i915/i915_gem.c > +++ b/drivers/gpu/drm/i915/i915_gem.c > @@ -1912,15 +1912,8 @@ i915_gem_object_get_pages_gtt(struct drm_i915_gem_object *obj) > gfp |= __GFP_NORETRY | __GFP_NOWARN | __GFP_NO_KSWAPD; > gfp &= ~(__GFP_IO | __GFP_WAIT); > } > -#ifdef CONFIG_SWIOTLB > - if (swiotlb_nr_tbl()) { > - st->nents++; > - sg_set_page(sg, page, PAGE_SIZE, 0); > - sg = sg_next(sg); > - continue; > - } > -#endif > - if (!i || page_to_pfn(page) != last_pfn + 1) { > + if (!i || page_to_pfn(page) != last_pfn + 1 > + || swiotlb_nr_tbl()) { > if (i) > sg = sg_next(sg); > st->nents++; > @@ -1933,10 +1926,7 @@ i915_gem_object_get_pages_gtt(struct drm_i915_gem_object *obj) > /* Check that the i965g/gm workaround works. */ > WARN_ON((gfp & __GFP_DMA32) && (last_pfn >= 0x00100000UL)); > } > -#ifdef CONFIG_SWIOTLB > - if (!swiotlb_nr_tbl()) > -#endif > - sg_mark_end(sg); > + sg_mark_end(sg); > obj->pages = st; > > if (i915_gem_object_needs_bit17_swizzle(obj))
Attachment:
signature.asc
Description: This is a digitally signed message part
_______________________________________________ Intel-gfx mailing list Intel-gfx@xxxxxxxxxxxxxxxxxxxxx http://lists.freedesktop.org/mailman/listinfo/intel-gfx