drm/i915: Add some selftests for sg_table manipulation
authorChris Wilson <chris@chris-wilson.co.uk>
Mon, 13 Feb 2017 17:15:13 +0000 (17:15 +0000)
committerChris Wilson <chris@chris-wilson.co.uk>
Mon, 13 Feb 2017 20:45:23 +0000 (20:45 +0000)
commit935a2f776aa523cd6ad20c9b7c7d019ba9418759
treec952301e5a9705c9f287ead1bd4e054c26bc20e4
parent953c7f82eb890085c60dbe22578e883d6837c674
drm/i915: Add some selftests for sg_table manipulation

Start exercising the scattergather lists, especially looking at
iteration after coalescing.

v2: Comment on the peculiarity of table construction (i.e. why this
sg_table might be interesting).
v3: Added one __func__ to identify expect_pfn_sg()
v4: Loop until we have crossed the chain boundary (forcing sg_table to
do multiple allocations) before squelching a potential ENOMEM from oom.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/20170213171558.20942-2-chris@chris-wilson.co.uk
drivers/gpu/drm/i915/i915_gem.c
drivers/gpu/drm/i915/selftests/i915_mock_selftests.h
drivers/gpu/drm/i915/selftests/scatterlist.c [new file with mode: 0644]