accel/habanalabs: add uapi to stall/resume engine
authorKoby Elbaz <kelbaz@habana.ai>
Wed, 15 Feb 2023 15:51:14 +0000 (17:51 +0200)
committerOded Gabbay <ogabbay@kernel.org>
Wed, 15 Mar 2023 11:29:15 +0000 (13:29 +0200)
commitf7f0085eec8d3c0c353d2e7bfa7fb54b3b925d7a
tree6a399008b1dffe2fc598db09fa692e0a2b82f788
parent28fbc058f2eec0e7e59cbeb5cce1d408d76c5965
accel/habanalabs: add uapi to stall/resume engine

The user might want to stall/resume engines to perform power testing
for various scenarios. Because our current
HL_CS_FLAGS_ENGINE_CORE_COMMAND command only handles the engines' cores,
we need to add another opcode for handling entire engine and not just
its core.

The user supplies an array, where each entry holds the engine's ID and
the command to send to the engine. The size of the array is limited
by the number of engines in the ASIC (only Gaudi2 is currently
supported).

Signed-off-by: Koby Elbaz <kelbaz@habana.ai>
Reviewed-by: Oded Gabbay <ogabbay@kernel.org>
Signed-off-by: Oded Gabbay <ogabbay@kernel.org>
drivers/accel/habanalabs/common/command_submission.c
drivers/accel/habanalabs/common/habanalabs.h
drivers/accel/habanalabs/gaudi/gaudi.c
drivers/accel/habanalabs/gaudi2/gaudi2.c
drivers/accel/habanalabs/gaudi2/gaudi2_masks.h
drivers/accel/habanalabs/include/gaudi2/asic_reg/gaudi2_regs.h
include/uapi/drm/habanalabs_accel.h