diff options
author | Debarshi Dutta <ddutta@nvidia.com> | 2018-09-21 01:27:11 -0400 |
---|---|---|
committer | mobile promotions <svcmobile_promotions@nvidia.com> | 2018-09-24 12:14:28 -0400 |
commit | 1c00099f60567b1166028d5795f62254419e2975 (patch) | |
tree | ad68f2ea7747b2207e45f3d243496537f610a24b | |
parent | 863b47064445b3dd5cdc354821c8d3d14deade33 (diff) |
gpu: nvgpu: remove freeing of unused pointer for mclk
mclk is not enabled yet for IGPUs and as such we donot allocate memory
and incorrectly free them in gp10b_clk_arb_cleanup. This is corrected
by removing the freeing of the mclk pointers in gp10b_clk_arb_cleanup.
As an addon also change gk20a/gk20a.h to <nvgpu/gk20a.h> in
clk_arb_gp10b.c
Bug 2061372
Change-Id: I3bba20443b9ef7beb88251779edd67a32f6c9d20
Signed-off-by: Debarshi Dutta <ddutta@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1836553
Reviewed-by: svc-misra-checker <svc-misra-checker@nvidia.com>
Reviewed-by: Prateek Sethi <prsethi@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
-rw-r--r-- | drivers/gpu/nvgpu/gp10b/clk_arb_gp10b.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/gpu/nvgpu/gp10b/clk_arb_gp10b.c b/drivers/gpu/nvgpu/gp10b/clk_arb_gp10b.c index 78fb1261..7a465fee 100644 --- a/drivers/gpu/nvgpu/gp10b/clk_arb_gp10b.c +++ b/drivers/gpu/nvgpu/gp10b/clk_arb_gp10b.c | |||
@@ -20,7 +20,7 @@ | |||
20 | * DEALINGS IN THE SOFTWARE. | 20 | * DEALINGS IN THE SOFTWARE. |
21 | */ | 21 | */ |
22 | 22 | ||
23 | #include "gk20a/gk20a.h" | 23 | #include <nvgpu/gk20a.h> |
24 | #include <nvgpu/clk_arb.h> | 24 | #include <nvgpu/clk_arb.h> |
25 | 25 | ||
26 | #include "clk_arb_gp10b.h" | 26 | #include "clk_arb_gp10b.h" |
@@ -407,12 +407,10 @@ void gp10b_clk_arb_cleanup(struct nvgpu_clk_arb *arb) | |||
407 | int index; | 407 | int index; |
408 | 408 | ||
409 | nvgpu_kfree(g, arb->gpc2clk_f_points); | 409 | nvgpu_kfree(g, arb->gpc2clk_f_points); |
410 | nvgpu_kfree(g, arb->mclk_f_points); | ||
411 | 410 | ||
412 | for (index = 0; index < 2; index++) { | 411 | for (index = 0; index < 2; index++) { |
413 | nvgpu_kfree(g, | 412 | nvgpu_kfree(g, |
414 | arb->vf_table_pool[index].gpc2clk_points); | 413 | arb->vf_table_pool[index].gpc2clk_points); |
415 | nvgpu_kfree(g, arb->vf_table_pool[index].mclk_points); | ||
416 | } | 414 | } |
417 | 415 | ||
418 | nvgpu_mutex_destroy(&g->clk_arb->pstate_lock); | 416 | nvgpu_mutex_destroy(&g->clk_arb->pstate_lock); |