habanalabs/gaudi2: new API to control engine cores running mode
authorTal Cohen <talcohen@habana.ai>
Thu, 7 Jul 2022 15:42:47 +0000 (18:42 +0300)
committerOded Gabbay <ogabbay@kernel.org>
Sun, 18 Sep 2022 10:29:51 +0000 (13:29 +0300)
commit194e515c79462f1ad09ebcc9e01a3acb84a98d82
tree507354dadb1169d90633792bf2a20f10d18c206a
parent07056f58e43319902cd1072c00df2846b31e14b8
habanalabs/gaudi2: new API to control engine cores running mode

The current flow of halting the engine cores is implemented by command
buffers built by the user space and sent towards the Driver.

This current flow is broken since the user space does not know when
the cores actually halt as sending a workload is async op.

Therefore the application can not free the memory that is mapped
to the engine cores.

This new API allows the user space to control the running mode. The
API call is sync (returns after the cores are set to the
requested mode).

Signed-off-by: Tal Cohen <talcohen@habana.ai>
Reviewed-by: Oded Gabbay <ogabbay@kernel.org>
Signed-off-by: Oded Gabbay <ogabbay@kernel.org>
drivers/misc/habanalabs/common/command_submission.c
drivers/misc/habanalabs/common/habanalabs.h
drivers/misc/habanalabs/gaudi2/gaudi2.c
drivers/misc/habanalabs/include/gaudi2/asic_reg/gaudi2_regs.h
include/uapi/misc/habanalabs.h