diff options
author | Alex Waterman <alexw@nvidia.com> | 2017-03-08 20:08:50 -0500 |
---|---|---|
committer | mobile promotions <svcmobile_promotions@nvidia.com> | 2017-03-30 15:36:09 -0400 |
commit | 24e1c7e0a729158be36d63b821550d206a8a0436 (patch) | |
tree | cf26c850cc63957f63f3e8f97914268839d8e0de /drivers/gpu/nvgpu/gk20a/gk20a_scale.c | |
parent | 7010bf88399ea81b2b35844f738baac19dc5a441 (diff) |
gpu: nvgpu: Use new kmem API functions (misc)
Use the new kmem API functions in misc gk20a code. Some additional
modifications were also made:
o Add a struct gk20a pointer to gk20a_fence to enable proper
kmem free usage.
o Add gk20a pointer to alloc_session() in dbg_gpu_gk20a.c to
use kmem API for allocating a session.
o Plumb a gk20a pointer through the fence creation and deletion.
o Use statically allocated buffers for names in file creation.
Bug 1799159
Bug 1823380
Change-Id: I3678080e3ffa1f9bcf6934e3f4819a1bc531689b
Signed-off-by: Alex Waterman <alexw@nvidia.com>
Reviewed-on: http://git-master/r/1318323
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a/gk20a_scale.c')
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/gk20a_scale.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/gk20a_scale.c b/drivers/gpu/nvgpu/gk20a/gk20a_scale.c index bae5c2d8..aabe673a 100644 --- a/drivers/gpu/nvgpu/gk20a/gk20a_scale.c +++ b/drivers/gpu/nvgpu/gk20a/gk20a_scale.c | |||
@@ -26,6 +26,8 @@ | |||
26 | 26 | ||
27 | #include <governor.h> | 27 | #include <governor.h> |
28 | 28 | ||
29 | #include <nvgpu/kmem.h> | ||
30 | |||
29 | #include "gk20a.h" | 31 | #include "gk20a.h" |
30 | #include "pmu_gk20a.h" | 32 | #include "pmu_gk20a.h" |
31 | #include "clk_gk20a.h" | 33 | #include "clk_gk20a.h" |
@@ -364,7 +366,7 @@ void gk20a_scale_init(struct device *dev) | |||
364 | if (!platform->devfreq_governor && !platform->qos_notify) | 366 | if (!platform->devfreq_governor && !platform->qos_notify) |
365 | return; | 367 | return; |
366 | 368 | ||
367 | profile = kzalloc(sizeof(*profile), GFP_KERNEL); | 369 | profile = nvgpu_kzalloc(g, sizeof(*profile)); |
368 | 370 | ||
369 | profile->dev = dev; | 371 | profile->dev = dev; |
370 | profile->dev_stat.busy = false; | 372 | profile->dev_stat.busy = false; |
@@ -415,7 +417,7 @@ void gk20a_scale_init(struct device *dev) | |||
415 | return; | 417 | return; |
416 | 418 | ||
417 | err_get_freqs: | 419 | err_get_freqs: |
418 | kfree(profile); | 420 | nvgpu_kfree(g, profile); |
419 | } | 421 | } |
420 | 422 | ||
421 | void gk20a_scale_exit(struct device *dev) | 423 | void gk20a_scale_exit(struct device *dev) |
@@ -436,7 +438,7 @@ void gk20a_scale_exit(struct device *dev) | |||
436 | g->devfreq = NULL; | 438 | g->devfreq = NULL; |
437 | } | 439 | } |
438 | 440 | ||
439 | kfree(g->scale_profile); | 441 | nvgpu_kfree(g, g->scale_profile); |
440 | g->scale_profile = NULL; | 442 | g->scale_profile = NULL; |
441 | } | 443 | } |
442 | 444 | ||