[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

xserver-xorg-video-nv: Changes to 'upstream-unstable'



 configure.ac       |    2 
 man/nv.man         |   21 +++++
 src/g80_dac.c      |   11 ++-
 src/g80_display.c  |   95 +++++++++++++++++++-------
 src/g80_display.h  |    9 ++
 src/g80_output.c   |   10 --
 src/g80_output.h   |    2 
 src/g80_sor.c      |  192 ++++++++++++++++++++++++++++++++++++++++++++---------
 src/nv_const.h     |    3 
 src/nv_cursor.c    |    2 
 src/nv_dac.c       |    3 
 src/nv_dga.c       |    2 
 src/nv_dma.h       |    2 
 src/nv_driver.c    |    8 --
 src/nv_hw.c        |    3 
 src/nv_include.h   |    2 
 src/nv_local.h     |    1 
 src/nv_proto.h     |    3 
 src/nv_setup.c     |    3 
 src/nv_shadow.c    |    4 -
 src/nv_type.h      |    2 
 src/nv_video.c     |    2 
 src/nv_xaa.c       |    3 
 src/nvreg.h        |    7 -
 src/nvvga.h        |    4 -
 src/riva_const.h   |    3 
 src/riva_cursor.c  |    2 
 src/riva_dac.c     |    3 
 src/riva_dga.c     |    2 
 src/riva_driver.c  |    3 
 src/riva_hw.c      |    2 
 src/riva_hw.h      |    2 
 src/riva_include.h |    2 
 src/riva_local.h   |    1 
 src/riva_proto.h   |    3 
 src/riva_setup.c   |    2 
 src/riva_shadow.c  |    4 -
 src/riva_tbl.h     |    3 
 src/riva_type.h    |    2 
 src/riva_xaa.c     |    3 
 40 files changed, 279 insertions(+), 154 deletions(-)

New commits:
commit 69f7a57cd9baabbbee7b7665c3c2c2b91c056a04
Author: Aaron Plattner <aplattner@nvidia.com>
Date:   Wed Aug 15 17:12:11 2007 -0700

    Bump to 2.1.3.

diff --git a/configure.ac b/configure.ac
index 50dbeec..9fdc0eb 100644
--- a/configure.ac
+++ b/configure.ac
@@ -22,7 +22,7 @@
 
 AC_PREREQ(2.57)
 AC_INIT([xf86-video-nv],
-        2.1.2,
+        2.1.3,
         [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg],
         xf86-video-nv)
 

commit 3bb842cb55fd201a559bef19c06db4aee0485d26
Author: Aaron Plattner <aplattner@nvidia.com>
Date:   Tue Jul 24 21:21:06 2007 -0700

    Nuke old RCS tags.
    
    Fix the ends of files.  Update the known cards date.

diff --git a/src/nv_const.h b/src/nv_const.h
index 7a7bdea..b1285ba 100644
--- a/src/nv_const.h
+++ b/src/nv_const.h
@@ -1,5 +1,3 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/nv/nv_const.h,v 1.6 2001/12/07 00:09:55 mvojkovi Exp $ */
-
 #ifndef __NV_CONST_H__
 #define __NV_CONST_H__
 
@@ -8,4 +6,3 @@
 #define NV_DRIVER_NAME "nv"
 
 #endif /* __NV_CONST_H__ */
-          
diff --git a/src/nv_cursor.c b/src/nv_cursor.c
index 453ca52..a648f60 100644
--- a/src/nv_cursor.c
+++ b/src/nv_cursor.c
@@ -37,8 +37,6 @@
 |*                                                                           *|
  \***************************************************************************/
 
-/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/nv/nv_cursor.c,v 1.13 2004/03/13 22:07:05 mvojkovi Exp $ */
-
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
diff --git a/src/nv_dac.c b/src/nv_dac.c
index 7e8340d..ec7739b 100644
--- a/src/nv_dac.c
+++ b/src/nv_dac.c
@@ -37,8 +37,6 @@
 |*                                                                           *|
  \***************************************************************************/
 
-/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/nv/nv_dac.c,v 1.45 2005/07/09 00:53:00 mvojkovi Exp $ */
-
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
@@ -433,4 +431,3 @@ NVDACi2cInit(ScrnInfoPtr pScrn)
     }
     return TRUE;
 }
-
diff --git a/src/nv_dga.c b/src/nv_dga.c
index ea78db9..ccbbf4d 100644
--- a/src/nv_dga.c
+++ b/src/nv_dga.c
@@ -1,5 +1,3 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/nv/nv_dga.c,v 1.11 2002/01/25 21:56:06 tsi Exp $ */
-
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
diff --git a/src/nv_dma.h b/src/nv_dma.h
index ca0bf1b..150918a 100644
--- a/src/nv_dma.h
+++ b/src/nv_dma.h
@@ -38,8 +38,6 @@
 |*                                                                           *|
  \***************************************************************************/
 
-/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/nv/nv_dma.h,v 1.4 2004/03/20 01:52:16 mvojkovi Exp $ */
-
 #define SURFACE_FORMAT                                              0x00000300
 #define SURFACE_FORMAT_DEPTH8                                       0x00000001
 #define SURFACE_FORMAT_DEPTH15                                      0x00000002
diff --git a/src/nv_driver.c b/src/nv_driver.c
index 47d0fbb..07ca621 100644
--- a/src/nv_driver.c
+++ b/src/nv_driver.c
@@ -1,5 +1,3 @@
-/* $XdotOrg: driver/xf86-video-nv/src/nv_driver.c,v 1.21 2006/01/24 16:45:29 aplattner Exp $ */
-/* $XConsortium: nv_driver.c /main/3 1996/10/28 05:13:37 kaleb $ */
 /*
  * Copyright 1996-1997  David J. McKay
  *
@@ -29,8 +27,6 @@
 /* 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.144 2006/06/16 00:19:32 mvojkovi Exp $ */
-
 #include "nv_include.h"
 
 #include "xf86int10.h"
@@ -95,7 +91,7 @@ _X_EXPORT DriverRec NV = {
         0
 };
 
-/* Known cards as of 2006/06/16 */
+/* Known cards as of 2007/07/24 */
 
 static SymTabRec NVKnownChipsets[] =
 {
@@ -2505,4 +2501,4 @@ NVDriverFunc(ScrnInfoPtr pScrn, xorgDriverFuncOp op, pointer data)
 
     return FALSE;
 }
-#endif
+#endif /* RANDR */
diff --git a/src/nv_hw.c b/src/nv_hw.c
index 63f9067..9bc16f4 100644
--- a/src/nv_hw.c
+++ b/src/nv_hw.c
@@ -36,7 +36,6 @@
 |*     those rights set forth herein.                                        *|
 |*                                                                           *|
  \***************************************************************************/
-/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/nv/nv_hw.c,v 1.21 2006/06/16 00:19:33 mvojkovi Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
@@ -1605,5 +1604,3 @@ void NVSetStartAddress (
         pNv->PCRTC[0x800/4] = start;
     }
 }
-
-
diff --git a/src/nv_include.h b/src/nv_include.h
index 648ac31..b579b37 100644
--- a/src/nv_include.h
+++ b/src/nv_include.h
@@ -1,5 +1,3 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/nv/nv_include.h,v 1.9 2000/10/06 12:31:03 eich Exp $ */
-
 #ifndef __NV_INCLUDE_H__
 #define __NV_INCLUDE_H__
 
diff --git a/src/nv_local.h b/src/nv_local.h
index 3d5d202..74cdc09 100644
--- a/src/nv_local.h
+++ b/src/nv_local.h
@@ -36,7 +36,6 @@
 |*     those rights set forth herein.                                        *|
 |*                                                                           *|
  \***************************************************************************/
-/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/nv/nv_local.h,v 1.8tsi Exp $ */
 
 #ifndef __NV_LOCAL_H__
 #define __NV_LOCAL_H__
diff --git a/src/nv_proto.h b/src/nv_proto.h
index 5905309..142cd4c 100644
--- a/src/nv_proto.h
+++ b/src/nv_proto.h
@@ -1,5 +1,3 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/nv/nv_proto.h,v 1.11 2004/03/20 01:52:16 mvojkovi Exp $ */
-
 #ifndef __NV_PROTO_H__
 #define __NV_PROTO_H__
 
@@ -58,4 +56,3 @@ void NVRefreshArea32(ScrnInfoPtr pScrn, int num, BoxPtr pbox);
 void NVPointerMoved(int index, int x, int y);
 
 #endif /* __NV_PROTO_H__ */
-
diff --git a/src/nv_setup.c b/src/nv_setup.c
index 1bf58e0..5772dd0 100644
--- a/src/nv_setup.c
+++ b/src/nv_setup.c
@@ -37,8 +37,6 @@
 |*                                                                           *|
  \***************************************************************************/
 
-/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/nv/nv_setup.c,v 1.48 2005/09/14 02:28:03 mvojkovi Exp $ */
-
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
@@ -708,4 +706,3 @@ NVCommonSetup(ScrnInfoPtr pScrn)
                    pNv->LVDS ? "LVDS" : "TMDS");
     }
 }
-
diff --git a/src/nv_shadow.c b/src/nv_shadow.c
index e695288..7f835a1 100644
--- a/src/nv_shadow.c
+++ b/src/nv_shadow.c
@@ -2,7 +2,6 @@
    Copyright (c) 1999,  The XFree86 Project Inc. 
    Written by Mark Vojkovich <markv@valinux.com>
 */
-/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/nv/nv_shadow.c,v 1.5 2000/03/13 18:49:29 mvojkovi Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
@@ -208,6 +207,3 @@ NVRefreshArea32(ScrnInfoPtr pScrn, int num, BoxPtr pbox)
 	pbox++;
     }
 }
-
-
-
diff --git a/src/nv_type.h b/src/nv_type.h
index b4f1cd3..160441b 100644
--- a/src/nv_type.h
+++ b/src/nv_type.h
@@ -1,5 +1,3 @@
-/* $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__
 
diff --git a/src/nv_video.c b/src/nv_video.c
index c9ee5fe..e11e0d0 100644
--- a/src/nv_video.c
+++ b/src/nv_video.c
@@ -1,5 +1,3 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/nv/nv_video.c,v 1.23 2004/03/20 22:07:06 mvojkovi Exp $ */
-
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
diff --git a/src/nv_xaa.c b/src/nv_xaa.c
index 2504882..5eb4fd8 100644
--- a/src/nv_xaa.c
+++ b/src/nv_xaa.c
@@ -37,8 +37,6 @@
 |*                                                                           *|
  \***************************************************************************/
 
-/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/nv/nv_xaa.c,v 1.35 2004/03/20 16:25:18 mvojkovi Exp $ */
-
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
@@ -729,4 +727,3 @@ NVAccelInit(ScreenPtr pScreen)
 
    return (XAAInit(pScreen, accel));
 }
-
diff --git a/src/nvreg.h b/src/nvreg.h
index c7bd6ba..aa12b0c 100644
--- a/src/nvreg.h
+++ b/src/nvreg.h
@@ -1,4 +1,3 @@
-/* $XConsortium: nvreg.h /main/2 1996/10/28 05:13:41 kaleb $ */
 /*
  * Copyright 1996-1997  David J. McKay
  *
@@ -21,8 +20,6 @@
  * SOFTWARE.
  */
 
-/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/nv/nvreg.h,v 1.6 2002/01/25 21:56:06 tsi Exp $ */
-
 #ifndef __NVREG_H_
 #define __NVREG_H_
 
@@ -195,6 +192,4 @@ typedef enum {NV1,NV3,NV4,NV10,NumNVChips} NVChipType;
 NVChipType GetChipType(void);
 
 
-#endif
-
-
+#endif /* __NVREG_H_ */
diff --git a/src/nvvga.h b/src/nvvga.h
index e194792..e614be1 100644
--- a/src/nvvga.h
+++ b/src/nvvga.h
@@ -20,8 +20,6 @@
  * SOFTWARE.
  */
 
-/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/nv/nvvga.h,v 1.2 2001/11/19 15:33:41 tsi Exp $ */
-
 #ifndef __NVVGA_H__
 #define __NVVGA_H__
 
@@ -79,4 +77,4 @@ typedef struct {
   }regs;
 } vgaNVRec, *vgaNVPtr;
 
-#endif
+#endif /* __NVVGA_H__ */
diff --git a/src/riva_const.h b/src/riva_const.h
index 4949fc1..890bcaa 100644
--- a/src/riva_const.h
+++ b/src/riva_const.h
@@ -1,5 +1,3 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/nv/riva_const.h $ */
-
 #ifndef __RIVA_CONST_H__
 #define __RIVA_CONST_H__
 
@@ -8,4 +6,3 @@
 #define RIVA_DRIVER_NAME "riva128"
 
 #endif /* __RIVA_CONST_H__ */
-          
diff --git a/src/riva_cursor.c b/src/riva_cursor.c
index 9c9c267..b8dc2bf 100644
--- a/src/riva_cursor.c
+++ b/src/riva_cursor.c
@@ -23,8 +23,6 @@
 /* Rewritten with reference from mga driver and 3.3.4 NVIDIA driver by
    Jarno Paananen <jpaana@s2.org> */
 
-/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/nv/riva_cursor.c $ */
-
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
diff --git a/src/riva_dac.c b/src/riva_dac.c
index d371a05..6e9f346 100644
--- a/src/riva_dac.c
+++ b/src/riva_dac.c
@@ -23,8 +23,6 @@
 /* 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/riva_dac.c,v 1.1 2003/07/31 20:24:29 mvojkovi Exp $ */
-
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
@@ -281,4 +279,3 @@ RivaDACi2cInit(ScrnInfoPtr pScrn)
     }
     return TRUE;
 }
-
diff --git a/src/riva_dga.c b/src/riva_dga.c
index 5338554..c6f2d92 100644
--- a/src/riva_dga.c
+++ b/src/riva_dga.c
@@ -1,5 +1,3 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/riva/riva_dga.c $ */
-
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
diff --git a/src/riva_driver.c b/src/riva_driver.c
index c6b805c..d17d699 100644
--- a/src/riva_driver.c
+++ b/src/riva_driver.c
@@ -23,8 +23,6 @@
 /* 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/riva_driver.c,v 1.5 2003/11/03 05:11:26 tsi Exp $ */
-
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
@@ -1342,4 +1340,3 @@ RivaSave(ScrnInfoPtr pScrn)
 
     (*pRiva->Save)(pScrn, vgaReg, rivaReg, pRiva->Primary);
 }
-
diff --git a/src/riva_hw.c b/src/riva_hw.c
index 15bef0e..32dc2a3 100644
--- a/src/riva_hw.c
+++ b/src/riva_hw.c
@@ -36,7 +36,6 @@
 |*     those rights set forth herein.                                        *|
 |*                                                                           *|
  \***************************************************************************/
-/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/nv/riva_hw.c,v 1.51tsi Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
@@ -990,4 +989,3 @@ int RivaGetConfig
     chip->Line   = (RivaLine                *)&(chip->FIFO[0x0000C000/4]);
     return (0);
 }
-
diff --git a/src/riva_hw.h b/src/riva_hw.h
index ec2b90b..2882afa 100644
--- a/src/riva_hw.h
+++ b/src/riva_hw.h
@@ -36,7 +36,6 @@
 |*     those rights set forth herein.                                        *|
 |*                                                                           *|
 \***************************************************************************/
-/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/nv/riva_hw.h,v 1.26 2003/07/31 20:24:31 mvojkovi Exp $ */
 #ifndef __RIVA_HW_H__
 #define __RIVA_HW_H__
 
@@ -363,4 +362,3 @@ typedef struct _riva_hw_state
    while ((hwinst).Busy(&(hwinst))); \
 }
 #endif /* __RIVA_HW_H__ */
-
diff --git a/src/riva_include.h b/src/riva_include.h
index 2f269df..6726fcc 100644
--- a/src/riva_include.h
+++ b/src/riva_include.h
@@ -1,5 +1,3 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/nv/riva_include.h $ */
-
 #ifndef __RIVA_INCLUDE_H__
 #define __RIVA_INCLUDE_H__
 
diff --git a/src/riva_local.h b/src/riva_local.h
index 833ed04..9d40524 100644
--- a/src/riva_local.h
+++ b/src/riva_local.h
@@ -36,7 +36,6 @@
 |*     those rights set forth herein.                                        *|
 |*                                                                           *|
  \***************************************************************************/
-/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/nv/riva_local.h,v 1.1tsi Exp $ */
 
 #ifndef __RIVA_LOCAL_H__
 #define __RIVA_LOCAL_H__
diff --git a/src/riva_proto.h b/src/riva_proto.h
index bff07a2..e9d7261 100644
--- a/src/riva_proto.h
+++ b/src/riva_proto.h
@@ -1,5 +1,3 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/nv/riva_proto.h $ */
-
 #ifndef __RIVA_PROTO_H__
 #define __RIVA_PROTO_H__
 
@@ -38,4 +36,3 @@ Bool    RivaDGAInit(ScreenPtr pScreen);
 
 
 #endif /* __RIVA_PROTO_H__ */
-
diff --git a/src/riva_setup.c b/src/riva_setup.c
index faedf9a..7bceb09 100644
--- a/src/riva_setup.c
+++ b/src/riva_setup.c
@@ -23,8 +23,6 @@
 /* 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/riva_setup.c $ */
-
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
diff --git a/src/riva_shadow.c b/src/riva_shadow.c
index eac3592..24933f9 100644
--- a/src/riva_shadow.c
+++ b/src/riva_shadow.c
@@ -2,7 +2,6 @@
    Copyright (c) 1999,  The XFree86 Project Inc. 
    Written by Mark Vojkovich <markv@valinux.com>
 */
-/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/nv/riva_shadow.c $ */
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
@@ -193,6 +192,3 @@ RivaRefreshArea32(ScrnInfoPtr pScrn, int num, BoxPtr pbox)
 	pbox++;
     }
 }
-
-
-
diff --git a/src/riva_tbl.h b/src/riva_tbl.h
index bb2a329..c7fc277 100644
--- a/src/riva_tbl.h
+++ b/src/riva_tbl.h
@@ -36,8 +36,6 @@
 |*     those rights set forth herein.                                        *|
 |*                                                                           *|
  \***************************************************************************/
-/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/nv/riva_tbl.h,v 1.10 2003/07/31 20:24:31 mvojkovi Exp $ */
-
 
 /*
  * RIVA Fixed Functionality Init Tables.
@@ -251,4 +249,3 @@ static unsigned nv3TablePRAMIN_32BPP[][2] =
     {0x00000D1C, 0x10419208},
     {0x00000D30, 0x10118201}
 };
-
diff --git a/src/riva_type.h b/src/riva_type.h
index 204c758..606e3e5 100644
--- a/src/riva_type.h
+++ b/src/riva_type.h
@@ -1,5 +1,3 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/nv/riva_type.h $ */
-
 #ifndef __Riva_STRUCT_H__
 #define __Riva_STRUCT_H__
 
diff --git a/src/riva_xaa.c b/src/riva_xaa.c
index 6863143..cffe9f8 100644
--- a/src/riva_xaa.c
+++ b/src/riva_xaa.c
@@ -40,8 +40,6 @@
 /* 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/riva_xaa.c $ */
-
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
@@ -555,4 +553,3 @@ RivaAccelInit(ScreenPtr pScreen)
 
     return(XAAInit(pScreen, infoPtr));
 }
-

commit 08b68473351081fe1ed96ba7e206ed0d301b8a91
Author: Aaron Plattner <aplattner@nvidia.com>
Date:   Tue Jul 24 20:36:04 2007 -0700

    G80: Allow DVI scaling.
    
    Revamp how the scaling code works.  When a mode is set on a DVI output,
    determine the current preferred mode and scale to that.  Add a new scaling
    option, "off", which disables scaling and scans out the actual timings in the
    mode to be set.

diff --git a/man/nv.man b/man/nv.man
index f27cd6d..7b9d946 100644
--- a/man/nv.man
+++ b/man/nv.man
@@ -175,8 +175,10 @@ Valid values:
 .B scale
 Control how the image is scaled to fit the flat panel.
 Note that some flat panels perform their own scaling, overriding this option.
+.RB \*q off \*q
+is not valid for laptop flat panels (LVDS).
 Valid values:
-.RB \*q aspect "\*q, \*q" fill "\*q, and \*q" center \*q.
+.RB \*q off "\*q, \*q" aspect "\*q, \*q" fill "\*q, and \*q" center \*q.
 Default:
 .RB \*q aspect \*q.
 .\" ******************** end G80 section ********************
diff --git a/src/g80_dac.c b/src/g80_dac.c
index 7848de2..30413cd 100644
--- a/src/g80_dac.c
+++ b/src/g80_dac.c
@@ -76,6 +76,13 @@ G80DacDPMSSet(xf86OutputPtr output, int mode)
     pNv->reg[(0x0061A004+off)/4] = tmp;
 }
 
+Bool
+G80DacModeFixup(xf86OutputPtr output, DisplayModePtr mode,
+                DisplayModePtr adjusted_mode)
+{
+    return TRUE;
+}
+
 static void
 G80DacModeSet(xf86OutputPtr output, DisplayModePtr mode,
               DisplayModePtr adjusted_mode)
@@ -99,6 +106,8 @@ G80DacModeSet(xf86OutputPtr output, DisplayModePtr mode,
     C(0x00000404 + dacOff,
         (adjusted_mode->Flags & V_NHSYNC) ? 1 : 0 |
         (adjusted_mode->Flags & V_NVSYNC) ? 2 : 0);
+
+    G80CrtcSetScale(output->crtc, adjusted_mode, G80_SCALE_OFF);
 }
 
 /*
@@ -165,7 +174,7 @@ static const xf86OutputFuncsRec G80DacOutputFuncs = {
     .save = NULL,
     .restore = NULL,
     .mode_valid = G80OutputModeValid,
-    .mode_fixup = G80OutputModeFixup,
+    .mode_fixup = G80DacModeFixup,
     .prepare = G80OutputPrepare,
     .commit = G80OutputCommit,
     .mode_set = G80DacModeSet,
diff --git a/src/g80_display.c b/src/g80_display.c
index 14352aa..542a68e 100644
--- a/src/g80_display.c
+++ b/src/g80_display.c
@@ -42,7 +42,6 @@ typedef struct G80CrtcPrivRec {
     Bool cursorVisible;
     Bool skipModeFixup;
     Bool dither;
-    enum G80ScaleMode scale;
 } G80CrtcPrivRec, *G80CrtcPrivPtr;
 
 static void G80CrtcShowHideCursor(xf86CrtcPtr crtc, Bool show, Bool update);
@@ -307,31 +306,35 @@ G80DispShutdown(ScrnInfoPtr pScrn)
     while((pNv->reg[0x61C830/4] & 0x10000000));
 }
 
+void
+G80CrtcDoModeFixup(DisplayModePtr dst, const DisplayModePtr src)
+{
+    /* Magic mode timing fudge factor */
+    const int fudge = ((src->Flags & V_INTERLACE) && (src->Flags & V_DBLSCAN)) ? 2 : 1;
+    const int interlaceDiv = (src->Flags & V_INTERLACE) ? 2 : 1;
+
+    /* Stash the src timings in the Crtc fields in dst */
+    dst->CrtcHBlankStart = src->CrtcVTotal << 16 | src->CrtcHTotal;
+    dst->CrtcHSyncEnd = ((src->CrtcVSyncEnd - src->CrtcVSyncStart) / interlaceDiv - 1) << 16 |
+        (src->CrtcHSyncEnd - src->CrtcHSyncStart - 1);
+    dst->CrtcHBlankEnd = ((src->CrtcVBlankEnd - src->CrtcVSyncStart) / interlaceDiv - fudge) << 16 |
+        (src->CrtcHBlankEnd - src->CrtcHSyncStart - 1);
+    dst->CrtcHTotal = ((src->CrtcVTotal - src->CrtcVSyncStart + src->CrtcVBlankStart) / interlaceDiv - fudge) << 16 |
+        (src->CrtcHTotal - src->CrtcHSyncStart + src->CrtcHBlankStart - 1);
+    dst->CrtcHSkew = ((src->CrtcVTotal + src->CrtcVBlankEnd - src->CrtcVSyncStart) / 2 - 2) << 16 |
+        ((2*src->CrtcVTotal - src->CrtcVSyncStart + src->CrtcVBlankStart) / 2 - 2);
+}
+
 static Bool
 G80CrtcModeFixup(xf86CrtcPtr crtc,
                  DisplayModePtr mode, DisplayModePtr adjusted_mode)
 {
     G80CrtcPrivPtr pPriv = crtc->driver_private;
-    int interlaceDiv, fudge;
 
     if(pPriv->skipModeFixup)
         return TRUE;
 
-    /* Magic mode timing fudge factor */
-    fudge = ((adjusted_mode->Flags & V_INTERLACE) && (adjusted_mode->Flags & V_DBLSCAN)) ? 2 : 1;
-    interlaceDiv = (adjusted_mode->Flags & V_INTERLACE) ? 2 : 1;
-
-    /* Stash the mode timings in the Crtc fields in adjusted_mode */
-    adjusted_mode->CrtcHBlankStart = mode->CrtcVTotal << 16 | mode->CrtcHTotal;
-    adjusted_mode->CrtcHSyncEnd = ((mode->CrtcVSyncEnd - mode->CrtcVSyncStart) / interlaceDiv - 1) << 16 |
-        (mode->CrtcHSyncEnd - mode->CrtcHSyncStart - 1);
-    adjusted_mode->CrtcHBlankEnd = ((mode->CrtcVBlankEnd - mode->CrtcVSyncStart) / interlaceDiv - fudge) << 16 |
-        (mode->CrtcHBlankEnd - mode->CrtcHSyncStart - 1);
-    adjusted_mode->CrtcHTotal = ((mode->CrtcVTotal - mode->CrtcVSyncStart + mode->CrtcVBlankStart) / interlaceDiv - fudge) << 16 |
-        (mode->CrtcHTotal - mode->CrtcHSyncStart + mode->CrtcHBlankStart - 1);
-    adjusted_mode->CrtcHSkew = ((mode->CrtcVTotal + mode->CrtcVBlankEnd - mode->CrtcVSyncStart) / 2 - 2) << 16 |
-        ((2*mode->CrtcVTotal - mode->CrtcVSyncStart + mode->CrtcVBlankStart) / 2 - 2);
-
+    G80CrtcDoModeFixup(adjusted_mode, mode);
     return TRUE;
 }
 
@@ -365,7 +368,6 @@ G80CrtcModeSet(xf86CrtcPtr crtc, DisplayModePtr mode,
         case 24: C(0x00000870 + headOff, 0xCF00); break;
     }
     G80CrtcSetDither(crtc, pPriv->dither, FALSE);
-    G80CrtcSetScale(crtc, adjusted_mode, pPriv->scale, FALSE);
     C(0x000008A8 + headOff, 0x40000);
     C(0x000008C0 + headOff, y << 16 | x);
     C(0x000008C8 + headOff, VDisplay << 16 | HDisplay);
@@ -504,20 +506,19 @@ static void ComputeAspectScale(DisplayModePtr mode, int *outX, int *outY)
 }
 
 void G80CrtcSetScale(xf86CrtcPtr crtc, DisplayModePtr mode,
-                     enum G80ScaleMode scale, Bool update)
+                     enum G80ScaleMode scale)
 {
     ScrnInfoPtr pScrn = crtc->scrn;
     G80CrtcPrivPtr pPriv = crtc->driver_private;
     const int headOff = 0x400 * pPriv->head;
     int outX, outY;
 
-    pPriv->scale = scale;
-
     switch(scale) {
         case G80_SCALE_ASPECT:
             ComputeAspectScale(mode, &outX, &outY);
             break;
 
+        case G80_SCALE_OFF:
         case G80_SCALE_FILL:
             outX = mode->CrtcHDisplay;
             outY = mode->CrtcVDisplay;
@@ -537,8 +538,6 @@ void G80CrtcSetScale(xf86CrtcPtr crtc, DisplayModePtr mode,
     }
     C(0x000008D8 + headOff, outY << 16 | outX);
     C(0x000008DC + headOff, outY << 16 | outX);
-
-    if(update) C(0x00000080, 0);
 }
 
 static void
@@ -600,7 +599,6 @@ G80DispCreateCrtcs(ScrnInfoPtr pScrn)
         g80_crtc = xnfcalloc(sizeof(*g80_crtc), 1);
         g80_crtc->head = head;
         g80_crtc->dither = pNv->Dither;
-        g80_crtc->scale = G80_SCALE_ASPECT;
         crtc->driver_private = g80_crtc;
     }
 }
diff --git a/src/g80_display.h b/src/g80_display.h
index 8bd3bfb..2031fed 100644
--- a/src/g80_display.h
+++ b/src/g80_display.h
@@ -1,4 +1,5 @@
 enum G80ScaleMode {
+    G80_SCALE_OFF,
     G80_SCALE_ASPECT,
     G80_SCALE_FILL,
     G80_SCALE_CENTER,
@@ -13,12 +14,13 @@ void G80DispCommand(ScrnInfoPtr, CARD32 addr, CARD32 data);
 
 Head G80CrtcGetHead(xf86CrtcPtr);
 
+void G80CrtcDoModeFixup(DisplayModePtr dst, const DisplayModePtr src);
 void G80CrtcBlankScreen(xf86CrtcPtr, Bool blank);
 void G80CrtcEnableCursor(xf86CrtcPtr, Bool update);
 void G80CrtcDisableCursor(xf86CrtcPtr, Bool update);
 void G80CrtcSetCursorPosition(xf86CrtcPtr, int x, int y);
 void G80CrtcSkipModeFixup(xf86CrtcPtr);
 void G80CrtcSetDither(xf86CrtcPtr, Bool dither, Bool update);
-void G80CrtcSetScale(xf86CrtcPtr, DisplayModePtr, enum G80ScaleMode, Bool update);
+void G80CrtcSetScale(xf86CrtcPtr, DisplayModePtr, enum G80ScaleMode);
 
 void G80DispCreateCrtcs(ScrnInfoPtr pScrn);
diff --git a/src/g80_output.c b/src/g80_output.c
index 448864f..8bd2096 100644
--- a/src/g80_output.c
+++ b/src/g80_output.c
@@ -29,6 +29,7 @@
 #include <strings.h>
 
 #include "g80_type.h"
+#include "g80_display.h"
 #include "g80_output.h"
 
 static Bool G80ReadPortMapping(int scrnIndex, G80Ptr pNv)
@@ -173,13 +174,6 @@ G80OutputModeValid(xf86OutputPtr output, DisplayModePtr mode)
     return MODE_OK;
 }
 
-Bool
-G80OutputModeFixup(xf86OutputPtr output, DisplayModePtr mode,
-                   DisplayModePtr adjusted_mode)
-{
-    return TRUE;
-}
-
 void
 G80OutputPrepare(xf86OutputPtr output)
 {
@@ -329,12 +323,14 @@ G80CreateOutputs(ScrnInfoPtr pScrn)
 
             pPriv->partner = sor;
             pPriv->i2c = i2c;
+            pPriv->scale = G80_SCALE_OFF;
         }
         if(sor) {
             G80OutputPrivPtr pPriv = sor->driver_private;
 
             pPriv->partner = dac;
             pPriv->i2c = i2c;
+            pPriv->scale = G80_SCALE_ASPECT;
         }
     }
 
diff --git a/src/g80_output.h b/src/g80_output.h
index 900b76d..33514c6 100644
--- a/src/g80_output.h
+++ b/src/g80_output.h
@@ -3,6 +3,7 @@ typedef struct G80OutputPrivRec {
     ORNum or;
     PanelType panelType;
     DisplayModePtr nativeMode;
+    enum G80ScaleMode scale;
 
     xf86OutputPtr partner;
     I2CBusPtr i2c;
@@ -14,7 +15,6 @@ typedef struct G80OutputPrivRec {
 
 void G80OutputSetPClk(xf86OutputPtr, int pclk);
 int G80OutputModeValid(xf86OutputPtr, DisplayModePtr);
-Bool G80OutputModeFixup(xf86OutputPtr, DisplayModePtr mode, DisplayModePtr adjusted_mode);
 void G80OutputPrepare(xf86OutputPtr);
 void G80OutputCommit(xf86OutputPtr);
 void G80OutputPartnersDetect(xf86OutputPtr dac, xf86OutputPtr sor, I2CBusPtr i2c);
diff --git a/src/g80_sor.c b/src/g80_sor.c
index 8ba3425..c98b66d 100644
--- a/src/g80_sor.c
+++ b/src/g80_sor.c
@@ -122,6 +122,8 @@ G80SorModeSet(xf86OutputPtr output, DisplayModePtr mode,
         type |
         ((adjusted_mode->Flags & V_NHSYNC) ? 0x1000 : 0) |
         ((adjusted_mode->Flags & V_NVSYNC) ? 0x2000 : 0));
+
+    G80CrtcSetScale(output->crtc, adjusted_mode, pPriv->scale);
 }
 
 static xf86OutputStatus
@@ -151,49 +153,90 @@ G80SorDestroy(xf86OutputPtr output)
 
     G80OutputDestroy(output);
 
-    if(pPriv->nativeMode) {
-        if(pPriv->nativeMode->name)
-            xfree(pPriv->nativeMode->name);
-        xfree(pPriv->nativeMode);
-    }
+    xf86DeleteMode(&pPriv->nativeMode, pPriv->nativeMode);
 
     xfree(output->driver_private);
     output->driver_private = NULL;
 }
 
-/******************** LVDS ********************/
+static void G80SorSetModeBackend(DisplayModePtr dst, const DisplayModePtr src)
+{
+    // Stash the backend mode timings from src into dst
+    dst->Clock           = src->Clock;
+    dst->Flags           = src->Flags;
+    dst->CrtcHDisplay    = src->CrtcHDisplay;
+    dst->CrtcHBlankStart = src->CrtcHBlankStart;
+    dst->CrtcHSyncStart  = src->CrtcHSyncStart;
+    dst->CrtcHSyncEnd    = src->CrtcHSyncEnd;
+    dst->CrtcHBlankEnd   = src->CrtcHBlankEnd;
+    dst->CrtcHTotal      = src->CrtcHTotal;
+    dst->CrtcHSkew       = src->CrtcHSkew;
+    dst->CrtcVDisplay    = src->CrtcVDisplay;
+    dst->CrtcVBlankStart = src->CrtcVBlankStart;
+    dst->CrtcVSyncStart  = src->CrtcVSyncStart;
+    dst->CrtcVSyncEnd    = src->CrtcVSyncEnd;
+    dst->CrtcVBlankEnd   = src->CrtcVBlankEnd;
+    dst->CrtcVTotal      = src->CrtcVTotal;
+    dst->CrtcHAdjusted   = src->CrtcHAdjusted;
+    dst->CrtcVAdjusted   = src->CrtcVAdjusted;
+}
+
 static Bool
-G80SorModeFixupScale(xf86OutputPtr output, DisplayModePtr mode,
-                     DisplayModePtr adjusted_mode)
+G80SorModeFixup(xf86OutputPtr output, DisplayModePtr mode,
+                DisplayModePtr adjusted_mode)
 {
     G80OutputPrivPtr pPriv = output->driver_private;
     DisplayModePtr native = pPriv->nativeMode;
 
-    // Stash the saved mode timings in adjusted_mode
-    adjusted_mode->Clock = native->Clock;
-    adjusted_mode->Flags = native->Flags;
-    adjusted_mode->CrtcHDisplay = native->CrtcHDisplay;
-    adjusted_mode->CrtcHBlankStart = native->CrtcHBlankStart;
-    adjusted_mode->CrtcHSyncStart = native->CrtcHSyncStart;
-    adjusted_mode->CrtcHSyncEnd = native->CrtcHSyncEnd;
-    adjusted_mode->CrtcHBlankEnd = native->CrtcHBlankEnd;
-    adjusted_mode->CrtcHTotal = native->CrtcHTotal;
-    adjusted_mode->CrtcHSkew = native->CrtcHSkew;
-    adjusted_mode->CrtcVDisplay = native->CrtcVDisplay;
-    adjusted_mode->CrtcVBlankStart = native->CrtcVBlankStart;
-    adjusted_mode->CrtcVSyncStart = native->CrtcVSyncStart;
-    adjusted_mode->CrtcVSyncEnd = native->CrtcVSyncEnd;
-    adjusted_mode->CrtcVBlankEnd = native->CrtcVBlankEnd;
-    adjusted_mode->CrtcVTotal = native->CrtcVTotal;
-    adjusted_mode->CrtcHAdjusted = native->CrtcHAdjusted;
-    adjusted_mode->CrtcVAdjusted = native->CrtcVAdjusted;
-
-    // This mode is already "fixed"
-    G80CrtcSkipModeFixup(output->crtc);
+    if(native && pPriv->scale != G80_SCALE_OFF) {
+        G80SorSetModeBackend(adjusted_mode, native);
+        // This mode is already "fixed"
+        G80CrtcSkipModeFixup(output->crtc);
+    }
 
     return TRUE;
 }
 
+static Bool
+G80SorTMDSModeFixup(xf86OutputPtr output, DisplayModePtr mode,
+                    DisplayModePtr adjusted_mode)
+{
+    int scrnIndex = output->scrn->scrnIndex;
+    G80OutputPrivPtr pPriv = output->driver_private;
+    DisplayModePtr modes = output->probed_modes;
+
+    xf86DeleteMode(&pPriv->nativeMode, pPriv->nativeMode);
+
+    if(modes) {
+        // Find the preferred mode and use that as the "native" mode.
+        // If no preferred mode is available, use the first one.
+        DisplayModePtr mode;
+
+        // Find the preferred mode.
+        for(mode = modes; mode; mode = mode->next) {
+            if(mode->type & M_T_PREFERRED) {
+                xf86DrvMsgVerb(scrnIndex, X_INFO, 5,
+                               "%s: preferred mode is %s\n",
+                               output->name, mode->name);
+                break;
+            }
+        }
+
+        // XXX: May not want to allow scaling if no preferred mode is found.
+        if(!mode) {
+            mode = modes;
+            xf86DrvMsgVerb(scrnIndex, X_INFO, 5,
+                    "%s: no preferred mode found, using %s\n",
+                    output->name, mode->name);
+        }
+
+        pPriv->nativeMode = xf86DuplicateMode(mode);
+        G80CrtcDoModeFixup(pPriv->nativeMode, mode);
+    }
+
+    return G80SorModeFixup(output, mode, adjusted_mode);
+}
+
 static DisplayModePtr
 G80SorGetLVDSModes(xf86OutputPtr output)
 {
@@ -268,6 +311,8 @@ G80SorCreateResources(xf86OutputPtr output)
 static Bool
 G80SorSetProperty(xf86OutputPtr output, Atom prop, RRPropertyValuePtr val)
 {
+    G80OutputPrivPtr pPriv = output->driver_private;
+
     if(prop == properties.dither.atom) {
         INT32 i;
 
@@ -282,13 +327,13 @@ G80SorSetProperty(xf86OutputPtr output, Atom prop, RRPropertyValuePtr val)
         return TRUE;
     } else if(prop == properties.scale.atom) {
         const char *s;
-        enum G80ScaleMode scale;
-        DisplayModePtr mode;
+        enum G80ScaleMode oldScale, scale;
         int i;
         const struct {
             const char *name;
             enum G80ScaleMode scale;
         } modes[] = {
+            { "off",    G80_SCALE_OFF },
             { "aspect", G80_SCALE_ASPECT },
             { "fill",   G80_SCALE_FILL },
             { "center", G80_SCALE_CENTER },
@@ -310,12 +355,34 @@ G80SorSetProperty(xf86OutputPtr output, Atom prop, RRPropertyValuePtr val)
         }
         if(!modes[i].name)
             return FALSE;
+        if(scale == G80_SCALE_OFF && pPriv->panelType == LVDS)
+            // LVDS requires scaling
+            return FALSE;
 



Reply to: