]> git.baikalelectronics.ru Git - kernel.git/commit
drm/nouveau/acpi: fix check for power resources support
authorPeter Wu <peter@lekensteyn.nl>
Mon, 31 Oct 2016 22:48:22 +0000 (23:48 +0100)
committerDave Airlie <airlied@redhat.com>
Tue, 1 Nov 2016 04:52:03 +0000 (14:52 +1000)
commit37c79b17a109591760702eab1a154d05c33b0c7a
tree9c3a24d7cb22960b954522b7487b881260344d81
parentca50ffb2df288415af52c8b54fef00b8436bcd03
drm/nouveau/acpi: fix check for power resources support

Check whether the kernel really supports power resources for a device,
otherwise the power might not be removed when the device is runtime
suspended (DSM should still work in these cases where PR does not).

This is a workaround for a problem where ACPICA and Windows 10 differ in
behavior. ACPICA does not correctly enumerate power resources within a
conditional block (due to delayed execution of such blocks) and as a
result power_resources is set to false even if _PR3 exists.

Fixes: 62ee86db5cb1 ("drm/nouveau/acpi: fix lockup with PCIe runtime PM")
Link: https://bugs.freedesktop.org/show_bug.cgi?id=98398
Reported-and-tested-by: Rick Kerkhof <rick.2889@gmail.com>
Reviewed-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Cc: stable@vger.kernel.org # v4.8+
Signed-off-by: Peter Wu <peter@lekensteyn.nl>
Signed-off-by: Dave Airlie <airlied@redhat.com>
drivers/gpu/drm/nouveau/nouveau_acpi.c