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.ursu...@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

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

Reply via email to