diff options
author | Terje Bergstrom <tbergstrom@nvidia.com> | 2014-05-19 02:17:05 -0400 |
---|---|---|
committer | Dan Willemsen <dwillemsen@nvidia.com> | 2015-03-18 15:09:23 -0400 |
commit | 88ca9b50f6a1f62986dad4c72f023a5f757b967f (patch) | |
tree | ba44a5d1f7afb23709ed4d27d24b3f9b26acad7f /drivers/gpu/nvgpu/gk20a | |
parent | effa9dcfaa5220c6e59d421e1e3c90a97b86dc74 (diff) |
gpu: nvgpu: Balance usage count on resume fail
If PM runtime resume fails, pm_runtime_get_sync() still increments
the usage count. Balance the usage count by decrementing it on
fail.
Bug 200003289
Change-Id: I127d2697ff2601d4884a4ecfdec8ad50894bf7d0
Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com>
Reviewed-on: http://git-master/r/411285
(cherry picked from commit 736846ff999bb9d1ca3340fc02ab49f8c65c4145)
Reviewed-on: http://git-master/r/411473
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a')
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/gk20a.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/gk20a.c b/drivers/gpu/nvgpu/gk20a/gk20a.c index f04e9187..2e406474 100644 --- a/drivers/gpu/nvgpu/gk20a/gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/gk20a.c | |||
@@ -1514,6 +1514,8 @@ int gk20a_busy(struct platform_device *pdev) | |||
1514 | 1514 | ||
1515 | #ifdef CONFIG_PM_RUNTIME | 1515 | #ifdef CONFIG_PM_RUNTIME |
1516 | ret = pm_runtime_get_sync(&pdev->dev); | 1516 | ret = pm_runtime_get_sync(&pdev->dev); |
1517 | if (ret < 0) | ||
1518 | pm_runtime_put_noidle(&pdev->dev); | ||
1517 | #endif | 1519 | #endif |
1518 | gk20a_scale_notify_busy(pdev); | 1520 | gk20a_scale_notify_busy(pdev); |
1519 | 1521 | ||