summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/gp106/clk_arb_gp106.c
diff options
context:
space:
mode:
authorThomas Fleury <tfleury@nvidia.com>2016-09-30 19:40:29 -0400
committerDeepak Nibade <dnibade@nvidia.com>2016-12-27 04:56:51 -0500
commit7a8b12ab634c05cd39c08e704c28ee3f4e111c7f (patch)
treedd9ad4e4d27e0eb779329a0e86c8b8dff5b3312e /drivers/gpu/nvgpu/gp106/clk_arb_gp106.c
parent3d9c33c5953e383527c7e4af594adfe0c82b5788 (diff)
gpu: nvgpu: clk requests completion and event fds
Install one completion fd per SET request. Notifications on dedicated event fd. Changed frequencies unit to Hz from MHz. Remove sequence numbers from dummy arbiter. Added effective clock type (query frequency from counters). Jira DNVGPU-125 Change-Id: Id5445c6ae1d6bf06f7f59c82ff6c5d3b34e26483 Signed-off-by: Thomas Fleury <tfleury@nvidia.com> Reviewed-on: http://git-master/r/1230239 Reviewed-by: Automatic_Commit_Validation_User GVS: Gerrit_Virtual_Submit Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com> (cherry picked from commit d17083f4ceb69725c661678607a3e43148d38560) Reviewed-on: http://git-master/r/1243106
Diffstat (limited to 'drivers/gpu/nvgpu/gp106/clk_arb_gp106.c')
-rw-r--r--drivers/gpu/nvgpu/gp106/clk_arb_gp106.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/gpu/nvgpu/gp106/clk_arb_gp106.c b/drivers/gpu/nvgpu/gp106/clk_arb_gp106.c
index d1cbb32b..112cb588 100644
--- a/drivers/gpu/nvgpu/gp106/clk_arb_gp106.c
+++ b/drivers/gpu/nvgpu/gp106/clk_arb_gp106.c
@@ -23,7 +23,7 @@ static u32 gp106_get_arbiter_clk_domains(struct gk20a *g)
23} 23}
24 24
25static int gp106_get_arbiter_clk_range(struct gk20a *g, u32 api_domain, 25static int gp106_get_arbiter_clk_range(struct gk20a *g, u32 api_domain,
26 u16 *min_mhz, u16 *max_mhz) 26 u64 *min_hz, u64 *max_hz)
27{ 27{
28 enum nv_pmu_clk_clkwhich clkwhich; 28 enum nv_pmu_clk_clkwhich clkwhich;
29 struct clk_set_info *p0_info; 29 struct clk_set_info *p0_info;
@@ -52,14 +52,14 @@ static int gp106_get_arbiter_clk_range(struct gk20a *g, u32 api_domain,
52 if (!p0_info) 52 if (!p0_info)
53 return -EINVAL; 53 return -EINVAL;
54 54
55 *min_mhz = p5_info->min_mhz; 55 *min_hz = (u64)(p5_info->min_mhz) * (u64)MHZ;
56 *max_mhz = p0_info->max_mhz; 56 *max_hz = (u64)(p0_info->max_mhz) * (u64)MHZ;
57 57
58 return 0; 58 return 0;
59} 59}
60 60
61static int gp106_get_arbiter_clk_default(struct gk20a *g, u32 api_domain, 61static int gp106_get_arbiter_clk_default(struct gk20a *g, u32 api_domain,
62 u16 *default_mhz) 62 u64 *default_hz)
63{ 63{
64 enum nv_pmu_clk_clkwhich clkwhich; 64 enum nv_pmu_clk_clkwhich clkwhich;
65 struct clk_set_info *p0_info; 65 struct clk_set_info *p0_info;
@@ -82,7 +82,7 @@ static int gp106_get_arbiter_clk_default(struct gk20a *g, u32 api_domain,
82 if (!p0_info) 82 if (!p0_info)
83 return -EINVAL; 83 return -EINVAL;
84 84
85 *default_mhz = p0_info->max_mhz; 85 *default_hz = (u64)p0_info->max_mhz * (u64)MHZ;
86 86
87 return 0; 87 return 0;
88} 88}