summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAlan Coopersmith <Alan.Coopersmith@sun.com>2005-04-21 22:25:47 +0000
committerAlan Coopersmith <Alan.Coopersmith@sun.com>2005-04-21 22:25:47 +0000
commit8759399a3744f0eb1e0cdc83ed23aaaafb9be444 (patch)
tree8a753de3d41cc7ae24d412026bcc4d7dcb0fb26e /src
parent2db214d7cf5336fbea36d83bc9b089f70a494614 (diff)
programs/Xserver/hw/xfree86/drivers/nv/nv_setup.c //bugs.freedesktop.org/show_bug.cgi?id=3095> Patch #2501 <https://bugs.freedesktop.org/attachment.cgi?id=2501> nv DPMS panel fixes (Mark Vojkovich)
Diffstat (limited to 'src')
-rw-r--r--src/nv_driver.c18
-rw-r--r--src/nv_setup.c11
-rw-r--r--src/nv_type.h3
3 files changed, 23 insertions, 9 deletions
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
<jpaana@s2.org> */
-/* $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
diff --git a/src/nv_setup.c b/src/nv_setup.c
index 95bb42f..f377f14 100644
--- a/src/nv_setup.c
+++ b/src/nv_setup.c
@@ -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 @@ NVCommonSetup(ScrnInfoPtr pScrn)
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");
+ }
}
diff --git a/src/nv_type.h b/src/nv_type.h
index 690366e..cdbe619 100644
--- a/src/nv_type.h
+++ b/src/nv_type.h
@@ -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 @@ typedef struct {
CARD32 fpSyncs;
Bool usePanelTweak;
int PanelTweak;
+ Bool LVDS;
CARD32 dmaPut;
CARD32 dmaCurrent;