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

Re: [Xen-devel] [konrad.wilk@xxxxxxxxxx: [PATCH] drm/i915: make compact dma scatter lists creation work with SWIOTLB backend.]



>>> On 24.06.13 at 17:53, Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx> wrote:
> --- a/drivers/gpu/drm/i915/i915_gem.c
> +++ b/drivers/gpu/drm/i915/i915_gem.c
> @@ -1801,7 +1801,14 @@ 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)
>                               sg = sg_next(sg);
> @@ -1812,8 +1819,10 @@ i915_gem_object_get_pages_gtt(struct 
> drm_i915_gem_object *obj)
>               }
>               last_pfn = page_to_pfn(page);
>       }
> -
> -     sg_mark_end(sg);
> +#ifdef CONFIG_SWIOTLB
> +     if (!swiotlb_nr_tbl())
> +#endif
> +             sg_mark_end(sg);
>       obj->pages = st;
>  
>       if (i915_gem_object_needs_bit17_swizzle(obj))

Out of curiosity - while I can see the point of the first hunk, why do
you need to also suppress the setting of the list terminator?

Jan


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.