Message ID | 1459381919-3097-1-git-send-email-kamal@canonical.com |
---|---|
State | New |
Headers | show |
On 31.03.2016 08:51, Kamal Mostafa wrote: > This is a note to let you know that I have just added a patch titled > > drm/radeon: disable runtime pm on PX laptops without dGPU power control > > to the linux-4.2.y-queue branch of the 4.2.y-ckt extended stable tree > which can be found at: > > http://kernel.ubuntu.com/git/ubuntu/linux.git/log/?h=linux-4.2.y-queue > > This patch is scheduled to be released in version 4.2.8-ckt7. > > If you, or anyone else, feels it should not be added to this tree, please > reply to this email. A regression was bisected to this commit: https://bugzilla.kernel.org/show_bug.cgi?id=115321 So it's probably better to hold off on backporting this commit (and possibly the corresponding amdgpu commit as well).
On Thu, Mar 31, 2016 at 10:21:48AM +0900, Michel Dänzer wrote: > On 31.03.2016 08:51, Kamal Mostafa wrote: > > This is a note to let you know that I have just added a patch titled > > > > drm/radeon: disable runtime pm on PX laptops without dGPU power control > > > > to the linux-4.2.y-queue branch of the 4.2.y-ckt extended stable tree > > which can be found at: > > > > http://kernel.ubuntu.com/git/ubuntu/linux.git/log/?h=linux-4.2.y-queue > > > > This patch is scheduled to be released in version 4.2.8-ckt7. > > > > If you, or anyone else, feels it should not be added to this tree, please > > reply to this email. > > A regression was bisected to this commit: > > https://bugzilla.kernel.org/show_bug.cgi?id=115321 > > So it's probably better to hold off on backporting this commit (and > possibly the corresponding amdgpu commit as well). Okay, dropped from the 4.2-stable queue: e64c952 drm/radeon: disable runtime pm on PX laptops without dGPU power control bedf2a6 drm/amdgpu: disable runtime pm on PX laptops without dGPU power control Thanks for the heads-up, Michel! -Kamal
diff --git a/drivers/gpu/drm/radeon/radeon_atpx_handler.c b/drivers/gpu/drm/radeon/radeon_atpx_handler.c index 8bc7d0b..1523cf9 100644 --- a/drivers/gpu/drm/radeon/radeon_atpx_handler.c +++ b/drivers/gpu/drm/radeon/radeon_atpx_handler.c @@ -62,6 +62,10 @@ bool radeon_has_atpx(void) { return radeon_atpx_priv.atpx_detected; } +bool radeon_has_atpx_dgpu_power_cntl(void) { + return radeon_atpx_priv.atpx.functions.power_cntl; +} + /** * radeon_atpx_call - call an ATPX method * @@ -141,10 +145,6 @@ static void radeon_atpx_parse_functions(struct radeon_atpx_functions *f, u32 mas */ static int radeon_atpx_validate(struct radeon_atpx *atpx) { - /* make sure required functions are enabled */ - /* dGPU power control is required */ - atpx->functions.power_cntl = true; - if (atpx->functions.px_params) { union acpi_object *info; struct atpx_px_params output; diff --git a/drivers/gpu/drm/radeon/radeon_device.c b/drivers/gpu/drm/radeon/radeon_device.c index d8319da..94d3d3b 100644 --- a/drivers/gpu/drm/radeon/radeon_device.c +++ b/drivers/gpu/drm/radeon/radeon_device.c @@ -103,6 +103,12 @@ static const char radeon_family_name[][16] = { "LAST", }; +#if defined(CONFIG_VGA_SWITCHEROO) +bool radeon_has_atpx_dgpu_power_cntl(void); +#else +static inline bool radeon_has_atpx_dgpu_power_cntl(void) { return false; } +#endif + #define RADEON_PX_QUIRK_DISABLE_PX (1 << 0) #define RADEON_PX_QUIRK_LONG_WAKEUP (1 << 1) @@ -1433,7 +1439,7 @@ int radeon_device_init(struct radeon_device *rdev, * ignore it */ vga_client_register(rdev->pdev, rdev, NULL, radeon_vga_set_decode); - if (rdev->flags & RADEON_IS_PX) + if ((rdev->flags & RADEON_IS_PX) && radeon_has_atpx_dgpu_power_cntl()) runtime = true; vga_switcheroo_register_client(rdev->pdev, &radeon_switcheroo_ops, runtime); if (runtime)