diff options
author | Rex Zhu <Rex.Zhu@amd.com> | 2016-07-28 05:36:35 -0400 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2016-08-08 11:32:53 -0400 |
commit | 66bc3f7f03d5457f6c65790319b636bbab53e3cd (patch) | |
tree | 0726c81b3b3f93f127d2a974f1ff0c05a7b044e6 | |
parent | af223dfaf0d93e7a0ed75bed4f69e5db198b741e (diff) |
drm/amdgpu: use modules parameter to ctrl deep sleep feature in dpm
Signed-off-by: Rex Zhu <Rex.Zhu@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu.h | 1 | ||||
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/ci_dpm.c | 5 | ||||
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/cz_dpm.c | 6 | ||||
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/kv_dpm.c | 6 |
4 files changed, 15 insertions, 3 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu.h b/drivers/gpu/drm/amd/amdgpu/amdgpu.h index e9364687cd95..389322af8a05 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu.h +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu.h | |||
@@ -91,6 +91,7 @@ extern unsigned amdgpu_pcie_lane_cap; | |||
91 | extern unsigned amdgpu_cg_mask; | 91 | extern unsigned amdgpu_cg_mask; |
92 | extern unsigned amdgpu_pg_mask; | 92 | extern unsigned amdgpu_pg_mask; |
93 | extern char *amdgpu_disable_cu; | 93 | extern char *amdgpu_disable_cu; |
94 | extern int amdgpu_sclk_deep_sleep_en; | ||
94 | 95 | ||
95 | #define AMDGPU_WAIT_IDLE_TIMEOUT_IN_MS 3000 | 96 | #define AMDGPU_WAIT_IDLE_TIMEOUT_IN_MS 3000 |
96 | #define AMDGPU_MAX_USEC_TIMEOUT 100000 /* 100 ms */ | 97 | #define AMDGPU_MAX_USEC_TIMEOUT 100000 /* 100 ms */ |
diff --git a/drivers/gpu/drm/amd/amdgpu/ci_dpm.c b/drivers/gpu/drm/amd/amdgpu/ci_dpm.c index e2f0e5d58d5c..7bd6174da476 100644 --- a/drivers/gpu/drm/amd/amdgpu/ci_dpm.c +++ b/drivers/gpu/drm/amd/amdgpu/ci_dpm.c | |||
@@ -5873,7 +5873,10 @@ static int ci_dpm_init(struct amdgpu_device *adev) | |||
5873 | pi->pcie_dpm_key_disabled = 0; | 5873 | pi->pcie_dpm_key_disabled = 0; |
5874 | pi->thermal_sclk_dpm_enabled = 0; | 5874 | pi->thermal_sclk_dpm_enabled = 0; |
5875 | 5875 | ||
5876 | pi->caps_sclk_ds = true; | 5876 | if (amdgpu_sclk_deep_sleep_en) |
5877 | pi->caps_sclk_ds = true; | ||
5878 | else | ||
5879 | pi->caps_sclk_ds = false; | ||
5877 | 5880 | ||
5878 | pi->mclk_strobe_mode_threshold = 40000; | 5881 | pi->mclk_strobe_mode_threshold = 40000; |
5879 | pi->mclk_stutter_mode_threshold = 40000; | 5882 | pi->mclk_stutter_mode_threshold = 40000; |
diff --git a/drivers/gpu/drm/amd/amdgpu/cz_dpm.c b/drivers/gpu/drm/amd/amdgpu/cz_dpm.c index bfb6b019ff2a..794c5f36ca68 100644 --- a/drivers/gpu/drm/amd/amdgpu/cz_dpm.c +++ b/drivers/gpu/drm/amd/amdgpu/cz_dpm.c | |||
@@ -435,7 +435,11 @@ static int cz_dpm_init(struct amdgpu_device *adev) | |||
435 | pi->caps_td_ramping = true; | 435 | pi->caps_td_ramping = true; |
436 | pi->caps_tcp_ramping = true; | 436 | pi->caps_tcp_ramping = true; |
437 | } | 437 | } |
438 | pi->caps_sclk_ds = true; | 438 | if (amdgpu_sclk_deep_sleep_en) |
439 | pi->caps_sclk_ds = true; | ||
440 | else | ||
441 | pi->caps_sclk_ds = false; | ||
442 | |||
439 | pi->voting_clients = 0x00c00033; | 443 | pi->voting_clients = 0x00c00033; |
440 | pi->auto_thermal_throttling_enabled = true; | 444 | pi->auto_thermal_throttling_enabled = true; |
441 | pi->bapm_enabled = false; | 445 | pi->bapm_enabled = false; |
diff --git a/drivers/gpu/drm/amd/amdgpu/kv_dpm.c b/drivers/gpu/drm/amd/amdgpu/kv_dpm.c index a845e883f5fa..f8618a3881a8 100644 --- a/drivers/gpu/drm/amd/amdgpu/kv_dpm.c +++ b/drivers/gpu/drm/amd/amdgpu/kv_dpm.c | |||
@@ -2845,7 +2845,11 @@ static int kv_dpm_init(struct amdgpu_device *adev) | |||
2845 | pi->caps_tcp_ramping = true; | 2845 | pi->caps_tcp_ramping = true; |
2846 | } | 2846 | } |
2847 | 2847 | ||
2848 | pi->caps_sclk_ds = true; | 2848 | if (amdgpu_sclk_deep_sleep_en) |
2849 | pi->caps_sclk_ds = true; | ||
2850 | else | ||
2851 | pi->caps_sclk_ds = false; | ||
2852 | |||
2849 | pi->enable_auto_thermal_throttling = true; | 2853 | pi->enable_auto_thermal_throttling = true; |
2850 | pi->disable_nb_ps3_in_battery = false; | 2854 | pi->disable_nb_ps3_in_battery = false; |
2851 | if (amdgpu_bapm == 0) | 2855 | if (amdgpu_bapm == 0) |