From 161b61e6cc76c2050115039141027320a2f2e745 Mon Sep 17 00:00:00 2001 From: seshendra Gadagottu Date: Thu, 27 Oct 2016 10:54:18 -0700 Subject: 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 Reviewed-on: http://git-master/r/1243911 Reviewed-by: mobile promotions Tested-by: mobile promotions --- drivers/gpu/nvgpu/gk20a/gk20a.c | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) (limited to 'drivers/gpu/nvgpu/gk20a/gk20a.c') 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) goto done; } - if (g->ops.pmu.prepare_ucode) - err = g->ops.pmu.prepare_ucode(g); - if (err) { - gk20a_err(dev, "failed to init pmu ucode"); - goto done; + if (g->ops.pmu.is_pmu_supported(g)) { + if (g->ops.pmu.prepare_ucode) + err = g->ops.pmu.prepare_ucode(g); + if (err) { + gk20a_err(dev, "failed to init pmu ucode"); + goto done; + } } #ifdef CONFIG_ARCH_TEGRA_18x_SOC @@ -972,10 +974,12 @@ int gk20a_pm_finalize_poweron(struct device *dev) } #endif - err = gk20a_init_pmu_support(g); - if (err) { - gk20a_err(dev, "failed to init gk20a pmu"); - goto done; + if (g->ops.pmu.is_pmu_supported(g)) { + err = gk20a_init_pmu_support(g); + if (err) { + gk20a_err(dev, "failed to init gk20a pmu"); + goto done; + } } err = gk20a_init_gr_support(g); -- cgit v1.2.2