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

Tvrtko Ursulin tvrtko.ursulin at linux.intel.com
Tue Oct 11 08:03:20 UTC 2016


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 <tvrtko.ursulin at intel.com>
>>
>> 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



More information about the Intel-gfx mailing list