summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/clk/clk_mclk.h
diff options
context:
space:
mode:
authorDavid Nieto <dmartineznie@nvidia.com>2016-08-26 23:20:02 -0400
committerDeepak Nibade <dnibade@nvidia.com>2016-12-27 04:56:49 -0500
commit41838fc2bb6135bdd87d080a1efda8403f6f2657 (patch)
treef05bbff1f7118ec3a8ee4947067007f9557c41af /drivers/gpu/nvgpu/clk/clk_mclk.h
parent455fc2806a06298831130d1adb617ddca48fabb1 (diff)
gpu: nvgpu: gp106: MCLK P8/P5 sequences and API
Adds P5/P8 sequences and simple debugfs API to change from P0->P5 JIRA DNVGPU-117 Change-Id: I5811a5bddd0e11074524cce421bff1e3d441228d Signed-off-by: David Nieto <dmartineznie@nvidia.com> Reviewed-on: http://git-master/r/1208655 (cherry picked from commit dd410a86263e2407e043743945cf09a77910d745) Reviewed-on: http://git-master/r/1231035 GVS: Gerrit_Virtual_Submit Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com> Tested-by: Terje Bergstrom <tbergstrom@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/clk/clk_mclk.h')
-rw-r--r--drivers/gpu/nvgpu/clk/clk_mclk.h30
1 files changed, 29 insertions, 1 deletions
diff --git a/drivers/gpu/nvgpu/clk/clk_mclk.h b/drivers/gpu/nvgpu/clk/clk_mclk.h
index f86893f7..c3261eac 100644
--- a/drivers/gpu/nvgpu/clk/clk_mclk.h
+++ b/drivers/gpu/nvgpu/clk/clk_mclk.h
@@ -14,6 +14,34 @@
14#ifndef _CLKMCLK_H_ 14#ifndef _CLKMCLK_H_
15#define _CLKMCLK_H_ 15#define _CLKMCLK_H_
16 16
17int clk_mclkseq_build_prgm_gddr5(struct gk20a *g); 17#include <linux/mutex.h>
18
19enum gk20a_mclk_speed {
20 gk20a_mclk_low_speed,
21 gk20a_mclk_mid_speed,
22 gk20a_mclk_high_speed
23};
24
25struct clk_mclk_state {
26 enum gk20a_mclk_speed speed;
27 struct mutex mclk_mutex;
28 void *vreg_buf;
29
30 /* function pointers */
31 int (*change)(struct gk20a *g, enum gk20a_mclk_speed speed);
32
33#ifdef CONFIG_DEBUG_FS
34 s64 switch_max;
35 s64 switch_min;
36 u64 switch_num;
37 s64 switch_avg;
38 s64 switch_std;
39 bool debugfs_set;
40#endif
41};
42
43int clk_mclkseq_init_mclk_gddr5(struct gk20a *g);
44int clk_mclkseq_change_mclk_gddr5(struct gk20a *g,
45 enum gk20a_mclk_speed speed);
18 46
19#endif 47#endif