mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-24 10:34:43 +03:00
gpu: nvgpu: reset HWPM system on reservation
Hardware HWPM system should be reset when first reservation is made either for HWPM or PMA_STREAM resource. Support this with below changes - Add hwpm_refcount counter to track HWPM and PMA_STREAM resource reservation count - Increment counter on every HWPM/PMA resource reservation - Decrement counter on every resource reservation release - Reset HWPM system in MC and disable perf unit SLCG on first refcount increment - Reset HWPM system in MC and re-enable perf unit SLCG after last refcount decrement - Add nvgpu_cg_slcg_perf_load_enable() to manage perf unit SLCG Bug 2510974 Jira NVGPU-5360 Change-Id: I20d2927947c3e4d8073cd3131b7733791e9c9346 Signed-off-by: Deepak Nibade <dnibade@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2399594 Tested-by: mobile promotions <svcmobile_promotions@nvidia.com> Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
committed by
Alex Waterman
parent
dfd9feace6
commit
d90b9a3d4e
@@ -262,6 +262,24 @@ done:
|
||||
nvgpu_mutex_release(&g->cg_pg_lock);
|
||||
}
|
||||
|
||||
#ifdef CONFIG_NVGPU_PROFILER
|
||||
void nvgpu_cg_slcg_perf_load_enable(struct gk20a *g, bool enable)
|
||||
{
|
||||
nvgpu_log_fn(g, " ");
|
||||
|
||||
nvgpu_mutex_acquire(&g->cg_pg_lock);
|
||||
if (!g->slcg_enabled) {
|
||||
goto done;
|
||||
}
|
||||
|
||||
if (g->ops.cg.slcg_perf_load_gating_prod != NULL) {
|
||||
g->ops.cg.slcg_perf_load_gating_prod(g, enable);
|
||||
}
|
||||
done:
|
||||
nvgpu_mutex_release(&g->cg_pg_lock);
|
||||
}
|
||||
#endif
|
||||
|
||||
static void cg_init_gr_slcg_load_gating_prod(struct gk20a *g)
|
||||
{
|
||||
if (g->ops.cg.slcg_bus_load_gating_prod != NULL) {
|
||||
|
||||
Reference in New Issue
Block a user