diff options
author | Dani Liberman <dliberman@habana.ai> | 2023-06-20 12:09:17 +0300 |
---|---|---|
committer | Oded Gabbay <ogabbay@kernel.org> | 2023-10-09 12:37:19 +0300 |
commit | 88872790923e2d80edf29a00b4e440f1473fa8f5 (patch) | |
tree | 0266bb75ba473fb2cfdc60689101b8d383300540 /drivers/accel/habanalabs/common/firmware_if.c | |
parent | fa46c7bb501b8b649ba17e4a048243b85ba1b1b0 (diff) | |
download | linux-88872790923e2d80edf29a00b4e440f1473fa8f5.tar.xz |
accel/habanalabs: handle f/w reserved dram space request
It is possible for FW to request reserved space in dram.
If the device supports this option, it will retrieve the size from the
f/w and will reserve it.
Currently we add the common code infrastructure to support it.
Signed-off-by: Dani Liberman <dliberman@habana.ai>
Reviewed-by: Oded Gabbay <ogabbay@kernel.org>
Signed-off-by: Oded Gabbay <ogabbay@kernel.org>
Diffstat (limited to 'drivers/accel/habanalabs/common/firmware_if.c')
-rw-r--r-- | drivers/accel/habanalabs/common/firmware_if.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/accel/habanalabs/common/firmware_if.c b/drivers/accel/habanalabs/common/firmware_if.c index c7da69dbfa0a..2bc775d29854 100644 --- a/drivers/accel/habanalabs/common/firmware_if.c +++ b/drivers/accel/habanalabs/common/firmware_if.c @@ -2783,6 +2783,11 @@ static int hl_fw_dynamic_init_cpu(struct hl_device *hdev, hdev->decoder_binning, hdev->rotator_binning); } + if (hdev->asic_prop.support_dynamic_resereved_fw_size) { + hdev->asic_prop.reserved_fw_mem_size = + le32_to_cpu(fw_loader->dynamic_loader.comm_desc.rsvd_mem_size_mb); + } + return 0; } |