summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/nouveau/nouveau_acpi.c
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2010-12-06 12:57:45 +1000
committerDave Airlie <airlied@redhat.com>2011-05-04 13:38:46 +1000
commit8116188fdef5946bcbb2d73e41d7412a57ffb034 (patch)
treee2ef4a120cc581ff92e5f63d868b7c050e98fada /drivers/gpu/drm/nouveau/nouveau_acpi.c
parent99b38b4acc0d7dbbab443273577cff60080fcfad (diff)
downloadop-kernel-dev-8116188fdef5946bcbb2d73e41d7412a57ffb034.zip
op-kernel-dev-8116188fdef5946bcbb2d73e41d7412a57ffb034.tar.gz
nouveau/acpi: hook up to the MXM method for mux switching.
this hooks up nouveau to the MXM mux switching method. With this in place I can switch the LVDS MUX on my T410s, I expect we need a bit more work for other laptops. Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/nouveau/nouveau_acpi.c')
-rw-r--r--drivers/gpu/drm/nouveau/nouveau_acpi.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/drivers/gpu/drm/nouveau/nouveau_acpi.c b/drivers/gpu/drm/nouveau/nouveau_acpi.c
index a542380..1aa33d9 100644
--- a/drivers/gpu/drm/nouveau/nouveau_acpi.c
+++ b/drivers/gpu/drm/nouveau/nouveau_acpi.c
@@ -4,6 +4,8 @@
#include <acpi/acpi_drivers.h>
#include <acpi/acpi_bus.h>
#include <acpi/video.h>
+#include <acpi/acpi.h>
+#include <linux/mxm-wmi.h>
#include "drmP.h"
#include "drm.h"
@@ -92,6 +94,7 @@ static int nouveau_dsm(acpi_handle handle, int func, int arg, uint32_t *result)
static int nouveau_dsm_switch_mux(acpi_handle handle, int mux_id)
{
+ mxm_wmi_call_mxds(mux_id == NOUVEAU_DSM_LED_STAMINA ? MXM_MXDS_ADAPTER_IGD : MXM_MXDS_ADAPTER_0);
return nouveau_dsm(handle, NOUVEAU_DSM_LED, mux_id, NULL);
}
@@ -180,6 +183,14 @@ static bool nouveau_dsm_detect(void)
struct pci_dev *pdev = NULL;
int has_dsm = 0;
int vga_count = 0;
+ bool guid_valid;
+
+ /* lookup the GUID */
+ guid_valid = mxm_wmi_supported();
+ if (!guid_valid)
+ return false;
+
+ printk("MXM GUID detected in BIOS\n");
while ((pdev = pci_get_class(PCI_CLASS_DISPLAY_VGA << 8, pdev)) != NULL) {
vga_count++;
OpenPOWER on IntegriCloud