From 8759399a3744f0eb1e0cdc83ed23aaaafb9be444 Mon Sep 17 00:00:00 2001 From: Alan Coopersmith Date: Thu, 21 Apr 2005 22:25:47 +0000 Subject: programs/Xserver/hw/xfree86/drivers/nv/nv_driver.c programs/Xserver/hw/xfree86/drivers/nv/nv_setup.c //bugs.freedesktop.org/show_bug.cgi?id=3095> Patch #2501 nv DPMS panel fixes (Mark Vojkovich) --- src/nv_driver.c | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) (limited to 'src/nv_driver.c') diff --git a/src/nv_driver.c b/src/nv_driver.c index 7ff68e4..42eed8a 100644 --- a/src/nv_driver.c +++ b/src/nv_driver.c @@ -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 @@ NVRestore(ScrnInfoPtr pScrn) 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 @@ static void NVBacklightEnable(NVPtr pNv, Bool on) } #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 -- cgit v1.2.3