Index: ChangeLog =================================================================== RCS file: /cvs/xorg/xc/ChangeLog,v retrieving revision 1.886 diff -u -r1.886 ChangeLog --- ChangeLog 20 Apr 2005 21:07:43 -0000 1.886 +++ ChangeLog 21 Apr 2005 22:20:35 -0000 @@ -1,3 +1,11 @@ +2005-04-21 Alan Coopersmith + + * programs/Xserver/hw/xfree86/drivers/nv/nv_driver.c + * programs/Xserver/hw/xfree86/drivers/nv/nv_setup.c + * programs/Xserver/hw/xfree86/drivers/nv/nv_type.h + Bugzilla #3095 + nv DPMS panel fixes (Mark Vojkovich) + 2004-04-20 Matthieu Herrb * programs/Xserver/hw/xfree86/drivers/ati/theatre.h Index: programs/Xserver/hw/xfree86/drivers/nv/nv_driver.c =================================================================== RCS file: /cvs/xorg/xc/programs/Xserver/hw/xfree86/drivers/nv/nv_driver.c,v retrieving revision 1.10 diff -u -r1.10 nv_driver.c --- programs/Xserver/hw/xfree86/drivers/nv/nv_driver.c 26 Jan 2005 01:36:04 -0000 1.10 +++ programs/Xserver/hw/xfree86/drivers/nv/nv_driver.c 21 Apr 2005 22:20:36 -0000 @@ -1,4 +1,4 @@ -/* $XdotOrg: $ */ +/* $XdotOrg: xc/programs/Xserver/hw/xfree86/drivers/nv/nv_driver.c,v 1.10 2005/01/26 01:36:04 alanc Exp $ */ /* $XConsortium: nv_driver.c /main/3 1996/10/28 05:13:37 kaleb $ */ /* * Copyright 1996-1997 David J. McKay @@ -25,7 +25,7 @@ /* Hacked together from mga driver and 3.3.4 NVIDIA driver by Jarno Paananen */ -/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/nv/nv_driver.c,v 1.131 2005/01/20 01:01:00 mvojkovi Exp $ */ +/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/nv/nv_driver.c,v 1.133 2005/04/16 23:57:26 mvojkovi Exp $ */ #include "nv_include.h" @@ -1706,7 +1706,7 @@ static void NVBacklightEnable(NVPtr pNv, Bool on) { - CARD32 fpcontrol = pNv->PRAMDAC[0x0848/4] & 0xCfffffCC; + CARD32 fpcontrol; /* This is done differently on each laptop. Here we define the ones we know for sure. */ @@ -1729,11 +1729,15 @@ } #endif - /* cut the TMDS output */ - if(on) fpcontrol |= pNv->fpSyncs; - else fpcontrol |= 0x20000022; + if(!pNv->LVDS) { + fpcontrol = pNv->PRAMDAC[0x0848/4] & 0xCfffffCC; - pNv->PRAMDAC[0x0848/4] = fpcontrol; + /* cut the TMDS output */ + if(on) fpcontrol |= pNv->fpSyncs; + else fpcontrol |= 0x20000022; + + pNv->PRAMDAC[0x0848/4] = fpcontrol; + } } static void Index: programs/Xserver/hw/xfree86/drivers/nv/nv_setup.c =================================================================== RCS file: /cvs/xorg/xc/programs/Xserver/hw/xfree86/drivers/nv/nv_setup.c,v retrieving revision 1.4 diff -u -r1.4 nv_setup.c --- programs/Xserver/hw/xfree86/drivers/nv/nv_setup.c 10 Dec 2004 03:56:42 -0000 1.4 +++ programs/Xserver/hw/xfree86/drivers/nv/nv_setup.c 21 Apr 2005 22:20:36 -0000 @@ -37,7 +37,7 @@ |* *| \***************************************************************************/ -/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/nv/nv_setup.c,v 1.44 2004/12/09 00:21:05 mvojkovi Exp $ */ +/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/nv/nv_setup.c,v 1.45 2005/04/16 23:57:26 mvojkovi Exp $ */ #include "nv_include.h" @@ -680,5 +680,14 @@ if(!pNv->FlatPanel || (pScrn->depth != 24) || !pNv->twoHeads) pNv->FPDither = FALSE; + + pNv->LVDS = FALSE; + if(pNv->FlatPanel && pNv->twoHeads) { + pNv->PRAMDAC0[0x08B0/4] = 0x00010004; + if(pNv->PRAMDAC0[0x08B4/4] & 1) + pNv->LVDS = TRUE; + xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Panel is %s\n", + pNv->LVDS ? "LVDS" : "TMDS"); + } } Index: programs/Xserver/hw/xfree86/drivers/nv/nv_type.h =================================================================== RCS file: /cvs/xorg/xc/programs/Xserver/hw/xfree86/drivers/nv/nv_type.h,v retrieving revision 1.4 diff -u -r1.4 nv_type.h --- programs/Xserver/hw/xfree86/drivers/nv/nv_type.h 10 Dec 2004 03:56:42 -0000 1.4 +++ programs/Xserver/hw/xfree86/drivers/nv/nv_type.h 21 Apr 2005 22:20:36 -0000 @@ -1,4 +1,4 @@ -/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/nv/nv_type.h,v 1.50 2004/12/09 00:21:05 mvojkovi Exp $ */ +/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/nv/nv_type.h,v 1.51 2005/04/16 23:57:26 mvojkovi Exp $ */ #ifndef __NV_STRUCT_H__ #define __NV_STRUCT_H__ @@ -161,6 +161,7 @@ CARD32 fpSyncs; Bool usePanelTweak; int PanelTweak; + Bool LVDS; CARD32 dmaPut; CARD32 dmaCurrent;