diff options
author | Matthew Auld <matthew.auld@intel.com> | 2019-10-08 19:01:16 +0300 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2019-10-08 22:50:01 +0300 |
commit | 7c98501acb94318819f5ea764fc3aae09f69aff6 (patch) | |
tree | 141e7324dafb25bdc9d05807535650df39b811f6 /drivers/gpu/drm/i915/intel_memory_region.h | |
parent | 2f0b97ca02118630132dddf258fbdb5d5f5ec32a (diff) | |
download | linux-7c98501acb94318819f5ea764fc3aae09f69aff6.tar.xz |
drm/i915/region: support volatile objects
Volatile objects are marked as DONTNEED while pinned, therefore once
unpinned the backing store can be discarded. This is limited to kernel
internal objects.
Signed-off-by: Matthew Auld <matthew.auld@intel.com>
Signed-off-by: CQ Tang <cq.tang@intel.com>
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Cc: Abdiel Janulgue <abdiel.janulgue@linux.intel.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Link: https://patchwork.freedesktop.org/patch/msgid/20191008160116.18379-4-matthew.auld@intel.com
Diffstat (limited to 'drivers/gpu/drm/i915/intel_memory_region.h')
-rw-r--r-- | drivers/gpu/drm/i915/intel_memory_region.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/gpu/drm/i915/intel_memory_region.h b/drivers/gpu/drm/i915/intel_memory_region.h index 29b86ca17dd9..52c141b6108c 100644 --- a/drivers/gpu/drm/i915/intel_memory_region.h +++ b/drivers/gpu/drm/i915/intel_memory_region.h @@ -52,6 +52,12 @@ struct intel_memory_region { unsigned int type; unsigned int instance; unsigned int id; + + struct { + struct mutex lock; /* Protects access to objects */ + struct list_head list; + struct list_head purgeable; + } objects; }; int intel_memory_region_init_buddy(struct intel_memory_region *mem); |