summaryrefslogtreecommitdiff
path: root/drivers/misc/habanalabs/goya/goya.c
diff options
context:
space:
mode:
authorOded Gabbay <oded.gabbay@gmail.com>2019-05-17 01:08:23 +0300
committerOded Gabbay <oded.gabbay@gmail.com>2019-05-17 01:08:23 +0300
commitcbb10f1e4a722511f668d60f0b467327215f90a2 (patch)
treed2c2cd38801b5012f3a96ae3406e1f107955d230 /drivers/misc/habanalabs/goya/goya.c
parentac742737715078963ae17e8417cfbd32f2825389 (diff)
downloadlwn-cbb10f1e4a722511f668d60f0b467327215f90a2.tar.gz
lwn-cbb10f1e4a722511f668d60f0b467327215f90a2.zip
habanalabs: don't limit packet size for device CPU
This patch removes a limitation on the maximum packet size that is read by the device CPU as that limitation is not needed. Therefore, the patch also removes an elaborate calculation that is based on this limitation which is also not needed now. Instead, use a fixed value for the memory pool size of the packets. Signed-off-by: Oded Gabbay <oded.gabbay@gmail.com>
Diffstat (limited to 'drivers/misc/habanalabs/goya/goya.c')
-rw-r--r--drivers/misc/habanalabs/goya/goya.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/misc/habanalabs/goya/goya.c b/drivers/misc/habanalabs/goya/goya.c
index 6ee5db697ca5..e0fc511acaec 100644
--- a/drivers/misc/habanalabs/goya/goya.c
+++ b/drivers/misc/habanalabs/goya/goya.c
@@ -655,7 +655,7 @@ static int goya_sw_init(struct hl_device *hdev)
goto free_dma_pool;
}
- hdev->cpu_accessible_dma_pool = gen_pool_create(HL_CPU_PKT_SHIFT, -1);
+ hdev->cpu_accessible_dma_pool = gen_pool_create(ilog2(32), -1);
if (!hdev->cpu_accessible_dma_pool) {
dev_err(hdev->dev,
"Failed to create CPU accessible DMA pool\n");