On Tue,  9 Oct 2012 19:59:02 +0200, Daniel Vetter <[email protected]> 
wrote:
> The obj->pages to obj->pages->sgl rework introduced this helper, but
> it doesn't actually work for n % SG_MAX_SINGLE_ALLOC == 0.
> 
> This is exercised by the improved hangman tests and the gem_exec_big
> test in i-g-t.
> 
> Signed-off-by: Daniel Vetter <[email protected]>

I had to think about that harder than I should, to be sure we handled
the case where the last element was a page and not a chainptr correctly.

On hindsight, the code is clearly bogus for the n==SG_MAX_SINGLE_ALLOC
because n is an index. My original thought was to use 'nth' instead and
I believe that it would have helped prevent my confusion. Ah hindisght.

Reviewed-by: Chris Wilson <[email protected]>
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

Reply via email to