xf86-video-nouveau: enable backlight toggling for Dell Inspiron 8200 GeForce2 Go master
authorGiuseppe Bilotta <giuseppe.bilotta@gmail.com>
Wed, 26 Sep 2007 23:27:20 +0000 (01:27 +0200)
committerGiuseppe Bilotta <giuseppe.bilotta@gmail.com>
Sat, 15 Nov 2008 16:48:20 +0000 (17:48 +0100)
GeForce2 Go and similar cards are explicitly excluded from the
NVBacklightEnable() code (purposedly, as the code used for the other
chipsets on x86 has no effect.) This causes the backlight to remain
active on laptops equipped with such a card, even when DPMS modes were
active.

Fix the issue for Dell Inspiron 8200 by introducing the proper
registry writes to toggle the backlight.

Signed-off-by: Giuseppe Bilotta <giuseppe.bilotta@gmail.com>
src/nv_driver.c

index a169e46..782624e 100644 (file)
@@ -1843,8 +1843,16 @@ static void NVBacklightEnable(NVPtr pNv,  Bool on)
 #endif
     
     if(pNv->LVDS) {
-       if(pNv->twoHeads && ((pNv->Chipset & 0x0ff0) != CHIPSET_NV11)) {
-           nvWriteMC(pNv, 0x130C, on ? 3 : 7);
+       if(pNv->twoHeads) {
+           if ((pNv->Chipset & 0x0ff0) != CHIPSET_NV11) {
+               nvWriteMC(pNv, 0x130C, on ? 3 : 7);
+           } else if((PCI_DEV_SUBVENDOR_ID(pNv->PciInfo) == 0x1028) && (PCI_DEV_SUBDEVICE_ID(pNv->PciInfo) == 0xd4)) {
+               // Dell Inspiron 8200, GeForce2 Go
+               CARD32 tmp_pcrt;
+               tmp_pcrt = nvReadCRTC0(pNv, NV_PCRTC_GPIO_EXT) & 0xFFFFFFFC;
+               if(on) tmp_pcrt |= 0x1;
+               nvWriteCRTC0(pNv, NV_PCRTC_GPIO_EXT, tmp_pcrt);
+           }
        }
     } else {
        CARD32 fpcontrol;