mirror of
git://nv-tegra.nvidia.com/linux-nv-oot.git
synced 2025-12-25 02:32:08 +03:00
video: tegra: host: nvdla: Avoid contiguos alloc
Avoid requesting physically contiguos allocation where it is not required since this can fail in case of fragementation. Bug 200621525 Change-Id: Icdf5f88b5336950212c62f8a7f0469b7b16e0ac5 Signed-off-by: Anup Mahindre <amahindre@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2360778 Tested-by: Bharat Nihalani <bnihalani@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com> Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com> Reviewed-by: Ken Adams <kadams@nvidia.com> Reviewed-by: Mitch Harwell <mharwell@nvidia.com> Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> GVS: Gerrit_Virtual_Submit
This commit is contained in:
committed by
Laxman Dewangan
parent
e36f30ec5b
commit
ebbbba1533
@@ -71,8 +71,8 @@ static int nvdla_queue_task_pool_alloc(struct platform_device *pdev,
|
||||
|
||||
/* Allocate the kernel memory needed for the task */
|
||||
if (queue->task_kmem_size) {
|
||||
task_pool->kmem_addr = kcalloc(num_tasks,
|
||||
queue->task_kmem_size, GFP_KERNEL);
|
||||
size_t kmem_pool_size = num_tasks * queue->task_kmem_size;
|
||||
task_pool->kmem_addr = vzalloc(kmem_pool_size);
|
||||
if (!task_pool->kmem_addr) {
|
||||
nvhost_err(&pdev->dev,
|
||||
"failed to allocate task_pool->kmem_addr");
|
||||
@@ -115,7 +115,7 @@ static void nvdla_queue_task_free_pool(struct platform_device *pdev,
|
||||
task_pool->va, task_pool->dma_addr,
|
||||
0);
|
||||
|
||||
kfree(task_pool->kmem_addr);
|
||||
vfree(task_pool->kmem_addr);
|
||||
task_pool->max_task_cnt = 0;
|
||||
task_pool->alloc_table = 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user