Skip to contentSkip to conversation

drm/amd/pp: Add #ifdef checks for CONFIG_ACPI

PATCH In review Rex Zhu 2 participants 2 messages Mar 6, 2018 1 message not in the archive

Subsystems (2)
lore
Share & tools
lore

Rex Zhu

author
#0 lore raw

PATCH 1/1 drm/amd/pp: Add #ifdef checks for CONFIG_ACPI

Fix compiling error when CONFIG_ACPI not enabled.

Change-Id I20d3f55bbd2ad68e65363cde7452802b063643f0
---
 drivers/gpu/drm/amd/powerplay/hwmgr/hwmgr.c      | 2 ++
 drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c | 2 ++
 2 files changed, 4 insertions(+)
drivers/gpu/drm/amd/powerplay/hwmgr/hwmgr.c +2 -0
index 8a37c80..aa83114 100644
@@ -902,8 +902,10 @@ void hwmgr_init_default_caps(struct pp_hwmgr *hwmgr)
 	phm_cap_set(hwmgr->platform_descriptor.platformCaps, PHM_PlatformCaps_UVDDPM);
 	phm_cap_set(hwmgr->platform_descriptor.platformCaps, PHM_PlatformCaps_VCEDPM);
 
+#if defined(CONFIG_ACPI)
 	if (amdgpu_acpi_is_pcie_performance_request_supported(hwmgr->adev))
 		phm_cap_set(hwmgr->platform_descriptor.platformCaps, PHM_PlatformCaps_PCIEPerformanceRequest);
+#endif
 
 	phm_cap_set(hwmgr->platform_descriptor.platformCaps,
 		PHM_PlatformCaps_DynamicPatchPowerState);
drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c +2 -0
index 62ebe15..4f26014 100644
@@ -3596,6 +3596,7 @@ static int smu7_request_link_speed_change_before_state_change(
 
 	if (target_link_speed > current_link_speed) {
 		switch (target_link_speed) {
+#ifdef CONFIG_ACPI
 		case PP_PCIEGen3:
 			if (0 == amdgpu_acpi_pcie_performance_request(hwmgr->adev, PCIE_PERF_REQ_GEN3, false))
 				break;
@@ -3605,6 +3606,7 @@ static int smu7_request_link_speed_change_before_state_change(
 		case PP_PCIEGen2:
 			if (0 == amdgpu_acpi_pcie_performance_request(hwmgr->adev, PCIE_PERF_REQ_GEN2, false))
 				break;
+#endif
 		default:
 			data->force_pcie_gen = smu7_get_current_pcie_speed(hwmgr);
 			break;
Signature · 6 lines
1.9.1

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

A message that is not in the archive (sent off-list or not yet received): 1520318844-31378-1-git-send-email-Rex.Zhu-5C7GfCeVMHo@public.gmane.org

Reviewed-by
#2 lore raw

________________________________
From: amd-gfx <amd-gfx-bounces-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org> on behalf of Rex Zhu <[email protected]>
Sent: Tuesday, March 6, 2018 1:47:24 AM
To: [email protected]
Cc: Zhu, Rex
Subject: [PATCH] drm/amd/pp: Add #ifdef checks for CONFIG_ACPI

Fix compiling error when CONFIG_ACPI not enabled.

Change-Id I20d3f55bbd2ad68e65363cde7452802b063643f0
---
 drivers/gpu/drm/amd/powerplay/hwmgr/hwmgr.c      | 2 ++
 drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c | 2 ++
 2 files changed, 4 insertions(+)
drivers/gpu/drm/amd/powerplay/hwmgr/hwmgr.c +2 -0
index 8a37c80..aa83114 100644
@@ -902,8 +902,10 @@ void hwmgr_init_default_caps(struct pp_hwmgr *hwmgr)
         phm_cap_set(hwmgr->platform_descriptor.platformCaps, PHM_PlatformCaps_UVDDPM);
         phm_cap_set(hwmgr->platform_descriptor.platformCaps, PHM_PlatformCaps_VCEDPM);
 
+#if defined(CONFIG_ACPI)
         if (amdgpu_acpi_is_pcie_performance_request_supported(hwmgr->adev))
                 phm_cap_set(hwmgr->platform_descriptor.platformCaps, PHM_PlatformCaps_PCIEPerformanceRequest);
+#endif
 
         phm_cap_set(hwmgr->platform_descriptor.platformCaps,
                 PHM_PlatformCaps_DynamicPatchPowerState);
drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c +2 -0
index 62ebe15..4f26014 100644
@@ -3596,6 +3596,7 @@ static int smu7_request_link_speed_change_before_state_change(
 
         if (target_link_speed > current_link_speed) {
                 switch (target_link_speed) {
+#ifdef CONFIG_ACPI
                 case PP_PCIEGen3:
                         if (0 == amdgpu_acpi_pcie_performance_request(hwmgr->adev, PCIE_PERF_REQ_GEN3, false))
                                 break;
@@ -3605,6 +3606,7 @@ static int smu7_request_link_speed_change_before_state_change(
                 case PP_PCIEGen2:
                         if (0 == amdgpu_acpi_pcie_performance_request(hwmgr->adev, PCIE_PERF_REQ_GEN2, false))
                                 break;
+#endif
                 default:
                         data->force_pcie_gen = smu7_get_current_pcie_speed(hwmgr);
                         break;

--
1.9.1

_______________________________________________
amd-gfx mailing list [email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx