[Intel-xe] [PATCH v2 05/11] drm/xe: Add frontbuffer setter/getter for xe_bo
Jouni Högander
jouni.hogander at intel.com
Fri Sep 8 12:24:09 UTC 2023
Xe is not carrying frontbuffer pointer in xe_bo. Define it's getter as
NULL. Setter simply returns pointer which was provided as a
parameter and taking/releasing reference to xe_bo.
v2: Handle xe_bo_put as well
Signed-off-by: Jouni Högander <jouni.hogander at intel.com>
---
drivers/gpu/drm/xe/xe_bo.h | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/drivers/gpu/drm/xe/xe_bo.h b/drivers/gpu/drm/xe/xe_bo.h
index 0823dda0f31b..148b097dd2f8 100644
--- a/drivers/gpu/drm/xe/xe_bo.h
+++ b/drivers/gpu/drm/xe/xe_bo.h
@@ -325,6 +325,16 @@ static inline unsigned int xe_sg_segment_size(struct device *dev)
return round_down(max / 2, PAGE_SIZE);
}
+#define i915_gem_object_get_frontbuffer(obj) NULL
+
+static inline struct intel_frontbuffer *
+i915_gem_object_set_frontbuffer(struct xe_bo *bo,
+ struct intel_frontbuffer *front)
+{
+ front ? xe_bo_get(bo) : xe_bo_put(bo);
+ return front;
+}
+
#if IS_ENABLED(CONFIG_DRM_XE_KUNIT_TEST)
/**
* xe_bo_is_mem_type - Whether the bo currently resides in the given
--
2.34.1
More information about the Intel-xe
mailing list