diff options
Diffstat (limited to 'drivers/gpu')
-rw-r--r-- | drivers/gpu/nvgpu/common/linux/module.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/drivers/gpu/nvgpu/common/linux/module.c b/drivers/gpu/nvgpu/common/linux/module.c index 814f2fc9..67dfeff3 100644 --- a/drivers/gpu/nvgpu/common/linux/module.c +++ b/drivers/gpu/nvgpu/common/linux/module.c | |||
@@ -928,23 +928,25 @@ fail: | |||
928 | static int gk20a_pm_runtime_suspend(struct device *dev) | 928 | static int gk20a_pm_runtime_suspend(struct device *dev) |
929 | { | 929 | { |
930 | int err = 0; | 930 | int err = 0; |
931 | struct gk20a *g = get_gk20a(dev); | ||
931 | 932 | ||
932 | if (gk20a_gpu_is_virtual(dev)) | 933 | if (gk20a_gpu_is_virtual(dev)) |
933 | err = vgpu_pm_prepare_poweroff(dev); | 934 | err = vgpu_pm_prepare_poweroff(dev); |
934 | else | 935 | else |
935 | err = gk20a_pm_prepare_poweroff(dev); | 936 | err = gk20a_pm_prepare_poweroff(dev); |
936 | if (err) | 937 | if (err) { |
938 | nvgpu_err(g, "failed to power off, err=%d", err); | ||
937 | goto fail; | 939 | goto fail; |
940 | } | ||
938 | 941 | ||
939 | err = gk20a_pm_railgate(dev); | 942 | err = gk20a_pm_railgate(dev); |
940 | if (err) | 943 | if (err) |
941 | goto fail_railgate; | 944 | goto fail; |
942 | 945 | ||
943 | return 0; | 946 | return 0; |
944 | 947 | ||
945 | fail_railgate: | ||
946 | gk20a_pm_finalize_poweron(dev); | ||
947 | fail: | 948 | fail: |
949 | gk20a_pm_finalize_poweron(dev); | ||
948 | pm_runtime_mark_last_busy(dev); | 950 | pm_runtime_mark_last_busy(dev); |
949 | return err; | 951 | return err; |
950 | } | 952 | } |