xf86-video-nouveau: add macros to retrieve the subsystem vendor/device
PATCH 1/1 xf86-video-nouveau: add macros to retrieve the subsystem vendor/device
Signed-off-by Giuseppe Bilotta <[email protected]>
--- src/nv_pcicompat.h | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-)
src/nv_pcicompat.h +4 -0
@@ -10,6 +10,8 @@#define PCI_DEV_VENDOR_ID (_device) ((_device)->vendor_id)#define PCI_DEV_DEVICE_ID (_device) ((_device)->device_id)#define PCI_DEV_REVISION (_device) ((_device)->revision) +#define PCI_DEV_SUBVENDOR_ID (_device) ((_device)->subvendor_id) +#define PCI_DEV_SUBDEVICE_ID (_device) ((_device)->subdevice_id)#define PCI_DEV_FUNC (_device) ((_device)->func)#define PCI_DEV_BUS (_device) ((_device)->bus)
@@ -28,6 +30,8 @@#define PCI_DEV_VENDOR_ID (_device) ((_device)->vendor)#define PCI_DEV_DEVICE_ID (_device) ((_device)->chipType)#define PCI_DEV_REVISION (_device) ((_device)->chipRev) +#define PCI_DEV_SUBVENDOR_ID (_device) ((_device)->subsysVendor) +#define PCI_DEV_SUBDEVICE_ID (_device) ((_device)->subsysCard)#define PCI_DEV_FUNC (_device) ((_device)->func)#define PCI_DEV_BUS (_device) ((_device)->bus)
Signature · 1 line
1.5.3.2
A message that is not in the archive (sent off-list or not yet received): 1190849301-9084-1-git-send-email-giuseppe.bilotta-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
PATCH 1/1 xf86-video-nouveau: 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 <[email protected]>
--- src/nv_driver.c | 12 ++++++++++-- 1 files changed, 10 insertions(+), 2 deletions(-)
src/nv_driver.c +10 -2
@@ -2014,8 +2014,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_CRTC_081C ) &0xFFFFFFFC ; +if (on) tmp_pcrt |=0x1 ; +nvWriteCRTC0 (pNv,NV_CRTC_081C , tmp_pcrt); + } } }else {CARD32 fpcontrol;
Signature · 1 line
1.5.3.2