]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915: fixup i915_gem_object_get_page inline helper
authorChris Wilson <chris@chris-wilson.co.uk>
Wed, 10 Oct 2012 11:11:52 +0000 (12:11 +0100)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Fri, 12 Oct 2012 08:59:09 +0000 (10:59 +0200)
commitf7ecacbc0a9d99c8d8600296a793812339db886e
treea817050b7946185fba0dcdc5b16c0b626306aa15
parent98ad666850ed6a386fecce386f8eac23f9109447
drm/i915: fixup i915_gem_object_get_page inline helper

Note that just because we have n == MAX elements left, does not imply
that there are only MAX elements left in the scatterlist and so we may
not be on the last chain, and the nth element may in fact be a chain ptr.

This is exercised by the improved hangman tests and the gem_exec_big
test in i-g-t.

This regression has been introduced in

commit 46aff9fcf525bac26273480af7cc17f3b7e25071
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date:   Fri Jun 1 15:20:22 2012 +0100

   drm/i915: Replace the array of pages with a scatterlist

v2: KISS, replace the direct lookup with a for_each_sg() [danvet]
v3: Try to be clever again.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
drivers/gpu/drm/i915/i915_drv.h