diff options
author | seshendra Gadagottu <sgadagottu@nvidia.com> | 2018-01-17 17:47:02 -0500 |
---|---|---|
committer | mobile promotions <svcmobile_promotions@nvidia.com> | 2018-01-18 21:10:08 -0500 |
commit | ea9cb56cf617f7fb4aa79a520f4ff5db2723152d (patch) | |
tree | 921f1f66ba7f19183b3b596295d095bca5302df5 /drivers/gpu/nvgpu/common/linux | |
parent | 872be3a4ac16f4d139a9597b3fdae4355cb4baf2 (diff) |
gpu: nvgpu: railgate platform only if it is not railgated
Avoid railgating platform, if it is already in railgated state.
This is right thing to do and it also avoids ref counting issues
related to fuse clock disable.
Bug 200381275
Change-Id: Id745f9b878be129bf9b0cc972fadcfc102c8ddc2
Signed-off-by: seshendra Gadagottu <sgadagottu@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1640548
Reviewed-by: Seema Khowala <seemaj@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/common/linux')
-rw-r--r-- | drivers/gpu/nvgpu/common/linux/module.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/gpu/nvgpu/common/linux/module.c b/drivers/gpu/nvgpu/common/linux/module.c index b95bac0b..2e288ce2 100644 --- a/drivers/gpu/nvgpu/common/linux/module.c +++ b/drivers/gpu/nvgpu/common/linux/module.c | |||
@@ -1,7 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * GK20A Graphics | 2 | * GK20A Graphics |
3 | * | 3 | * |
4 | * Copyright (c) 2011-2017, NVIDIA CORPORATION. All rights reserved. | 4 | * Copyright (c) 2011-2018, NVIDIA CORPORATION. All rights reserved. |
5 | * | 5 | * |
6 | * This program is free software; you can redistribute it and/or modify it | 6 | * This program is free software; you can redistribute it and/or modify it |
7 | * under the terms and conditions of the GNU General Public License, | 7 | * under the terms and conditions of the GNU General Public License, |
@@ -736,6 +736,11 @@ static int gk20a_pm_railgate(struct device *dev) | |||
736 | struct gk20a_platform *platform = dev_get_drvdata(dev); | 736 | struct gk20a_platform *platform = dev_get_drvdata(dev); |
737 | int ret = 0; | 737 | int ret = 0; |
738 | struct gk20a *g = get_gk20a(dev); | 738 | struct gk20a *g = get_gk20a(dev); |
739 | |||
740 | /* if platform is already railgated, then just return */ | ||
741 | if (platform->is_railgated && platform->is_railgated(dev)) | ||
742 | return ret; | ||
743 | |||
739 | #ifdef CONFIG_DEBUG_FS | 744 | #ifdef CONFIG_DEBUG_FS |
740 | g->pstats.last_rail_gate_start = jiffies; | 745 | g->pstats.last_rail_gate_start = jiffies; |
741 | 746 | ||