OSDN Git Service

drm/i915: Create a fake object for testing huge allocations
authorChris Wilson <chris@chris-wilson.co.uk>
Mon, 13 Feb 2017 17:15:20 +0000 (17:15 +0000)
committerChris Wilson <chris@chris-wilson.co.uk>
Mon, 13 Feb 2017 20:45:34 +0000 (20:45 +0000)
commit44653988ef7c70bf7c55a5e642e22ce5446fb6b1
tree53c1039f61000e0549159bf297d85908dcb10a8c
parent0daf0113cff6884ed947ffe0870a926e73d52f79
drm/i915: Create a fake object for testing huge allocations

We would like to be able to exercise huge allocations even on memory
constrained devices. To do this we create an object that allocates only
a few pages and remaps them across its whole range - each page is reused
multiple times. We can therefore pretend we are rendering into a much
larger object.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Matthew Auld <matthew.auld@intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/20170213171558.20942-9-chris@chris-wilson.co.uk
drivers/gpu/drm/i915/i915_gem.c
drivers/gpu/drm/i915/i915_gem_object.h
drivers/gpu/drm/i915/selftests/huge_gem_object.c [new file with mode: 0644]
drivers/gpu/drm/i915/selftests/huge_gem_object.h [new file with mode: 0644]