diff options
author | Rex Zhu <Rex.Zhu@amd.com> | 2018-02-27 05:27:54 -0500 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2018-03-05 15:38:50 -0500 |
commit | e1deba285156fb4023bb48f22068de5b60e34e15 (patch) | |
tree | 81201f45cb51579eec761529a15bd6b28d8fe420 /drivers | |
parent | 589941e1a2d65f5425c91a5859a5454df64b6982 (diff) |
drm/amd/pp: Use amdgpu acpi helper functions in powerplay
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Rex Zhu <Rex.Zhu@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/gpu/drm/amd/powerplay/hwmgr/hwmgr.c | 4 | ||||
-rw-r--r-- | drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c | 7 | ||||
-rw-r--r-- | drivers/gpu/drm/amd/powerplay/hwmgr/vega10_hwmgr.c | 1 |
3 files changed, 4 insertions, 8 deletions
diff --git a/drivers/gpu/drm/amd/powerplay/hwmgr/hwmgr.c b/drivers/gpu/drm/amd/powerplay/hwmgr/hwmgr.c index 7e1bd1144f5d..28897882607e 100644 --- a/drivers/gpu/drm/amd/powerplay/hwmgr/hwmgr.c +++ b/drivers/gpu/drm/amd/powerplay/hwmgr/hwmgr.c | |||
@@ -33,7 +33,6 @@ | |||
33 | #include "pppcielanes.h" | 33 | #include "pppcielanes.h" |
34 | #include "ppatomctrl.h" | 34 | #include "ppatomctrl.h" |
35 | #include "ppsmc.h" | 35 | #include "ppsmc.h" |
36 | #include "pp_acpi.h" | ||
37 | #include "amd_acpi.h" | 36 | #include "amd_acpi.h" |
38 | #include "pp_psm.h" | 37 | #include "pp_psm.h" |
39 | 38 | ||
@@ -895,8 +894,7 @@ void hwmgr_init_default_caps(struct pp_hwmgr *hwmgr) | |||
895 | phm_cap_set(hwmgr->platform_descriptor.platformCaps, PHM_PlatformCaps_UVDDPM); | 894 | phm_cap_set(hwmgr->platform_descriptor.platformCaps, PHM_PlatformCaps_UVDDPM); |
896 | phm_cap_set(hwmgr->platform_descriptor.platformCaps, PHM_PlatformCaps_VCEDPM); | 895 | phm_cap_set(hwmgr->platform_descriptor.platformCaps, PHM_PlatformCaps_VCEDPM); |
897 | 896 | ||
898 | if (acpi_atcs_functions_supported(hwmgr->device, ATCS_FUNCTION_PCIE_PERFORMANCE_REQUEST) && | 897 | if (amdgpu_acpi_is_pcie_performance_request_supported(hwmgr->adev)) |
899 | acpi_atcs_functions_supported(hwmgr->device, ATCS_FUNCTION_PCIE_DEVICE_READY_NOTIFICATION)) | ||
900 | phm_cap_set(hwmgr->platform_descriptor.platformCaps, PHM_PlatformCaps_PCIEPerformanceRequest); | 898 | phm_cap_set(hwmgr->platform_descriptor.platformCaps, PHM_PlatformCaps_PCIEPerformanceRequest); |
901 | 899 | ||
902 | phm_cap_set(hwmgr->platform_descriptor.platformCaps, | 900 | phm_cap_set(hwmgr->platform_descriptor.platformCaps, |
diff --git a/drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c b/drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c index cb9e2f912311..928427d04ebd 100644 --- a/drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c +++ b/drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c | |||
@@ -27,7 +27,6 @@ | |||
27 | #include <linux/slab.h> | 27 | #include <linux/slab.h> |
28 | #include <asm/div64.h> | 28 | #include <asm/div64.h> |
29 | #include <drm/amdgpu_drm.h> | 29 | #include <drm/amdgpu_drm.h> |
30 | #include "pp_acpi.h" | ||
31 | #include "ppatomctrl.h" | 30 | #include "ppatomctrl.h" |
32 | #include "atombios.h" | 31 | #include "atombios.h" |
33 | #include "pptable_v1_0.h" | 32 | #include "pptable_v1_0.h" |
@@ -3615,13 +3614,13 @@ static int smu7_request_link_speed_change_before_state_change( | |||
3615 | if (target_link_speed > current_link_speed) { | 3614 | if (target_link_speed > current_link_speed) { |
3616 | switch (target_link_speed) { | 3615 | switch (target_link_speed) { |
3617 | case PP_PCIEGen3: | 3616 | case PP_PCIEGen3: |
3618 | if (0 == acpi_pcie_perf_request(hwmgr->device, PCIE_PERF_REQ_GEN3, false)) | 3617 | if (0 == amdgpu_acpi_pcie_performance_request(hwmgr->adev, PCIE_PERF_REQ_GEN3, false)) |
3619 | break; | 3618 | break; |
3620 | data->force_pcie_gen = PP_PCIEGen2; | 3619 | data->force_pcie_gen = PP_PCIEGen2; |
3621 | if (current_link_speed == PP_PCIEGen2) | 3620 | if (current_link_speed == PP_PCIEGen2) |
3622 | break; | 3621 | break; |
3623 | case PP_PCIEGen2: | 3622 | case PP_PCIEGen2: |
3624 | if (0 == acpi_pcie_perf_request(hwmgr->device, PCIE_PERF_REQ_GEN2, false)) | 3623 | if (0 == amdgpu_acpi_pcie_performance_request(hwmgr->adev, PCIE_PERF_REQ_GEN2, false)) |
3625 | break; | 3624 | break; |
3626 | default: | 3625 | default: |
3627 | data->force_pcie_gen = smu7_get_current_pcie_speed(hwmgr); | 3626 | data->force_pcie_gen = smu7_get_current_pcie_speed(hwmgr); |
@@ -3843,7 +3842,7 @@ static int smu7_notify_link_speed_change_after_state_change( | |||
3843 | smu7_get_current_pcie_speed(hwmgr) > 0) | 3842 | smu7_get_current_pcie_speed(hwmgr) > 0) |
3844 | return 0; | 3843 | return 0; |
3845 | 3844 | ||
3846 | if (acpi_pcie_perf_request(hwmgr->device, request, false)) { | 3845 | if (amdgpu_acpi_pcie_performance_request(hwmgr->adev, request, false)) { |
3847 | if (PP_PCIEGen2 == target_link_speed) | 3846 | if (PP_PCIEGen2 == target_link_speed) |
3848 | pr_info("PSPP request to switch to Gen2 from Gen3 Failed!"); | 3847 | pr_info("PSPP request to switch to Gen2 from Gen3 Failed!"); |
3849 | else | 3848 | else |
diff --git a/drivers/gpu/drm/amd/powerplay/hwmgr/vega10_hwmgr.c b/drivers/gpu/drm/amd/powerplay/hwmgr/vega10_hwmgr.c index f5df20a22e97..a7c610a0e7e1 100644 --- a/drivers/gpu/drm/amd/powerplay/hwmgr/vega10_hwmgr.c +++ b/drivers/gpu/drm/amd/powerplay/hwmgr/vega10_hwmgr.c | |||
@@ -44,7 +44,6 @@ | |||
44 | #include "vega10_pptable.h" | 44 | #include "vega10_pptable.h" |
45 | #include "vega10_thermal.h" | 45 | #include "vega10_thermal.h" |
46 | #include "pp_debug.h" | 46 | #include "pp_debug.h" |
47 | #include "pp_acpi.h" | ||
48 | #include "amd_pcie_helpers.h" | 47 | #include "amd_pcie_helpers.h" |
49 | #include "cgs_linux.h" | 48 | #include "cgs_linux.h" |
50 | #include "ppinterrupt.h" | 49 | #include "ppinterrupt.h" |