mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-22 17:36:20 +03:00
gpu: nvgpu: reset pm status on runtime_resume fail
If an error occurs during an attempt to perform a runtime_resume, the runtime power management framework sets an error flag that prevents further attempts to resume until the error is cleared. nvgpu currently does not clear the flag, which causes nvgpu to lock up if an error occurs during runtime_resume. This change explicitly sets the device pm status to suspended on error, which clears the error flag so that subsequent attempts to resume will not be blocked. Bug 200324790 Change-Id: I3c875453670d3691ab01cff90ce31e797296662a Signed-off-by: Sunny He <suhe@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/1526478 Reviewed-by: Automatic_Commit_Validation_User GVS: Gerrit_Virtual_Submit Reviewed-by: Alex Waterman <alexw@nvidia.com> Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
This commit is contained in:
committed by
mobile promotions
parent
d59271c7b7
commit
83096af727
@@ -81,8 +81,11 @@ int gk20a_busy(struct gk20a *g)
|
|||||||
dev = dev_from_gk20a(g);
|
dev = dev_from_gk20a(g);
|
||||||
|
|
||||||
if (pm_runtime_enabled(dev)) {
|
if (pm_runtime_enabled(dev)) {
|
||||||
|
/* Increment usage count and attempt to resume device */
|
||||||
ret = pm_runtime_get_sync(dev);
|
ret = pm_runtime_get_sync(dev);
|
||||||
if (ret < 0) {
|
if (ret < 0) {
|
||||||
|
/* Mark suspended so runtime pm will retry later */
|
||||||
|
pm_runtime_set_suspended(dev);
|
||||||
pm_runtime_put_noidle(dev);
|
pm_runtime_put_noidle(dev);
|
||||||
atomic_dec(&g->usage_count);
|
atomic_dec(&g->usage_count);
|
||||||
goto fail;
|
goto fail;
|
||||||
|
|||||||
Reference in New Issue
Block a user