diff options
author | Alex Waterman <alexw@nvidia.com> | 2017-03-08 19:52:11 -0500 |
---|---|---|
committer | mobile promotions <svcmobile_promotions@nvidia.com> | 2017-03-26 12:55:10 -0400 |
commit | f403208306c100f16daf8577b585528124f9f004 (patch) | |
tree | 6d5b70d7c01ecb74aea66bcf2798c1be0a491ff2 /drivers/gpu/nvgpu/clk/clk_prog.c | |
parent | c11228d48be1825e1ec84afd38c6938504fa4100 (diff) |
gpu: nvgpu: Use new kmem API functions (clk/*)
Use the new kmem API functions in clk/*. Also add a struct gk20a
pointer to the following functions:
nvgpu_clk_notification_queue_alloc()
nvgpu_clk_notification_queue_free()
Bug 1799159
Bug 1823380
Change-Id: I7eb67dc443c0bbe0d3f67dac7bf363da60e1051c
Signed-off-by: Alex Waterman <alexw@nvidia.com>
Reviewed-on: http://git-master/r/1318316
Reviewed-by: svccoveritychecker <svccoveritychecker@nvidia.com>
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/clk/clk_prog.c')
-rw-r--r-- | drivers/gpu/nvgpu/clk/clk_prog.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/gpu/nvgpu/clk/clk_prog.c b/drivers/gpu/nvgpu/clk/clk_prog.c index b4f6a464..dc9c58a6 100644 --- a/drivers/gpu/nvgpu/clk/clk_prog.c +++ b/drivers/gpu/nvgpu/clk/clk_prog.c | |||
@@ -13,6 +13,8 @@ | |||
13 | 13 | ||
14 | #include <nvgpu/bios.h> | 14 | #include <nvgpu/bios.h> |
15 | 15 | ||
16 | #include <nvgpu/kmem.h> | ||
17 | |||
16 | #include "gk20a/gk20a.h" | 18 | #include "gk20a/gk20a.h" |
17 | #include "clk.h" | 19 | #include "clk.h" |
18 | #include "clk_prog.h" | 20 | #include "clk_prog.h" |
@@ -613,7 +615,7 @@ static u32 clk_prog_construct_1x_master(struct gk20a *g, | |||
613 | getslaveclk_prog_1x_master; | 615 | getslaveclk_prog_1x_master; |
614 | 616 | ||
615 | pclkprog->p_vf_entries = (struct ctrl_clk_clk_prog_1x_master_vf_entry *) | 617 | pclkprog->p_vf_entries = (struct ctrl_clk_clk_prog_1x_master_vf_entry *) |
616 | kzalloc(vfsize, GFP_KERNEL); | 618 | nvgpu_kzalloc(g, vfsize); |
617 | 619 | ||
618 | memcpy(pclkprog->p_vf_entries, ptmpprog->p_vf_entries, vfsize); | 620 | memcpy(pclkprog->p_vf_entries, ptmpprog->p_vf_entries, vfsize); |
619 | 621 | ||
@@ -658,7 +660,7 @@ static u32 clk_prog_construct_1x_master_ratio(struct gk20a *g, | |||
658 | 660 | ||
659 | pclkprog->p_slave_entries = | 661 | pclkprog->p_slave_entries = |
660 | (struct ctrl_clk_clk_prog_1x_master_ratio_slave_entry *) | 662 | (struct ctrl_clk_clk_prog_1x_master_ratio_slave_entry *) |
661 | kzalloc(slavesize, GFP_KERNEL); | 663 | nvgpu_kzalloc(g, slavesize); |
662 | if (!pclkprog->p_slave_entries) | 664 | if (!pclkprog->p_slave_entries) |
663 | return -ENOMEM; | 665 | return -ENOMEM; |
664 | 666 | ||
@@ -699,7 +701,7 @@ static u32 clk_prog_construct_1x_master_table(struct gk20a *g, | |||
699 | 701 | ||
700 | pclkprog->p_slave_entries = | 702 | pclkprog->p_slave_entries = |
701 | (struct ctrl_clk_clk_prog_1x_master_table_slave_entry *) | 703 | (struct ctrl_clk_clk_prog_1x_master_table_slave_entry *) |
702 | kzalloc(slavesize, GFP_KERNEL); | 704 | nvgpu_kzalloc(g, slavesize); |
703 | 705 | ||
704 | if (!pclkprog->p_slave_entries) { | 706 | if (!pclkprog->p_slave_entries) { |
705 | status = -ENOMEM; | 707 | status = -ENOMEM; |