Commit ab62e768 authored by Stephen Rothwell's avatar Stephen Rothwell Committed by Dave Airlie

drm/radeon: protect ACPI calls with CONFIG_ACPI

Signed-off-by: default avatarStephen Rothwell <sfr@canb.auug.org.au>
Acked-by: default avatarAlex Deucher <Alexander.Deucher@amd.com>
Signed-off-by: default avatarDave Airlie <airlied@gmail.com>
parent d30645ae
...@@ -4208,6 +4208,7 @@ static void ci_request_link_speed_change_before_state_change(struct radeon_devic ...@@ -4208,6 +4208,7 @@ static void ci_request_link_speed_change_before_state_change(struct radeon_devic
pi->pspp_notify_required = false; pi->pspp_notify_required = false;
if (target_link_speed > current_link_speed) { if (target_link_speed > current_link_speed) {
switch (target_link_speed) { switch (target_link_speed) {
#ifdef CONFIG_ACPI
case RADEON_PCIE_GEN3: case RADEON_PCIE_GEN3:
if (radeon_acpi_pcie_performance_request(rdev, PCIE_PERF_REQ_PECI_GEN3, false) == 0) if (radeon_acpi_pcie_performance_request(rdev, PCIE_PERF_REQ_PECI_GEN3, false) == 0)
break; break;
...@@ -4217,6 +4218,7 @@ static void ci_request_link_speed_change_before_state_change(struct radeon_devic ...@@ -4217,6 +4218,7 @@ static void ci_request_link_speed_change_before_state_change(struct radeon_devic
case RADEON_PCIE_GEN2: case RADEON_PCIE_GEN2:
if (radeon_acpi_pcie_performance_request(rdev, PCIE_PERF_REQ_PECI_GEN2, false) == 0) if (radeon_acpi_pcie_performance_request(rdev, PCIE_PERF_REQ_PECI_GEN2, false) == 0)
break; break;
#endif
default: default:
pi->force_pcie_gen = ci_get_current_pcie_speed(rdev); pi->force_pcie_gen = ci_get_current_pcie_speed(rdev);
break; break;
...@@ -4248,7 +4250,9 @@ static void ci_notify_link_speed_change_after_state_change(struct radeon_device ...@@ -4248,7 +4250,9 @@ static void ci_notify_link_speed_change_after_state_change(struct radeon_device
(ci_get_current_pcie_speed(rdev) > 0)) (ci_get_current_pcie_speed(rdev) > 0))
return; return;
#ifdef CONFIG_ACPI
radeon_acpi_pcie_performance_request(rdev, request, false); radeon_acpi_pcie_performance_request(rdev, request, false);
#endif
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment