diff options
author | Vijayakumar <vsubbu@nvidia.com> | 2016-08-31 08:10:24 -0400 |
---|---|---|
committer | Deepak Nibade <dnibade@nvidia.com> | 2016-12-27 04:56:50 -0500 |
commit | 1b1090512020369df18dbe36336ac5a85d2cd693 (patch) | |
tree | 41f3a11dbdff21815545e0e69734c60416783e5e /drivers/gpu/nvgpu/clk/clk_prog.h | |
parent | e28ef73ec9baea7df631606298f8c210dc8f31a8 (diff) |
gpu: nvgpu: support to parse VF table
JIRA DNVGPU-123
function was added to retrieve V for F or
F for V for a given clock domain.
Clock domain can be master or slave.
F or V can be intermediate point between two
successive V or F values in VF table.
VF table should be cached before calling this function.
A F value below Fmin will return Vmin.
F > Fmax will return error
A V value above Vmax wil return F max.
A V value below Vmin will return error.
Change-Id: I28b4e8647510c6933e9e1204cfff31d74616e11a
Signed-off-by: Vijayakumar <vsubbu@nvidia.com>
Reviewed-on: http://git-master/r/1211234
(cherry-picked from commit 5b83b03f2454fbec8d49a064ed09b09c92d3e9fa)
Reviewed-on: http://git-master/r/1235054
Reviewed-by: Thomas Fleury <tfleury@nvidia.com>
Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
Tested-by: Terje Bergstrom <tbergstrom@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/clk/clk_prog.h')
-rw-r--r-- | drivers/gpu/nvgpu/clk/clk_prog.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/gpu/nvgpu/clk/clk_prog.h b/drivers/gpu/nvgpu/clk/clk_prog.h index 8718bdd6..979d327d 100644 --- a/drivers/gpu/nvgpu/clk/clk_prog.h +++ b/drivers/gpu/nvgpu/clk/clk_prog.h | |||
@@ -27,6 +27,11 @@ typedef u32 vf_flatten(struct gk20a *g, struct clk_pmupstate *pclk, | |||
27 | struct clk_prog_1x_master *p1xmaster, | 27 | struct clk_prog_1x_master *p1xmaster, |
28 | u8 clk_domain_idx, u16 *pfreqmaxlastmhz); | 28 | u8 clk_domain_idx, u16 *pfreqmaxlastmhz); |
29 | 29 | ||
30 | typedef u32 vf_lookup(struct gk20a *g, struct clk_pmupstate *pclk, | ||
31 | struct clk_prog_1x_master *p1xmaster, | ||
32 | u8 *slave_clk_domain_idx, u16 *pclkmhz, | ||
33 | u32 *pvoltuv, u8 rail); | ||
34 | |||
30 | struct clk_progs { | 35 | struct clk_progs { |
31 | struct boardobjgrp_e255 super; | 36 | struct boardobjgrp_e255 super; |
32 | u8 slave_entry_count; | 37 | u8 slave_entry_count; |
@@ -52,6 +57,7 @@ struct clk_prog_1x_master { | |||
52 | struct ctrl_clk_clk_delta deltas; | 57 | struct ctrl_clk_clk_delta deltas; |
53 | union ctrl_clk_clk_prog_1x_master_source_data source_data; | 58 | union ctrl_clk_clk_prog_1x_master_source_data source_data; |
54 | vf_flatten *vfflatten; | 59 | vf_flatten *vfflatten; |
60 | vf_lookup *vflookup; | ||
55 | }; | 61 | }; |
56 | 62 | ||
57 | struct clk_prog_1x_master_ratio { | 63 | struct clk_prog_1x_master_ratio { |