mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-22 17:36:20 +03:00
gpu: nvgpu: Do not realloc perfmon sample buffer
Allocate perfmon sample buffer only once. Bug 1512840 Change-Id: I3f2a62b0fa28e6ba984ae3068a1d56ba461a0c29 Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com> Reviewed-on: http://git-master/r/408180 Reviewed-by: Thomas Cherry <tcherry@nvidia.com> Tested-by: Thomas Cherry <tcherry@nvidia.com>
This commit is contained in:
committed by
Dan Willemsen
parent
66bb831f44
commit
2b48263b1f
@@ -2156,7 +2156,7 @@ static int pmu_init_perfmon(struct pmu_gk20a *pmu)
|
|||||||
struct pmu_payload payload;
|
struct pmu_payload payload;
|
||||||
u32 seq;
|
u32 seq;
|
||||||
u32 data;
|
u32 data;
|
||||||
int err;
|
int err = 0;
|
||||||
|
|
||||||
gk20a_dbg_fn("");
|
gk20a_dbg_fn("");
|
||||||
|
|
||||||
@@ -2206,8 +2206,9 @@ static int pmu_init_perfmon(struct pmu_gk20a *pmu)
|
|||||||
pwr_pmu_idle_ctrl_filter_disabled_f());
|
pwr_pmu_idle_ctrl_filter_disabled_f());
|
||||||
gk20a_writel(g, pwr_pmu_idle_ctrl_r(2), data);
|
gk20a_writel(g, pwr_pmu_idle_ctrl_r(2), data);
|
||||||
|
|
||||||
pmu->sample_buffer = 0;
|
if (!pmu->sample_buffer)
|
||||||
err = pmu->dmem.alloc(&pmu->dmem, &pmu->sample_buffer, 2 * sizeof(u16));
|
err = pmu->dmem.alloc(&pmu->dmem,
|
||||||
|
&pmu->sample_buffer, 2 * sizeof(u16));
|
||||||
if (err) {
|
if (err) {
|
||||||
gk20a_err(dev_from_gk20a(g),
|
gk20a_err(dev_from_gk20a(g),
|
||||||
"failed to allocate perfmon sample buffer");
|
"failed to allocate perfmon sample buffer");
|
||||||
|
|||||||
Reference in New Issue
Block a user