summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOhad Sharabi <osharabi@habana.ai>2022-11-27 12:46:23 +0200
committerOded Gabbay <ogabbay@kernel.org>2023-01-26 10:56:20 +0200
commit6d62d4402fec005f02f611510d096ee472b50ecb (patch)
treede2f420562f1f8a4d7136ded100eb3979d70c103
parent8364fb3cdd03d8c3ee5c1074eba0028a6ea7acfd (diff)
habanalabs: update DRAM props according to preboot data
If the f/w reports the binning masks at the preboot stage, the driver must align its DRAM properties according to the new information. Signed-off-by: Ohad Sharabi <osharabi@habana.ai> Reviewed-by: Oded Gabbay <ogabbay@kernel.org> Signed-off-by: Oded Gabbay <ogabbay@kernel.org>
-rw-r--r--drivers/misc/habanalabs/common/firmware_if.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/misc/habanalabs/common/firmware_if.c b/drivers/misc/habanalabs/common/firmware_if.c
index 4f364c3085fe..046866c673e2 100644
--- a/drivers/misc/habanalabs/common/firmware_if.c
+++ b/drivers/misc/habanalabs/common/firmware_if.c
@@ -2582,6 +2582,10 @@ static int hl_fw_dynamic_init_cpu(struct hl_device *hdev,
hdev->decoder_binning = le32_to_cpu(binning_info->dec_mask);
hdev->rotator_binning = le32_to_cpu(binning_info->rot_mask);
+ rc = hdev->asic_funcs->set_dram_properties(hdev);
+ if (rc)
+ goto out;
+
dev_dbg(hdev->dev,
"Read binning masks: tpc: 0x%llx, dram: 0x%llx, edma: 0x%x, dec: 0x%x, rot:0x%x\n",
hdev->tpc_binning, hdev->dram_binning, hdev->edma_binning,