On Tue,  9 Oct 2012 19:59:02 +0200, Daniel Vetter <daniel.vet...@ffwll.ch> 
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 <daniel.vet...@ffwll.ch>

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 <ch...@chris-wilson.co.uk>
-Chris

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

Reply via email to