diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/pmu_gk20a.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/pmu_gk20a.c b/drivers/gpu/nvgpu/gk20a/pmu_gk20a.c index 9b8602c5..c12496bb 100644 --- a/drivers/gpu/nvgpu/gk20a/pmu_gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/pmu_gk20a.c | |||
@@ -2156,7 +2156,7 @@ static int pmu_init_perfmon(struct pmu_gk20a *pmu) | |||
2156 | struct pmu_payload payload; | 2156 | struct pmu_payload payload; |
2157 | u32 seq; | 2157 | u32 seq; |
2158 | u32 data; | 2158 | u32 data; |
2159 | int err; | 2159 | int err = 0; |
2160 | 2160 | ||
2161 | gk20a_dbg_fn(""); | 2161 | gk20a_dbg_fn(""); |
2162 | 2162 | ||
@@ -2206,8 +2206,9 @@ static int pmu_init_perfmon(struct pmu_gk20a *pmu) | |||
2206 | pwr_pmu_idle_ctrl_filter_disabled_f()); | 2206 | pwr_pmu_idle_ctrl_filter_disabled_f()); |
2207 | gk20a_writel(g, pwr_pmu_idle_ctrl_r(2), data); | 2207 | gk20a_writel(g, pwr_pmu_idle_ctrl_r(2), data); |
2208 | 2208 | ||
2209 | pmu->sample_buffer = 0; | 2209 | if (!pmu->sample_buffer) |
2210 | err = pmu->dmem.alloc(&pmu->dmem, &pmu->sample_buffer, 2 * sizeof(u16)); | 2210 | err = pmu->dmem.alloc(&pmu->dmem, |
2211 | &pmu->sample_buffer, 2 * sizeof(u16)); | ||
2211 | if (err) { | 2212 | if (err) { |
2212 | gk20a_err(dev_from_gk20a(g), | 2213 | gk20a_err(dev_from_gk20a(g), |
2213 | "failed to allocate perfmon sample buffer"); | 2214 | "failed to allocate perfmon sample buffer"); |