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_vf_point.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_vf_point.h')
-rw-r--r-- | drivers/gpu/nvgpu/clk/clk_vf_point.h | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/gpu/nvgpu/clk/clk_vf_point.h b/drivers/gpu/nvgpu/clk/clk_vf_point.h index 306bec41..15920066 100644 --- a/drivers/gpu/nvgpu/clk/clk_vf_point.h +++ b/drivers/gpu/nvgpu/clk/clk_vf_point.h | |||
@@ -46,8 +46,8 @@ struct clk_vf_point_freq { | |||
46 | }; | 46 | }; |
47 | 47 | ||
48 | #define CLK_CLK_VF_POINT_GET(pclk, idx) \ | 48 | #define CLK_CLK_VF_POINT_GET(pclk, idx) \ |
49 | ((struct clk_vf_point)BOARDOBJGRP_OBJ_GET_BY_IDX( \ | 49 | ((struct clk_vf_point *)BOARDOBJGRP_OBJ_GET_BY_IDX( \ |
50 | &pclk->vfpoints.super.super, (u8)(idx))) | 50 | &pclk->clk_vf_pointobjs.super.super, (u8)(idx))) |
51 | 51 | ||
52 | #define clkvfpointpairget(pvfpoint) \ | 52 | #define clkvfpointpairget(pvfpoint) \ |
53 | (&((pvfpoint)->pair)) | 53 | (&((pvfpoint)->pair)) |
@@ -66,6 +66,9 @@ struct clk_vf_point_freq { | |||
66 | CTRL_CLK_VF_PAIR_VOLTAGE_UV_SET(clkvfpointpairget(pvfpoint), \ | 66 | CTRL_CLK_VF_PAIR_VOLTAGE_UV_SET(clkvfpointpairget(pvfpoint), \ |
67 | _voltageuv) | 67 | _voltageuv) |
68 | 68 | ||
69 | #define clkvfpointvoltageuvget(pgpu, pvfpoint) \ | ||
70 | CTRL_CLK_VF_PAIR_VOLTAGE_UV_GET(clkvfpointpairget(pvfpoint)) \ | ||
71 | |||
69 | struct clk_vf_point *construct_clk_vf_point(struct gk20a *g, void *pargs); | 72 | struct clk_vf_point *construct_clk_vf_point(struct gk20a *g, void *pargs); |
70 | 73 | ||
71 | #endif | 74 | #endif |