]> git.baikalelectronics.ru Git - kernel.git/commit
drm/nouveau/acpi: use DSM if bridge does not support D3cold
authorPeter Wu <peter@lekensteyn.nl>
Thu, 25 Aug 2016 23:00:54 +0000 (01:00 +0200)
committerDave Airlie <airlied@redhat.com>
Wed, 31 Aug 2016 06:54:05 +0000 (16:54 +1000)
commit75fa310d285b4dde304b8bd8e939d5a16165a1a3
tree22742864be6b52c5f6a89a356d125a01e5eb03c5
parentf987612db0506b2cba4d9cae824062f861e0f3f2
drm/nouveau/acpi: use DSM if bridge does not support D3cold

Even if PR3 support is available on the bridge, it will not be used if
the PCI layer considers it unavailable (i.e. on all laptops from 2013
and 2014). Ensure that this condition is checked to allow a fallback to
the Optimus DSM for device poweroff.

Initially I wanted to call pci_d3cold_enable before checking bridge_d3
(in case the user changed d3cold_allowed), but that is such an unlikely
case and likely fragile anyway. The current patch is suggested by Mika
in http://www.spinics.net/lists/linux-pci/msg52599.html

Cc: Mika Westerberg <mika.westerberg@linux.intel.com>
Signed-off-by: Peter Wu <peter@lekensteyn.nl>
Reviewed-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
drivers/gpu/drm/nouveau/nouveau_acpi.c