]> git.baikalelectronics.ru Git - kernel.git/commit
drm/nouveau/acpi: ensure matching ACPI handle and supported functions
authorPeter Wu <peter@lekensteyn.nl>
Fri, 15 Jul 2016 13:12:15 +0000 (15:12 +0200)
committerBen Skeggs <bskeggs@redhat.com>
Sat, 30 Jul 2016 08:19:29 +0000 (18:19 +1000)
commit7f0aaf25a3296a01df3bf8f467648ed671b56e19
treedad115f02e302179e8eb4be7fb87a8322fd7f858
parent49c950c9aa0771d5b72f4b1529a89b94b8527b25
drm/nouveau/acpi: ensure matching ACPI handle and supported functions

Ensure that the returned set of supported DSM functions (MUX, Optimus)
match the ACPI handle that is set in nouveau_dsm_pci_probe.

As there are no machines with a MUX function on just one PCI device and
an Optimus on another, there should not be a functional impact. This
change however makes this implicit assumption more obvious.

Convert int to bool and rename has_dsm to has_mux while at it. Let the
caller set nouveau_dsm_priv.dhandle as needed.

 v2: pass dhandle to the caller.

Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Peter Wu <peter@lekensteyn.nl>
Acked-by: Dave Airlie <airlied@redhat.com
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
drivers/gpu/drm/nouveau/nouveau_acpi.c