habanalabs/gaudi: don't enable clock gating on DMA5
authorOded Gabbay <ogabbay@kernel.org>
Sat, 6 Feb 2021 17:34:59 +0000 (19:34 +0200)
committerOded Gabbay <ogabbay@kernel.org>
Mon, 8 Feb 2021 16:20:08 +0000 (18:20 +0200)
Graph Compiler uses DMA5 in a non-standard way and it requires the
driver to disable clock gating on that DMA.

Signed-off-by: Oded Gabbay <ogabbay@kernel.org>
drivers/misc/habanalabs/gaudi/gaudi.c

index 35342edd4a02c20018604fb94ad88c1d48ccc6e8..9152242778f5e7495bb63688e26916612e393612 100644 (file)
@@ -3460,6 +3460,12 @@ static void gaudi_set_clock_gating(struct hl_device *hdev)
                enable = !!(hdev->clock_gating_mask &
                                (BIT_ULL(gaudi_dma_assignment[i])));
 
+               /* GC sends work to DMA engine through Upper CP in DMA5 so
+                * we need to not enable clock gating in that DMA
+                */
+               if (i == GAUDI_HBM_DMA_4)
+                       enable = 0;
+
                qman_offset = gaudi_dma_assignment[i] * DMA_QMAN_OFFSET;
                WREG32(mmDMA0_QM_CGM_CFG1 + qman_offset,
                                enable ? QMAN_CGM1_PWR_GATE_EN : 0);