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:
Vinod G
2016-12-02 11:28:11 -08:00
committed by Laxman Dewangan
parent 5e6c70f583
commit fd7ba26524
2 changed files with 7 additions and 1 deletions

View File

@@ -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
*/

View File

@@ -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;