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
This commit is contained in:
Terje Bergstrom
2014-05-19 09:17:05 +03:00
committed by Dan Willemsen
parent effa9dcfaa
commit 88ca9b50f6

View File

@@ -1514,6 +1514,8 @@ int gk20a_busy(struct platform_device *pdev)
#ifdef CONFIG_PM_RUNTIME #ifdef CONFIG_PM_RUNTIME
ret = pm_runtime_get_sync(&pdev->dev); ret = pm_runtime_get_sync(&pdev->dev);
if (ret < 0)
pm_runtime_put_noidle(&pdev->dev);
#endif #endif
gk20a_scale_notify_busy(pdev); gk20a_scale_notify_busy(pdev);