mirror of
git://nv-tegra.nvidia.com/linux-nv-oot.git
synced 2025-12-24 18:21:35 +03:00
video: tegra: pva: Remove dynamic memory for task
Removing the dynamic memory allocation done for task in the submit call. Allocate the fixed task memory array based on maximum task that can be supported per queue during nvhost_queue_alloc call. On task submit call obtain a task memory from pool based on availability. Free that memory when task is done. Deallocate task pool memory on nvhost_queue_free call. JIRA PVA-189 Change-Id: I93e89325c1c35a46bdf579dce6aae18c2bfe7183 Signed-off-by: Vinod G <vinodg@nvidia.com> Reviewed-on: http://git-master/r/1264027 Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
@@ -41,6 +41,11 @@
|
||||
*/
|
||||
#define MAX_NVDLA_QUEUE_COUNT 16
|
||||
|
||||
/**
|
||||
* Maximum number of tasks per queue
|
||||
*/
|
||||
#define MAX_NVDLA_TASK_COUNT 32
|
||||
|
||||
/**
|
||||
* Trace Buffer Size
|
||||
*/
|
||||
|
||||
@@ -332,7 +332,8 @@ static int nvdla_open(struct inode *inode, struct file *file)
|
||||
goto err_alloc_buffer;
|
||||
}
|
||||
|
||||
priv->queue = nvhost_queue_alloc(nvdla_dev->pool);
|
||||
priv->queue = nvhost_queue_alloc(nvdla_dev->pool,
|
||||
MAX_NVDLA_TASK_COUNT);
|
||||
if (IS_ERR(priv->queue)) {
|
||||
err = PTR_ERR(priv->queue);
|
||||
goto err_alloc_queue;
|
||||
|
||||
Reference in New Issue
Block a user