summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/include/nvgpu
diff options
context:
space:
mode:
authorseshendra Gadagottu <sgadagottu@nvidia.com>2018-03-20 15:28:04 -0400
committerTejal Kudav <tkudav@nvidia.com>2018-06-14 09:44:06 -0400
commit40cefb666f3767059383052346d4c0faa9195a48 (patch)
tree36c848f78eabae4117ca2c7acc01da6f9479dd3c /drivers/gpu/nvgpu/include/nvgpu
parent054546525571dde1117376176f00511f13168f07 (diff)
gpu: nvgpu: gpu railgate handling with runtime pm
Earlier implementation of railgate disable config is disabling runtime pm during pm_init. This is causing multiple issues: 1. gpu rail will be on as soon as nvgpu driver probe is called. Actual gpu hw init may happen at much later point of time. 2. This is breaking railgate_enable sysfs node functionality. railgate_enable is not working if runtime pm is disabled. To avoid all these issues for railgate disable, enable runtime pm during pm_init and set auto-suspend delay to negative (-1), which will disable runtime pm suspend calls. Also fixed following issues along with this: 1. Updated railgate_enable debugfs implementation to use auto-suspend delay. To disable railgating: Set auto-suspend delay with negative value(-1) which will disable runtime pm suspend. To enable railgating: Set auto-suspend delay with railgate_delay value. Also removed redundant user_railgate_disabled gk20a device data and replaced with can_railgate, where ever it is applicable. 2. Initialized default railgate_delay to 500msec to avoid railgate on/off transitions with railigate enable from disabled state. 3. Created railgate_residency debug fs node irrespective of can_railgate initial state. This is helping with the case, where initial state of railgate state off and then railgate enable is done through sysfs node. Bug 2073029 Change-Id: I531da6d93ba8907e806f65a1de2a447c1ec2665c Signed-off-by: seshendra Gadagottu <sgadagottu@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/1694944 Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/include/nvgpu')
-rw-r--r--drivers/gpu/nvgpu/include/nvgpu/defaults.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/gpu/nvgpu/include/nvgpu/defaults.h b/drivers/gpu/nvgpu/include/nvgpu/defaults.h
index 2d7a42b1..cae380a7 100644
--- a/drivers/gpu/nvgpu/include/nvgpu/defaults.h
+++ b/drivers/gpu/nvgpu/include/nvgpu/defaults.h
@@ -1,5 +1,5 @@
1/* 1/*
2 * Copyright (c) 2017, NVIDIA CORPORATION. All rights reserved. 2 * Copyright (c) 2017-2018, NVIDIA CORPORATION. All rights reserved.
3 * 3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a 4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"), 5 * copy of this software and associated documentation files (the "Software"),
@@ -28,4 +28,6 @@
28 */ 28 */
29#define NVGPU_DEFAULT_GR_IDLE_TIMEOUT 3000 29#define NVGPU_DEFAULT_GR_IDLE_TIMEOUT 3000
30 30
31#define NVGPU_DEFAULT_RAILGATE_IDLE_TIMEOUT 500
32
31#endif 33#endif