summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/clk/clk.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/nvgpu/clk/clk.c')
-rw-r--r--drivers/gpu/nvgpu/clk/clk.c31
1 files changed, 31 insertions, 0 deletions
diff --git a/drivers/gpu/nvgpu/clk/clk.c b/drivers/gpu/nvgpu/clk/clk.c
index 34b344c8..7ee4f283 100644
--- a/drivers/gpu/nvgpu/clk/clk.c
+++ b/drivers/gpu/nvgpu/clk/clk.c
@@ -236,3 +236,34 @@ u32 clk_domain_get_f_or_v(
236 } 236 }
237 return status; 237 return status;
238} 238}
239
240u32 clk_domain_get_f_points(
241 struct gk20a *g,
242 u32 clkapidomain,
243 u32 *pfpointscount,
244 u16 *pfreqpointsinmhz
245)
246{
247 u32 status = -EINVAL;
248 struct clk_domain *pdomain;
249 u8 i;
250 struct clk_pmupstate *pclk = &g->clk_pmu;
251
252 if (pfpointscount == NULL)
253 return -EINVAL;
254
255 if ((pfreqpointsinmhz == NULL) && (*pfpointscount != 0))
256 return -EINVAL;
257
258 BOARDOBJGRP_FOR_EACH(&(pclk->clk_domainobjs.super.super),
259 struct clk_domain *, pdomain, i) {
260 if (pdomain->api_domain == clkapidomain) {
261 status = pdomain->clkdomainclkgetfpoints(g, pclk,
262 pdomain, pfpointscount,
263 pfreqpointsinmhz,
264 CLK_PROG_VFE_ENTRY_LOGIC);
265 return status;
266 }
267 }
268 return status;
269}