mirror of
git://nv-tegra.nvidia.com/linux-nv-oot.git
synced 2025-12-24 10:11:26 +03:00
nvdla: kmd: put pm reference with task completion.
[1] With the current design, the DLA is leaning on the nvhost callback
notifier for putting the pm reference.
[2] This commit decouples that dependency by putting the pm reference
for every task completion.
Jira DLA-6649
Jira LS-477
Change-Id: I84ea948b7f717f7f3e28ac1f58f17f07c53e822b
Signed-off-by: Arvind M <am@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2857162
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
Reviewed-by: svc_kernel_abi <svc_kernel_abi@nvidia.com>
Reviewed-by: Amit Sharma (SW-TEGRA) <amisharma@nvidia.com>
Reviewed-by: Ayush Kumar <ayushk@nvidia.com>
Reviewed-by: Ken Adams <kadams@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
Tested-by: Amit Sharma (SW-TEGRA) <amisharma@nvidia.com>
This commit is contained in:
committed by
Laxman Dewangan
parent
5720a7534d
commit
84556afbef
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
* NVDLA queue and task management for T194
|
||||
*
|
||||
* Copyright (c) 2016-2022, NVIDIA Corporation. All rights reserved.
|
||||
* Copyright (c) 2016-2023, NVIDIA Corporation. All rights reserved.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it
|
||||
* under the terms and conditions of the GNU General Public License,
|
||||
@@ -322,7 +322,7 @@ static inline size_t nvdla_profile_status_offset(struct nvdla_task *task)
|
||||
return offset;
|
||||
}
|
||||
|
||||
static void nvdla_queue_update(void *priv, int nr_completed)
|
||||
static void nvdla_queue_update(void *priv, int unused)
|
||||
{
|
||||
int task_complete;
|
||||
struct nvdla_task *task, *safe;
|
||||
@@ -331,6 +331,7 @@ static void nvdla_queue_update(void *priv, int nr_completed)
|
||||
struct nvhost_notification *tsp_notifier;
|
||||
u64 timestamp_start, timestamp_end;
|
||||
u64 *timestamp_ptr;
|
||||
int n_tasks_completed = 0;
|
||||
|
||||
mutex_lock(&queue->list_lock);
|
||||
|
||||
@@ -371,10 +372,12 @@ static void nvdla_queue_update(void *priv, int nr_completed)
|
||||
timestamp_end);
|
||||
|
||||
nvdla_task_free_locked(task);
|
||||
n_tasks_completed++;
|
||||
}
|
||||
}
|
||||
|
||||
/* put pm refcount */
|
||||
nvhost_module_idle_mult(pdev, nr_completed);
|
||||
nvhost_module_idle_mult(pdev, n_tasks_completed);
|
||||
|
||||
mutex_unlock(&queue->list_lock);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user