Re: [Intel-gfx] [RFC] drm/i915: Introduce i915_alloc_sg_table

2016-10-11 Thread Tvrtko Ursulin


On 10/10/2016 12:05, Chris Wilson wrote:

On Mon, Oct 10, 2016 at 11:53:18AM +0100, Tvrtko Ursulin wrote:

From: Tvrtko Ursulin 

There are currently two places in the code which build the
sg table for the object backing store and in the future there
will be one more.

Consolidate that into a single helper which takes a caller
defined context and callbacks.

Not getting warm fuzzy feelings about it. To surmise, what you really
want is a common method of applying sg coalescing whilst iteratively
building the sg list.


Something like wrapping the sg_set_page and sg_next into a single i915 
wrapper with some local status then?


Without too much thought:

i915_sg_build_init(&iter ... )
...
for (...) {
i915_sg_build_next(&iter, i, page)

?

I'll sketch it out in more detail when you merge your swiotlb improvement.

Regards,

Tvrtko

___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx


Re: [Intel-gfx] [RFC] drm/i915: Introduce i915_alloc_sg_table

2016-10-10 Thread Chris Wilson
On Mon, Oct 10, 2016 at 11:53:18AM +0100, Tvrtko Ursulin wrote:
> From: Tvrtko Ursulin 
> 
> There are currently two places in the code which build the
> sg table for the object backing store and in the future there
> will be one more.
> 
> Consolidate that into a single helper which takes a caller
> defined context and callbacks.

Not getting warm fuzzy feelings about it. To surmise, what you really
want is a common method of applying sg coalescing whilst iteratively
building the sg list.
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre
___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx