]> www.infradead.org Git - users/jedix/linux-maple.git/commit
media: iris: introduce iris core state management with shared queues
authorDikshita Agarwal <quic_dikshita@quicinc.com>
Fri, 7 Feb 2025 07:54:44 +0000 (13:24 +0530)
committerHans Verkuil <hverkuil@xs4all.nl>
Fri, 7 Feb 2025 10:51:04 +0000 (11:51 +0100)
commitd7378f84e94e14998b3469dcc0d8ce609d049ccc
treeac8c1d11da4adeaee4f5ad245ff9323053ba8b4b
parentfa186c97e3d293c924c36780f721201f0ec73661
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 <stefan.schmidt@linaro.org> # x1e80100 (Dell XPS 13 9345)
Reviewed-by: Stefan Schmidt <stefan.schmidt@linaro.org>
Tested-by: Neil Armstrong <neil.armstrong@linaro.org> # on SM8550-QRD
Tested-by: Neil Armstrong <neil.armstrong@linaro.org> # on SM8550-HDK
Signed-off-by: Dikshita Agarwal <quic_dikshita@quicinc.com>
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
drivers/media/platform/qcom/iris/Makefile
drivers/media/platform/qcom/iris/iris_core.c [new file with mode: 0644]
drivers/media/platform/qcom/iris/iris_core.h
drivers/media/platform/qcom/iris/iris_hfi_queue.c [new file with mode: 0644]
drivers/media/platform/qcom/iris/iris_hfi_queue.h [new file with mode: 0644]
drivers/media/platform/qcom/iris/iris_platform_common.h
drivers/media/platform/qcom/iris/iris_platform_sm8550.c
drivers/media/platform/qcom/iris/iris_probe.c
drivers/media/platform/qcom/iris/iris_state.h [new file with mode: 0644]
drivers/media/platform/qcom/iris/iris_vidc.c