summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/xe/xe_exec_queue.h
diff options
context:
space:
mode:
authorFrancois Dugast <francois.dugast@intel.com>2023-08-01 13:28:14 +0300
committerRodrigo Vivi <rodrigo.vivi@intel.com>2023-12-21 19:39:17 +0300
commitc22a4ed0c325cd29d7baf07d4cf2c127550b8859 (patch)
tree0183ee5d381c85250fad52f514e2878c945423a6 /drivers/gpu/drm/xe/xe_exec_queue.h
parent2a368a09ae1c3f7aebe6210927a1335186d3c6f7 (diff)
downloadlinux-c22a4ed0c325cd29d7baf07d4cf2c127550b8859.tar.xz
drm/xe: Rename xe_engine.[ch] to xe_exec_queue.[ch]
This is a preparation commit for a larger renaming of engine to exec queue. Signed-off-by: Francois Dugast <francois.dugast@intel.com> Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com> Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Diffstat (limited to 'drivers/gpu/drm/xe/xe_exec_queue.h')
-rw-r--r--drivers/gpu/drm/xe/xe_exec_queue.h63
1 files changed, 63 insertions, 0 deletions
diff --git a/drivers/gpu/drm/xe/xe_exec_queue.h b/drivers/gpu/drm/xe/xe_exec_queue.h
new file mode 100644
index 000000000000..3017e4fe308d
--- /dev/null
+++ b/drivers/gpu/drm/xe/xe_exec_queue.h
@@ -0,0 +1,63 @@
+/* SPDX-License-Identifier: MIT */
+/*
+ * Copyright © 2021 Intel Corporation
+ */
+
+#ifndef _XE_ENGINE_H_
+#define _XE_ENGINE_H_
+
+#include "xe_engine_types.h"
+#include "xe_vm_types.h"
+
+struct drm_device;
+struct drm_file;
+struct xe_device;
+struct xe_file;
+
+struct xe_engine *xe_engine_create(struct xe_device *xe, struct xe_vm *vm,
+ u32 logical_mask, u16 width,
+ struct xe_hw_engine *hw_engine, u32 flags);
+struct xe_engine *xe_engine_create_class(struct xe_device *xe, struct xe_gt *gt,
+ struct xe_vm *vm,
+ enum xe_engine_class class, u32 flags);
+
+void xe_engine_fini(struct xe_engine *e);
+void xe_engine_destroy(struct kref *ref);
+
+struct xe_engine *xe_engine_lookup(struct xe_file *xef, u32 id);
+
+static inline struct xe_engine *xe_engine_get(struct xe_engine *engine)
+{
+ kref_get(&engine->refcount);
+ return engine;
+}
+
+static inline void xe_engine_put(struct xe_engine *engine)
+{
+ kref_put(&engine->refcount, xe_engine_destroy);
+}
+
+static inline bool xe_engine_is_parallel(struct xe_engine *engine)
+{
+ return engine->width > 1;
+}
+
+bool xe_engine_is_lr(struct xe_engine *e);
+
+bool xe_engine_ring_full(struct xe_engine *e);
+
+bool xe_engine_is_idle(struct xe_engine *engine);
+
+void xe_engine_kill(struct xe_engine *e);
+
+int xe_engine_create_ioctl(struct drm_device *dev, void *data,
+ struct drm_file *file);
+int xe_engine_destroy_ioctl(struct drm_device *dev, void *data,
+ struct drm_file *file);
+int xe_engine_set_property_ioctl(struct drm_device *dev, void *data,
+ struct drm_file *file);
+int xe_engine_get_property_ioctl(struct drm_device *dev, void *data,
+ struct drm_file *file);
+enum xe_engine_priority xe_engine_device_get_max_priority(struct xe_device *xe);
+
+#endif