summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/gk20a/gk20a.c
diff options
context:
space:
mode:
authorseshendra Gadagottu <sgadagottu@nvidia.com>2016-10-27 13:54:18 -0400
committermobile promotions <svcmobile_promotions@nvidia.com>2016-11-01 14:36:51 -0400
commit161b61e6cc76c2050115039141027320a2f2e745 (patch)
treefdfdefb9bcb19c03e7d3f6cb315105dc473f88bb /drivers/gpu/nvgpu/gk20a/gk20a.c
parent9dce41e208818c0084c91685c8255942a2ca6e8d (diff)
gpu: nvgpu: pmu HAL update
Update pmu HAL to check for pmu support. pmu initialization will check for pmu support in that platform. JIRA GV11B-21 Change-Id: Ib55be58a1540862b7a91a6162544d10be85b5eb4 Signed-off-by: seshendra Gadagottu <sgadagottu@nvidia.com> Reviewed-on: http://git-master/r/1243911 Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a/gk20a.c')
-rw-r--r--drivers/gpu/nvgpu/gk20a/gk20a.c22
1 files changed, 13 insertions, 9 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/gk20a.c b/drivers/gpu/nvgpu/gk20a/gk20a.c
index 606dbc1f..87f47cd8 100644
--- a/drivers/gpu/nvgpu/gk20a/gk20a.c
+++ b/drivers/gpu/nvgpu/gk20a/gk20a.c
@@ -955,11 +955,13 @@ int gk20a_pm_finalize_poweron(struct device *dev)
955 goto done; 955 goto done;
956 } 956 }
957 957
958 if (g->ops.pmu.prepare_ucode) 958 if (g->ops.pmu.is_pmu_supported(g)) {
959 err = g->ops.pmu.prepare_ucode(g); 959 if (g->ops.pmu.prepare_ucode)
960 if (err) { 960 err = g->ops.pmu.prepare_ucode(g);
961 gk20a_err(dev, "failed to init pmu ucode"); 961 if (err) {
962 goto done; 962 gk20a_err(dev, "failed to init pmu ucode");
963 goto done;
964 }
963 } 965 }
964 966
965#ifdef CONFIG_ARCH_TEGRA_18x_SOC 967#ifdef CONFIG_ARCH_TEGRA_18x_SOC
@@ -972,10 +974,12 @@ int gk20a_pm_finalize_poweron(struct device *dev)
972 } 974 }
973#endif 975#endif
974 976
975 err = gk20a_init_pmu_support(g); 977 if (g->ops.pmu.is_pmu_supported(g)) {
976 if (err) { 978 err = gk20a_init_pmu_support(g);
977 gk20a_err(dev, "failed to init gk20a pmu"); 979 if (err) {
978 goto done; 980 gk20a_err(dev, "failed to init gk20a pmu");
981 goto done;
982 }
979 } 983 }
980 984
981 err = gk20a_init_gr_support(g); 985 err = gk20a_init_gr_support(g);