gpu: nvgpu: Rename TPC powergating mutex

Rename tpc_pg_lock to static_pg_lock and
have_tpc_pg_lock to have_static_pg_lock as it
is used for tpc/gpc/fbp power gating.

JIRA NVGPU-6433

Change-Id: I4c56b9710e303ad9e872bad4b5ed9a167acb9dd6
Signed-off-by: Divya Singhatwaria <dsinghatwari@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2537489
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
Divya Singhatwaria
2021-05-31 20:30:49 +05:30
committed by mobile promotions
parent 22c3ce37a7
commit 9f30609550
13 changed files with 48 additions and 48 deletions

View File

@@ -863,11 +863,11 @@ static ssize_t tpc_pg_mask_store(struct device *dev,
unsigned long val = 0;
struct nvgpu_gr_obj_ctx_golden_image *gr_golden_image = NULL;
nvgpu_mutex_acquire(&g->tpc_pg_lock);
nvgpu_mutex_acquire(&g->static_pg_lock);
if (kstrtoul(buf, 10, &val) < 0) {
nvgpu_err(g, "invalid value");
nvgpu_mutex_release(&g->tpc_pg_lock);
nvgpu_mutex_release(&g->static_pg_lock);
return -EINVAL;
}
@@ -884,7 +884,7 @@ static ssize_t tpc_pg_mask_store(struct device *dev,
nvgpu_gr_obj_ctx_get_golden_image_size(gr_golden_image)
!= 0) {
nvgpu_err(g, "golden image size already initialized");
nvgpu_mutex_release(&g->tpc_pg_lock);
nvgpu_mutex_release(&g->static_pg_lock);
return -ENODEV;
}
/* checking that the value from userspace is within
@@ -894,11 +894,11 @@ static ssize_t tpc_pg_mask_store(struct device *dev,
g->tpc_pg_mask = val;
} else {
nvgpu_err(g, "TPC-PG mask is invalid");
nvgpu_mutex_release(&g->tpc_pg_lock);
nvgpu_mutex_release(&g->static_pg_lock);
return -EINVAL;
}
exit:
nvgpu_mutex_release(&g->tpc_pg_lock);
nvgpu_mutex_release(&g->static_pg_lock);
return count;
}