habanalabs: reset device upon FD close if not idle
authorOfir Bitton <obitton@habana.ai>
Thu, 20 May 2021 10:30:31 +0000 (13:30 +0300)
committerOded Gabbay <ogabbay@kernel.org>
Fri, 18 Jun 2021 12:23:41 +0000 (15:23 +0300)
commit84586de496103453c0c8dbf5c233f10381644cf5
tree6081518d506378cc393c86261e0d69f1fadfaa39
parent8e8125f192288802267157f613c0ca654dfbde8e
habanalabs: reset device upon FD close if not idle

If device is not idle after user closes the FD we must reset device
as next user that will try to open FD will encounter a non-functional
device.

Signed-off-by: Ofir Bitton <obitton@habana.ai>
Reviewed-by: Oded Gabbay <ogabbay@kernel.org>
Signed-off-by: Oded Gabbay <ogabbay@kernel.org>
drivers/misc/habanalabs/common/context.c
drivers/misc/habanalabs/common/device.c
drivers/misc/habanalabs/common/habanalabs.h
drivers/misc/habanalabs/common/habanalabs_drv.c