OSDN Git Service

habanalabs: add helper to get compute context
authorOded Gabbay <ogabbay@kernel.org>
Tue, 30 Nov 2021 21:02:21 +0000 (23:02 +0200)
committerOded Gabbay <ogabbay@kernel.org>
Sun, 26 Dec 2021 06:59:08 +0000 (08:59 +0200)
commit4337b50b5fe5ee64c821790f601ee6153bb9f027
tree8a528f4e86286c1b4129134d21cbb65909cac438
parent6798676f7ef5916133e0c915be73b7a3b7e2a312
habanalabs: add helper to get compute context

There are multiple places where the code needs to get the context's
pointer and increment its ref cnt. This is the proper way instead
of using the compute context pointer in the device structure.

Signed-off-by: Oded Gabbay <ogabbay@kernel.org>
drivers/misc/habanalabs/common/context.c
drivers/misc/habanalabs/common/debugfs.c
drivers/misc/habanalabs/common/device.c
drivers/misc/habanalabs/common/habanalabs.h