summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/os/linux/vgpu/platform_vgpu_tegra.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/nvgpu/os/linux/vgpu/platform_vgpu_tegra.c')
-rw-r--r--drivers/gpu/nvgpu/os/linux/vgpu/platform_vgpu_tegra.c29
1 files changed, 26 insertions, 3 deletions
diff --git a/drivers/gpu/nvgpu/os/linux/vgpu/platform_vgpu_tegra.c b/drivers/gpu/nvgpu/os/linux/vgpu/platform_vgpu_tegra.c
index 44879a45..25b76988 100644
--- a/drivers/gpu/nvgpu/os/linux/vgpu/platform_vgpu_tegra.c
+++ b/drivers/gpu/nvgpu/os/linux/vgpu/platform_vgpu_tegra.c
@@ -20,7 +20,7 @@
20 20
21#include "gk20a/gk20a.h" 21#include "gk20a/gk20a.h"
22#include "os/linux/platform_gk20a.h" 22#include "os/linux/platform_gk20a.h"
23#include "clk_vgpu.h" 23#include "vgpu/clk_vgpu.h"
24#include "vgpu_linux.h" 24#include "vgpu_linux.h"
25 25
26static int gk20a_tegra_probe(struct device *dev) 26static int gk20a_tegra_probe(struct device *dev)
@@ -40,6 +40,29 @@ static int gk20a_tegra_probe(struct device *dev)
40#endif 40#endif
41} 41}
42 42
43long vgpu_plat_clk_round_rate(struct device *dev, unsigned long rate)
44{
45 /* server will handle frequency rounding */
46 return rate;
47}
48
49int vgpu_plat_clk_get_freqs(struct device *dev, unsigned long **freqs,
50 int *num_freqs)
51{
52 struct gk20a_platform *platform = gk20a_get_platform(dev);
53 struct gk20a *g = platform->g;
54
55 return vgpu_clk_get_freqs(g, freqs, num_freqs);
56}
57
58int vgpu_plat_clk_cap_rate(struct device *dev, unsigned long rate)
59{
60 struct gk20a_platform *platform = gk20a_get_platform(dev);
61 struct gk20a *g = platform->g;
62
63 return vgpu_clk_cap_rate(g, rate);
64}
65
43struct gk20a_platform vgpu_tegra_platform = { 66struct gk20a_platform vgpu_tegra_platform = {
44 .has_syncpoints = true, 67 .has_syncpoints = true,
45 .aggressive_sync_destroy_thresh = 64, 68 .aggressive_sync_destroy_thresh = 64,
@@ -60,8 +83,8 @@ struct gk20a_platform vgpu_tegra_platform = {
60 83
61 .probe = gk20a_tegra_probe, 84 .probe = gk20a_tegra_probe,
62 85
63 .clk_round_rate = vgpu_clk_round_rate, 86 .clk_round_rate = vgpu_plat_clk_round_rate,
64 .get_clk_freqs = vgpu_clk_get_freqs, 87 .get_clk_freqs = vgpu_plat_clk_get_freqs,
65 88
66 /* frequency scaling configuration */ 89 /* frequency scaling configuration */
67 .devfreq_governor = "userspace", 90 .devfreq_governor = "userspace",