Skip to content

Commit

Permalink
drm/radeon: protect ACPI calls with CONFIG_ACPI
Browse files Browse the repository at this point in the history
Signed-off-by: Stephen Rothwell <[email protected]>
Acked-by: Alex Deucher <[email protected]>
Signed-off-by: Dave Airlie <[email protected]>
  • Loading branch information
sfrothwell authored and airlied committed Sep 4, 2013
1 parent d30645a commit ab62e76
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions drivers/gpu/drm/radeon/ci_dpm.c
Original file line number Diff line number Diff line change
Expand Up @@ -4208,6 +4208,7 @@ static void ci_request_link_speed_change_before_state_change(struct radeon_devic
pi->pspp_notify_required = false;
if (target_link_speed > current_link_speed) {
switch (target_link_speed) {
#ifdef CONFIG_ACPI
case RADEON_PCIE_GEN3:
if (radeon_acpi_pcie_performance_request(rdev, PCIE_PERF_REQ_PECI_GEN3, false) == 0)
break;
Expand All @@ -4217,6 +4218,7 @@ static void ci_request_link_speed_change_before_state_change(struct radeon_devic
case RADEON_PCIE_GEN2:
if (radeon_acpi_pcie_performance_request(rdev, PCIE_PERF_REQ_PECI_GEN2, false) == 0)
break;
#endif
default:
pi->force_pcie_gen = ci_get_current_pcie_speed(rdev);
break;
Expand Down Expand Up @@ -4248,7 +4250,9 @@ static void ci_notify_link_speed_change_after_state_change(struct radeon_device
(ci_get_current_pcie_speed(rdev) > 0))
return;

#ifdef CONFIG_ACPI
radeon_acpi_pcie_performance_request(rdev, request, false);
#endif
}
}

Expand Down

0 comments on commit ab62e76

Please sign in to comment.