xf86-video-nv: 2 commits - src/nv_const.h src/nv_driver.c

Aaron Plattner aplattner at kemper.freedesktop.org
Fri Jan 25 13:06:40 PST 2008


 src/nv_const.h  |    4 ++++
 src/nv_driver.c |   13 +++++++++++--
 2 files changed, 15 insertions(+), 2 deletions(-)

New commits:
commit e844f10c7b5e41330f2bcb884ab448641dd5bb06
Author: Giuseppe Bilotta <giuseppe.bilotta at gmail.com>
Date:   Thu Sep 27 00:22:04 2007 +0200

    [PATCH] Enable backlight toggling for Dell Inspiron 8200 GeForce2 Go
    
    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 at gmail.com>
    Signed-off-by: Aaron Plattner <aplattner at nvidia.com>

diff --git a/src/nv_driver.c b/src/nv_driver.c
index fa6259d..d4e0be5 100644
--- a/src/nv_driver.c
+++ b/src/nv_driver.c
@@ -2184,8 +2184,17 @@ static void NVBacklightEnable(NVPtr pNv,  Bool on)
 #endif
     
     if(pNv->LVDS) {
-       if(pNv->twoHeads && ((pNv->Chipset & 0x0ff0) != 0x0110)) {
-           pNv->PMC[0x130C/4] = on ? 3 : 7; 
+       if(pNv->twoHeads) {
+           if((pNv->Chipset & 0x0ff0) != 0x0110) {
+               pNv->PMC[0x130C/4] = on ? 3 : 7;
+           } else if(SUBVENDOR_ID(pNv->PciInfo) == 0x1028 &&
+                     SUBDEVICE_ID(pNv->PciInfo) == 0xd4) {
+               // Dell Inspiron 8200, GeForce2 Go
+               CARD32 tmp_pcrt = pNv->PCRTC0[0x081C/4] & 0xFFFFFFFC;
+               if(on)
+                   tmp_pcrt |= 0x1;
+               pNv->PCRTC0[0x081C/4] = tmp_pcrt;
+           }
        }
     } else {
        CARD32 fpcontrol;
commit 02e431eb0969cabb67f3e4b1cb1a2d7fc5f697f0
Author: Giuseppe Bilotta <giuseppe.bilotta at gmail.com>
Date:   Thu Sep 27 00:08:28 2007 +0200

    [PATCH] Add macros to retrieve the subsystem vendor/device
    
    Signed-off-by: Giuseppe Bilotta <giuseppe.bilotta at gmail.com>
    Signed-off-by: Aaron Plattner <aplattner at nvidia.com>

diff --git a/src/nv_const.h b/src/nv_const.h
index 141e0f3..8f9799c 100644
--- a/src/nv_const.h
+++ b/src/nv_const.h
@@ -10,11 +10,15 @@
  #define MEMBASE(p,n)     (p)->regions[n].base_addr
  #define VENDOR_ID(p)     (p)->vendor_id
  #define DEVICE_ID(p)     (p)->device_id
+ #define SUBVENDOR_ID(p)  (p)->subvendor_id
+ #define SUBDEVICE_ID(p)  (p)->subdevice_id
  #define CHIP_REVISION(p) (p)->revision
 #else
  #define MEMBASE(p,n)     (p)->memBase[n]
  #define VENDOR_ID(p)     (p)->vendor
  #define DEVICE_ID(p)     (p)->chipType
+ #define SUBVENDOR_ID(p)  (p)->subsysVendor
+ #define SUBDEVICE_ID(p)  (p)->subsysCard
  #define CHIP_REVISION(p) (p)->chipRev
 #endif
 


More information about the xorg-commit mailing list