diff options
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a/pmu_gk20a.c')
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/pmu_gk20a.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/pmu_gk20a.c b/drivers/gpu/nvgpu/gk20a/pmu_gk20a.c index 7bcda89f..f2430165 100644 --- a/drivers/gpu/nvgpu/gk20a/pmu_gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/pmu_gk20a.c | |||
@@ -1,7 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * GK20A PMU (aka. gPMU outside gk20a context) | 2 | * GK20A PMU (aka. gPMU outside gk20a context) |
3 | * | 3 | * |
4 | * Copyright (c) 2011-2014, NVIDIA CORPORATION. All rights reserved. | 4 | * Copyright (c) 2011-2015, NVIDIA CORPORATION. All rights reserved. |
5 | * | 5 | * |
6 | * This program is free software; you can redistribute it and/or modify it | 6 | * This program is free software; you can redistribute it and/or modify it |
7 | * under the terms and conditions of the GNU General Public License, | 7 | * under the terms and conditions of the GNU General Public License, |
@@ -3610,6 +3610,10 @@ int gk20a_pmu_enable_elpg(struct gk20a *g) | |||
3610 | 3610 | ||
3611 | gk20a_dbg_fn(""); | 3611 | gk20a_dbg_fn(""); |
3612 | 3612 | ||
3613 | |||
3614 | if (!support_gk20a_pmu(g->dev)) | ||
3615 | return ret; | ||
3616 | |||
3613 | mutex_lock(&pmu->elpg_mutex); | 3617 | mutex_lock(&pmu->elpg_mutex); |
3614 | 3618 | ||
3615 | pmu->elpg_refcnt++; | 3619 | pmu->elpg_refcnt++; |
@@ -3650,6 +3654,9 @@ int gk20a_pmu_disable_elpg(struct gk20a *g) | |||
3650 | 3654 | ||
3651 | gk20a_dbg_fn(""); | 3655 | gk20a_dbg_fn(""); |
3652 | 3656 | ||
3657 | if (!support_gk20a_pmu(g->dev)) | ||
3658 | return ret; | ||
3659 | |||
3653 | mutex_lock(&pmu->elpg_mutex); | 3660 | mutex_lock(&pmu->elpg_mutex); |
3654 | 3661 | ||
3655 | pmu->elpg_refcnt--; | 3662 | pmu->elpg_refcnt--; |