summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/i915/i915_gem_object.h
diff options
context:
space:
mode:
authorChris Wilson2017-02-13 18:15:20 +0100
committerChris Wilson2017-02-13 21:45:34 +0100
commit44653988ef7c70bf7c55a5e642e22ce5446fb6b1 (patch)
tree53c1039f61000e0549159bf297d85908dcb10a8c /drivers/gpu/drm/i915/i915_gem_object.h
parentdrm/i915: Mock infrastructure for request emission (diff)
downloadkernel-qcow2-linux-44653988ef7c70bf7c55a5e642e22ce5446fb6b1.tar.gz
kernel-qcow2-linux-44653988ef7c70bf7c55a5e642e22ce5446fb6b1.tar.xz
kernel-qcow2-linux-44653988ef7c70bf7c55a5e642e22ce5446fb6b1.zip
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
Diffstat (limited to 'drivers/gpu/drm/i915/i915_gem_object.h')
-rw-r--r--drivers/gpu/drm/i915/i915_gem_object.h20
1 files changed, 12 insertions, 8 deletions
diff --git a/drivers/gpu/drm/i915/i915_gem_object.h b/drivers/gpu/drm/i915/i915_gem_object.h
index 290eaa7fc9eb..4114cc8a0b9b 100644
--- a/drivers/gpu/drm/i915/i915_gem_object.h
+++ b/drivers/gpu/drm/i915/i915_gem_object.h
@@ -167,14 +167,18 @@ struct drm_i915_gem_object {
/** Record of address bit 17 of each page at last unbind. */
unsigned long *bit_17;
- struct i915_gem_userptr {
- uintptr_t ptr;
- unsigned read_only :1;
-
- struct i915_mm_struct *mm;
- struct i915_mmu_object *mmu_object;
- struct work_struct *work;
- } userptr;
+ union {
+ struct i915_gem_userptr {
+ uintptr_t ptr;
+ unsigned read_only :1;
+
+ struct i915_mm_struct *mm;
+ struct i915_mmu_object *mmu_object;
+ struct work_struct *work;
+ } userptr;
+
+ unsigned long scratch;
+ };
/** for phys allocated objects */
struct drm_dma_handle *phys_handle;