diff options
Diffstat (limited to 'drivers/gpu/nvgpu/common/linux/module.c')
-rw-r--r-- | drivers/gpu/nvgpu/common/linux/module.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/drivers/gpu/nvgpu/common/linux/module.c b/drivers/gpu/nvgpu/common/linux/module.c index cebb5565..b9c9554b 100644 --- a/drivers/gpu/nvgpu/common/linux/module.c +++ b/drivers/gpu/nvgpu/common/linux/module.c | |||
@@ -960,8 +960,11 @@ static int gk20a_pm_suspend(struct device *dev) | |||
960 | int ret = 0; | 960 | int ret = 0; |
961 | int idle_usage_count = g->user_railgate_disabled ? 1 : 0; | 961 | int idle_usage_count = g->user_railgate_disabled ? 1 : 0; |
962 | 962 | ||
963 | if (!g->power_on) | 963 | if (!g->power_on) { |
964 | if (!pm_runtime_enabled(dev)) | ||
965 | gk20a_pm_railgate(dev); | ||
964 | return 0; | 966 | return 0; |
967 | } | ||
965 | 968 | ||
966 | if (nvgpu_atomic_read(&g->usage_count) > idle_usage_count) | 969 | if (nvgpu_atomic_read(&g->usage_count) > idle_usage_count) |
967 | return -EBUSY; | 970 | return -EBUSY; |
@@ -983,8 +986,11 @@ static int gk20a_pm_resume(struct device *dev) | |||
983 | struct gk20a *g = get_gk20a(dev); | 986 | struct gk20a *g = get_gk20a(dev); |
984 | int ret = 0; | 987 | int ret = 0; |
985 | 988 | ||
986 | if (!g->suspended) | 989 | if (!g->suspended) { |
990 | if (!pm_runtime_enabled(dev)) | ||
991 | gk20a_pm_unrailgate(dev); | ||
987 | return 0; | 992 | return 0; |
993 | } | ||
988 | 994 | ||
989 | ret = gk20a_pm_runtime_resume(dev); | 995 | ret = gk20a_pm_runtime_resume(dev); |
990 | 996 | ||