aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/platform/qcom/iris/iris_state.h
diff options
context:
space:
mode:
authorDikshita Agarwal <[email protected]>2025-02-07 07:54:44 +0000
committerHans Verkuil <[email protected]>2025-02-07 10:51:04 +0000
commitd7378f84e94e14998b3469dcc0d8ce609d049ccc (patch)
treeac8c1d11da4adeaee4f5ad245ff9323053ba8b4b /drivers/media/platform/qcom/iris/iris_state.h
parentmedia: iris: implement iris v4l2 file ops (diff)
downloadkernel-d7378f84e94e14998b3469dcc0d8ce609d049ccc.tar.gz
kernel-d7378f84e94e14998b3469dcc0d8ce609d049ccc.zip
media: iris: introduce iris core state management with shared queues
Introduce a core state management for iris driver with the necessary queues needed for the host firmware communication. There are 3 types of queues: Command queue - driver to write any command to firmware. Message queue - firmware to send any response to the driver. Debug queue - for the firmware to write debug messages. Initialize and configure the shared queues during probe. Different states for core: IRIS_CORE_DEINIT - default state. IRIS_CORE_INIT - core state with core initialized. FW loaded and HW brought out of reset, shared queues established between host driver and firmware. IRIS_CORE_ERROR - error state. ----------- | V ----------- | DEINIT | ----------- ^ / \ / \ / \ / \ v v ----------- ----------. | INIT |-->| ERROR | ----------- ----------. Tested-by: Stefan Schmidt <[email protected]> # x1e80100 (Dell XPS 13 9345) Reviewed-by: Stefan Schmidt <[email protected]> Tested-by: Neil Armstrong <[email protected]> # on SM8550-QRD Tested-by: Neil Armstrong <[email protected]> # on SM8550-HDK Signed-off-by: Dikshita Agarwal <[email protected]> Signed-off-by: Hans Verkuil <[email protected]>
Diffstat (limited to 'drivers/media/platform/qcom/iris/iris_state.h')
-rw-r--r--drivers/media/platform/qcom/iris/iris_state.h41
1 files changed, 41 insertions, 0 deletions
diff --git a/drivers/media/platform/qcom/iris/iris_state.h b/drivers/media/platform/qcom/iris/iris_state.h
new file mode 100644
index 000000000000..1ffe6fe706bd
--- /dev/null
+++ b/drivers/media/platform/qcom/iris/iris_state.h
@@ -0,0 +1,41 @@
+/* SPDX-License-Identifier: GPL-2.0-only */
+/*
+ * Copyright (c) 2022-2024 Qualcomm Innovation Center, Inc. All rights reserved.
+ */
+
+#ifndef __IRIS_STATE_H__
+#define __IRIS_STATE_H__
+
+/**
+ * enum iris_core_state
+ *
+ * @IRIS_CORE_DEINIT: default state.
+ * @IRIS_CORE_INIT: core state with core initialized. FW loaded and
+ * HW brought out of reset, shared queues established
+ * between host driver and firmware.
+ * @IRIS_CORE_ERROR: error state.
+ *
+ * -----------
+ * |
+ * V
+ * -----------
+ * +--->| DEINIT |<---+
+ * | ----------- |
+ * | | |
+ * | v |
+ * | ----------- |
+ * | / \ |
+ * | / \ |
+ * | / \ |
+ * | v v v
+ * ----------- -----------
+ * | INIT |--->| ERROR |
+ * ----------- -----------
+ */
+enum iris_core_state {
+ IRIS_CORE_DEINIT,
+ IRIS_CORE_INIT,
+ IRIS_CORE_ERROR,
+};
+
+#endif