summaryrefslogtreecommitdiff
path: root/drivers/gpu/nvgpu/gk20a/platform_gk20a_tegra.c
diff options
context:
space:
mode:
authorKerwin Wan <kerwinw@nvidia.com>2014-04-01 18:57:10 +0800
committerTerje Bergstrom <tbergstrom@nvidia.com>2014-04-01 22:40:56 -0700
commit97ddd21db8e1dc479c7a5f95b14f7d23186bf690 (patch)
tree88703c0dc007ea1a27c73e4c82f630efeeb9ad9b /drivers/gpu/nvgpu/gk20a/platform_gk20a_tegra.c
parent4d0fa6f0c069d796de4b037f12b532c856742256 (diff)
gpu: nvgpu: handle error when gpu failed to unpowergate
After flash, kernel needs to reboot after first boot. During reboot, devices is going to be shutdown including i2c. But sometimes gpu driver trys to open gpu sysfs nodes and unpowergate gpu at the same time. But i2c is already shutdown. tegra_unpowergate_partition returns error in this case but gk20a_tegra_unrailgate did not report the error so the error is not handled. Return proper value in gk20a_tegra_unrailgate to avoid this. Bug 1488409 Change-Id: I3470ad44a0047ae9b06f5907162ccf51795a5e04 Signed-off-by: Kerwin Wan <kerwinw@nvidia.com> Reviewed-on: http://git-master/r/390688 Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com> GVS: Gerrit_Virtual_Submit Reviewed-by: Prashant Malani <pmalani@nvidia.com> Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a/platform_gk20a_tegra.c')
-rw-r--r--drivers/gpu/nvgpu/gk20a/platform_gk20a_tegra.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/platform_gk20a_tegra.c b/drivers/gpu/nvgpu/gk20a/platform_gk20a_tegra.c
index 35658f31c9d8..17126dc86ce8 100644
--- a/drivers/gpu/nvgpu/gk20a/platform_gk20a_tegra.c
+++ b/drivers/gpu/nvgpu/gk20a/platform_gk20a_tegra.c
@@ -354,8 +354,9 @@ static int gk20a_tegra_railgate(struct platform_device *pdev)
static int gk20a_tegra_unrailgate(struct platform_device *pdev)
{
- tegra_unpowergate_partition(TEGRA_POWERGATE_GPU);
- return 0;
+ int ret;
+ ret = tegra_unpowergate_partition(TEGRA_POWERGATE_GPU);
+ return ret;
}
struct {