mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-24 02:22:34 +03:00
gpu: nvgpu: handle pm_prepare_poweroff failure
As part of gk20a_pm_prepare_poweroff, gpu hw state is destroyed even in case of any errors. So try to recover from that situation by calling gk20a_pm_finalize_poweron. Bug 200380708 Change-Id: Ibff656cda67241ad111fd22701e05871f20d6f70 Signed-off-by: seshendra Gadagottu <sgadagottu@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/1653750 Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
committed by
mobile promotions
parent
cb54d7ca8f
commit
244a124ce2
@@ -928,23 +928,25 @@ fail:
|
||||
static int gk20a_pm_runtime_suspend(struct device *dev)
|
||||
{
|
||||
int err = 0;
|
||||
struct gk20a *g = get_gk20a(dev);
|
||||
|
||||
if (gk20a_gpu_is_virtual(dev))
|
||||
err = vgpu_pm_prepare_poweroff(dev);
|
||||
else
|
||||
err = gk20a_pm_prepare_poweroff(dev);
|
||||
if (err)
|
||||
if (err) {
|
||||
nvgpu_err(g, "failed to power off, err=%d", err);
|
||||
goto fail;
|
||||
}
|
||||
|
||||
err = gk20a_pm_railgate(dev);
|
||||
if (err)
|
||||
goto fail_railgate;
|
||||
goto fail;
|
||||
|
||||
return 0;
|
||||
|
||||
fail_railgate:
|
||||
gk20a_pm_finalize_poweron(dev);
|
||||
fail:
|
||||
gk20a_pm_finalize_poweron(dev);
|
||||
pm_runtime_mark_last_busy(dev);
|
||||
return err;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user