drm/radeon: don't allow runpm=1 on systems with out ATPX

vgaswitcheroo and the ATPX ACPI methods are required to
power down the dGPU.

bug:
https://bugzilla.kernel.org/show_bug.cgi?id=73901

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Cc: stable@vger.kernel.org
This commit is contained in:
Alex Deucher 2014-04-15 12:44:35 -04:00 committed by Christian König
parent e9a4099a59
commit 73acacc739
1 changed files with 3 additions and 5 deletions

View File

@ -107,11 +107,9 @@ int radeon_driver_load_kms(struct drm_device *dev, unsigned long flags)
flags |= RADEON_IS_PCI;
}
if (radeon_runtime_pm == 1)
flags |= RADEON_IS_PX;
else if ((radeon_runtime_pm == -1) &&
radeon_has_atpx() &&
((flags & RADEON_IS_IGP) == 0))
if ((radeon_runtime_pm != 0) &&
radeon_has_atpx() &&
((flags & RADEON_IS_IGP) == 0))
flags |= RADEON_IS_PX;
/* radeon_device_init should report only fatal error