summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/gk20a/gk20a.c
diff options
context:
space:
mode:
authorseshendra Gadagottu <sgadagottu@nvidia.com>2017-03-01 13:58:55 -0500
committermobile promotions <svcmobile_promotions@nvidia.com>2017-03-02 13:14:30 -0500
commitf8ec82237ead5f9cb3a5e2f98ef08a6bc55fc931 (patch)
tree6cdc0758c6b93f55644998c2ba6bd143076e18b7 /drivers/gpu/nvgpu/gk20a/gk20a.c
parent3c3f947cf4a7d2db72f3bb3e2f7eab4d7d926a30 (diff)
gpu: nvgpu: check for pmu enable
Check for pmu enable, before calling pmu_destrory(). Change-Id: I64c5071ed69b6b50140e46da48a2b165c1f7ba02 Signed-off-by: seshendra Gadagottu <sgadagottu@nvidia.com> Reviewed-on: http://git-master/r/1313391 Reviewed-by: Automatic_Commit_Validation_User GVS: Gerrit_Virtual_Submit Reviewed-by: svccoveritychecker <svccoveritychecker@nvidia.com> Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a/gk20a.c')
-rw-r--r--drivers/gpu/nvgpu/gk20a/gk20a.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/gk20a.c b/drivers/gpu/nvgpu/gk20a/gk20a.c
index 32570d3d..e2795fbf 100644
--- a/drivers/gpu/nvgpu/gk20a/gk20a.c
+++ b/drivers/gpu/nvgpu/gk20a/gk20a.c
@@ -817,7 +817,8 @@ static int gk20a_pm_prepare_poweroff(struct device *dev)
817 goto done; 817 goto done;
818 818
819 /* disable elpg before gr or fifo suspend */ 819 /* disable elpg before gr or fifo suspend */
820 ret |= gk20a_pmu_destroy(g); 820 if (g->ops.pmu.is_pmu_supported(g))
821 ret |= gk20a_pmu_destroy(g);
821 /* 822 /*
822 * After this point, gk20a interrupts should not get 823 * After this point, gk20a interrupts should not get
823 * serviced. 824 * serviced.