[Intel-gfx] [PATCH 05/15] drm/i915: introduce drm_i915_gem_object page_size member

Matthew Auld matthew.auld at intel.com
Mon Mar 6 23:54:04 UTC 2017


Signed-off-by: Matthew Auld <matthew.auld at intel.com>
---
 drivers/gpu/drm/i915/i915_gem.c        | 2 ++
 drivers/gpu/drm/i915/i915_gem_object.h | 2 ++
 2 files changed, 4 insertions(+)

diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
index 7c20601fe1de..0a6ed2c54629 100644
--- a/drivers/gpu/drm/i915/i915_gem.c
+++ b/drivers/gpu/drm/i915/i915_gem.c
@@ -3975,6 +3975,8 @@ void i915_gem_object_init(struct drm_i915_gem_object *obj,
 
 	obj->ops = ops;
 
+	obj->page_size = I915_GTT_PAGE_SIZE;
+
 	reservation_object_init(&obj->__builtin_resv);
 	obj->resv = &obj->__builtin_resv;
 
diff --git a/drivers/gpu/drm/i915/i915_gem_object.h b/drivers/gpu/drm/i915/i915_gem_object.h
index 33b0dc4782a9..31bcf87d3745 100644
--- a/drivers/gpu/drm/i915/i915_gem_object.h
+++ b/drivers/gpu/drm/i915/i915_gem_object.h
@@ -90,6 +90,8 @@ struct drm_i915_gem_object {
 
 	unsigned long flags;
 
+	unsigned long page_size; /* 4K(default), 64K, 2M, 1G */
+
 	/**
 	 * Have we taken a reference for the object for incomplete GPU
 	 * activity?
-- 
2.9.3



More information about the Intel-gfx mailing list