Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 250573
b: refs/heads/master
c: 8116188
h: refs/heads/master
i:
  250571: 9aa4082
v: v3
  • Loading branch information
Dave Airlie committed May 4, 2011
1 parent d136a43 commit a3d8472
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 99b38b4acc0d7dbbab443273577cff60080fcfad
refs/heads/master: 8116188fdef5946bcbb2d73e41d7412a57ffb034
1 change: 1 addition & 0 deletions trunk/drivers/gpu/drm/nouveau/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ config DRM_NOUVEAU
select FRAMEBUFFER_CONSOLE if !EXPERT
select FB_BACKLIGHT if DRM_NOUVEAU_BACKLIGHT
select ACPI_VIDEO if ACPI && X86 && BACKLIGHT_CLASS_DEVICE && VIDEO_OUTPUT_CONTROL && INPUT
select MXM_WMI if ACPI
help
Choose this option for open-source nVidia support.

Expand Down
11 changes: 11 additions & 0 deletions trunk/drivers/gpu/drm/nouveau/nouveau_acpi.c
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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);
}

Expand Down Expand Up @@ -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++;
Expand Down

0 comments on commit a3d8472

Please sign in to comment.