aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlex Deucher <alexander.deucher@amd.com>2016-04-18 11:19:19 -0400
committerAlex Deucher <alexander.deucher@amd.com>2016-04-18 11:23:10 -0400
commitbfaddd9fc8ac048b99475f000dbef6f08297417f (patch)
tree0b538d503ae3675bb742c2f84d7fac80df3d2bce
parent8f99455587855a5f79af08e40327ca40ab5f1999 (diff)
Revert "drm/radeon: disable runtime pm on PX laptops without dGPU power control"
This reverts commit e64c952efb8e0c15ae82cec8e455ab4910690ef1. ATPX is the ACPI method for controlling AMD PowerXpress laptops. There are flags to indicate which methods are supported. If the dGPU power down flag is not supported, the driver needs to implement the dGPU power down manually. We had previously always forced the driver to assume the ATPX dGPU power down was present, but this causes problems on boards where it is not, leading to GPU hangs when attempting to power down the dGPU. Manual dGPU power down is not currently supported in the Linux driver. Some laptops indicate that the ATPX dGPU power down method is not present, but it actually apparently is. I'm not sure if this is a bios bug and it should be set or if there is a reason it was unset and the method should not be used. This is not an issue on other OSes since both the ATPX and the manual driver power down methods are supported. This is apparently fairly widespread, so just revert for now. bugs: https://bugzilla.kernel.org/show_bug.cgi?id=115321 https://bugzilla.kernel.org/show_bug.cgi?id=116581 https://bugzilla.kernel.org/show_bug.cgi?id=116251 Cc: stable@vger.kernel.org
-rw-r--r--drivers/gpu/drm/radeon/radeon_atpx_handler.c8
-rw-r--r--drivers/gpu/drm/radeon/radeon_device.c8
2 files changed, 5 insertions, 11 deletions
diff --git a/drivers/gpu/drm/radeon/radeon_atpx_handler.c b/drivers/gpu/drm/radeon/radeon_atpx_handler.c
index fd8c4d317e60..56482e35d43e 100644
--- a/drivers/gpu/drm/radeon/radeon_atpx_handler.c
+++ b/drivers/gpu/drm/radeon/radeon_atpx_handler.c
@@ -62,10 +62,6 @@ bool radeon_has_atpx(void) {
62 return radeon_atpx_priv.atpx_detected; 62 return radeon_atpx_priv.atpx_detected;
63} 63}
64 64
65bool radeon_has_atpx_dgpu_power_cntl(void) {
66 return radeon_atpx_priv.atpx.functions.power_cntl;
67}
68
69/** 65/**
70 * radeon_atpx_call - call an ATPX method 66 * radeon_atpx_call - call an ATPX method
71 * 67 *
@@ -145,6 +141,10 @@ static void radeon_atpx_parse_functions(struct radeon_atpx_functions *f, u32 mas
145 */ 141 */
146static int radeon_atpx_validate(struct radeon_atpx *atpx) 142static int radeon_atpx_validate(struct radeon_atpx *atpx)
147{ 143{
144 /* make sure required functions are enabled */
145 /* dGPU power control is required */
146 atpx->functions.power_cntl = true;
147
148 if (atpx->functions.px_params) { 148 if (atpx->functions.px_params) {
149 union acpi_object *info; 149 union acpi_object *info;
150 struct atpx_px_params output; 150 struct atpx_px_params output;
diff --git a/drivers/gpu/drm/radeon/radeon_device.c b/drivers/gpu/drm/radeon/radeon_device.c
index 193261fee6e1..d0826fb0434c 100644
--- a/drivers/gpu/drm/radeon/radeon_device.c
+++ b/drivers/gpu/drm/radeon/radeon_device.c
@@ -103,12 +103,6 @@ static const char radeon_family_name[][16] = {
103 "LAST", 103 "LAST",
104}; 104};
105 105
106#if defined(CONFIG_VGA_SWITCHEROO)
107bool radeon_has_atpx_dgpu_power_cntl(void);
108#else
109static inline bool radeon_has_atpx_dgpu_power_cntl(void) { return false; }
110#endif
111
112#define RADEON_PX_QUIRK_DISABLE_PX (1 << 0) 106#define RADEON_PX_QUIRK_DISABLE_PX (1 << 0)
113#define RADEON_PX_QUIRK_LONG_WAKEUP (1 << 1) 107#define RADEON_PX_QUIRK_LONG_WAKEUP (1 << 1)
114 108
@@ -1439,7 +1433,7 @@ int radeon_device_init(struct radeon_device *rdev,
1439 * ignore it */ 1433 * ignore it */
1440 vga_client_register(rdev->pdev, rdev, NULL, radeon_vga_set_decode); 1434 vga_client_register(rdev->pdev, rdev, NULL, radeon_vga_set_decode);
1441 1435
1442 if ((rdev->flags & RADEON_IS_PX) && radeon_has_atpx_dgpu_power_cntl()) 1436 if (rdev->flags & RADEON_IS_PX)
1443 runtime = true; 1437 runtime = true;
1444 vga_switcheroo_register_client(rdev->pdev, &radeon_switcheroo_ops, runtime); 1438 vga_switcheroo_register_client(rdev->pdev, &radeon_switcheroo_ops, runtime);
1445 if (runtime) 1439 if (runtime)