[igt-dev] [PATCH i-g-t 1/6] lib/i915/i915_drm_local : Add DRM_I915_QUERY_DISTANCE_INFO query
priyanka.dandamudi at intel.com
priyanka.dandamudi at intel.com
Thu Apr 21 14:52:06 UTC 2022
From: Priyanka Dandamudi <priyanka.dandamudi at intel.com>
Add distance info query to check if the memory region is reachable or
not. If memory region is reachable, it gives the distance from the
memory region to the (class, instance) engine given by the user.
Cc: Arjun Melkaveri <arjun.melkaveri at intel.com>
Cc: Petri Latvala <petri.latvala at intel.com>
Signed-off-by: Priyanka Dandamudi <priyanka.dandamudi at intel.com>
---
lib/i915/i915_drm_local.h | 23 +++++++++++++++++++++++
1 file changed, 23 insertions(+)
diff --git a/lib/i915/i915_drm_local.h b/lib/i915/i915_drm_local.h
index 9a2273c4..1d584020 100644
--- a/lib/i915/i915_drm_local.h
+++ b/lib/i915/i915_drm_local.h
@@ -23,6 +23,29 @@ extern "C" {
#define DRM_I915_QUERY_GEOMETRY_SUBSLICES 6
+#define DRM_I915_QUERY_DISTANCE_INFO 5
+
+/**
+ * struct drm_i915_query_distance_info
+ *
+ * Distance info query returns the distance of given (class, instance)
+ * engine to the memory region id passed by the user. If the distance
+ * is -1 it means region is unreachable.
+ */
+struct drm_i915_query_distance_info {
+ /** Engine for which distance is queried */
+ struct i915_engine_class_instance engine;
+
+ /** Memory region to be used */
+ struct drm_i915_gem_memory_class_instance region;
+
+ /** Distance to region from engine */
+ __s32 distance;
+
+ /** Must be zero */
+ __u32 rsvd[3];
+};
+
#if defined(__cplusplus)
}
#endif
--
2.25.1
More information about the igt-dev
mailing list