From b2ba12ed55e9b7079b4216d091003ad6f49a4433 Mon Sep 17 00:00:00 2001 From: Mubushir Rahman Date: Tue, 28 Aug 2018 16:31:48 -0700 Subject: gpu: nvgpu: gv11b: add chip specific init function - Add gv11b specific init function - This init function will set a chip specific value for emc3d_ratio and then call the gp10b init function Bug 200438743 Change-Id: If6128c2156e4b65086827615909ed17cce1d9224 Signed-off-by: Mubushir Rahman Reviewed-on: https://git-master.nvidia.com/r/1808673 Reviewed-by: svc-misra-checker Reviewed-by: Ilan Aelion GVS: Gerrit_Virtual_Submit Reviewed-by: Terje Bergstrom Reviewed-by: mobile promotions Tested-by: mobile promotions --- drivers/gpu/nvgpu/os/linux/platform_gv11b_tegra.c | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) (limited to 'drivers/gpu/nvgpu/os') diff --git a/drivers/gpu/nvgpu/os/linux/platform_gv11b_tegra.c b/drivers/gpu/nvgpu/os/linux/platform_gv11b_tegra.c index edb3263c..1b4a5456 100644 --- a/drivers/gpu/nvgpu/os/linux/platform_gv11b_tegra.c +++ b/drivers/gpu/nvgpu/os/linux/platform_gv11b_tegra.c @@ -44,6 +44,21 @@ #include "platform_gk20a_tegra.h" #include "gv11b/gr_gv11b.h" +#define EMC3D_GV11B_RATIO 500 + +void gv11b_tegra_scale_init(struct device *dev) +{ + struct gk20a_platform *platform = gk20a_get_platform(dev); + struct gk20a_scale_profile *profile = platform->g->scale_profile; + + if (!profile) + return; + + platform->g->emc3d_ratio = EMC3D_GV11B_RATIO; + + gp10b_tegra_scale_init(dev); +} + static void gv11b_tegra_scale_exit(struct device *dev) { struct gk20a_platform *platform = gk20a_get_platform(dev); @@ -238,7 +253,7 @@ struct gk20a_platform gv11b_tegra_platform = { .get_clk_freqs = gp10b_clk_get_freqs, /* frequency scaling configuration */ - .initscale = gp10b_tegra_scale_init, + .initscale = gv11b_tegra_scale_init, .prescale = gp10b_tegra_prescale, .postscale = gp10b_tegra_postscale, .devfreq_governor = "nvhost_podgov", -- cgit v1.2.2