accel/habanalabs: enable graceful reset mechanism for compute-reset
authorTomer Tayar <ttayar@habana.ai>
Wed, 25 Jan 2023 09:38:56 +0000 (11:38 +0200)
committerOded Gabbay <ogabbay@kernel.org>
Wed, 15 Mar 2023 11:29:12 +0000 (13:29 +0200)
commit18d1358459bd2a18f4582c9ecbdb63cb8825fce0
treef339c6bef2e45a1b18e589107f6119a3964b4583
parent57479adb41852b668c6f25a3c6aef4ad3fe35f97
accel/habanalabs: enable graceful reset mechanism for compute-reset

The graceful reset mechanism is currently enabled only for reset
requests that will end up with hard-reset.
In future, reset requests due to errors in some device engines, are
going to be modified to request compute-reset, as the much longer
hard-reset is not really needed there.
To allow it, enable graceful reset also for compute-reset, and reset
after user releases the device won't be escalated to hard-reset in those
cases.
If watchdog expires and user didn't release the device, hard-reset will
be initiated in any case.

Signed-off-by: Tomer Tayar <ttayar@habana.ai>
Reviewed-by: Oded Gabbay <ogabbay@kernel.org>
Signed-off-by: Oded Gabbay <ogabbay@kernel.org>
Reviewed-by: Stanislaw Gruszka <stanislaw.gruszka@linux.intel.com>
drivers/accel/habanalabs/common/device.c