[Intel-gfx] [RFC PATCH 1/5] drm/i915/flat-CCS: Add GEM bo structure fields for flat-CCS

Adrian Larumbe adrian.larumbe at collabora.com
Fri Jan 21 22:22:48 UTC 2022


When a flat-CCS aware bo is evicted from lmem, its control surface will be
written out into smem. This will be done in the shape of a kernel-only bo
attached to the original bo.

Signed-off-by: Adrian Larumbe <adrian.larumbe at collabora.com>
---
 drivers/gpu/drm/i915/gem/i915_gem_object_types.h | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/drivers/gpu/drm/i915/gem/i915_gem_object_types.h b/drivers/gpu/drm/i915/gem/i915_gem_object_types.h
index 71e778ecaeb8..9f574e149c58 100644
--- a/drivers/gpu/drm/i915/gem/i915_gem_object_types.h
+++ b/drivers/gpu/drm/i915/gem/i915_gem_object_types.h
@@ -628,6 +628,16 @@ struct drm_i915_gem_object {
 
 		void *gvt_info;
 	};
+
+	/**
+	 * This is set if the object is lmem-placeable, supports flat
+	 * CCS and is compressed. In that case, a separate block of
+	 * stolen lmem memory will contain its compression data.
+	 */
+	struct {
+		struct drm_i915_gem_object *swap;
+		bool enabled:1;
+	} flat_css;
 };
 
 static inline struct drm_i915_gem_object *
-- 
2.34.1



More information about the Intel-gfx mailing list