aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDalit Ben Zoor <[email protected]>2019-05-30 08:46:02 +0000
committerOded Gabbay <[email protected]>2019-05-30 08:46:02 +0000
commit9c46f7b10fff02f7d7f042b6628d0b48b7a1b66d (patch)
treec9e3dfa66de3c2ac0d6ec51908b602b81f999fdc
parenta513f9a7eca5aa92634f9cf422c60e2d411cc3a4 (diff)
habanalabs: clear sobs and monitors in context switch
On context switch we need to ensure that each user is not be affected by other user, so we need to clear sync objects and monitors in context switch instead of in restore_phase_topology function. Signed-off-by: Dalit Ben Zoor <[email protected]> Reviewed-by: Oded Gabbay <[email protected]> Signed-off-by: Oded Gabbay <[email protected]>
-rw-r--r--drivers/misc/habanalabs/goya/goya.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/misc/habanalabs/goya/goya.c b/drivers/misc/habanalabs/goya/goya.c
index e0fc511acaec..87859c55b4b8 100644
--- a/drivers/misc/habanalabs/goya/goya.c
+++ b/drivers/misc/habanalabs/goya/goya.c
@@ -3920,6 +3920,11 @@ void goya_update_eq_ci(struct hl_device *hdev, u32 val)
void goya_restore_phase_topology(struct hl_device *hdev)
{
+
+}
+
+static void goya_clear_sm_regs(struct hl_device *hdev)
+{
int i, num_of_sob_in_longs, num_of_mon_in_longs;
num_of_sob_in_longs =
@@ -4569,6 +4574,8 @@ int goya_context_switch(struct hl_device *hdev, u32 asid)
WREG32(mmTPC_PLL_CLK_RLX_0, 0x200020);
goya_mmu_prepare(hdev, asid);
+ goya_clear_sm_regs(hdev);
+
return 0;
}