6669242 Update Xorg ATI driver to v6.8.0
authorNiveditha Rau <Niveditha.Rau@Sun.COM>
Tue, 18 Mar 2008 10:20:23 -0700
changeset 370 96f3b8f73d7b
parent 369 52c254f41f85
child 371 d0a78a85764b
6669242 Update Xorg ATI driver to v6.8.0 6675743 Update xfwp to the opensrc version
open-src/app/Makefile
open-src/app/xfwp/Makefile
open-src/driver/xf86-video-ati/6531742.patch
open-src/driver/xf86-video-ati/6535741.patch
open-src/driver/xf86-video-ati/6568883.patch
open-src/driver/xf86-video-ati/6583707.patch
open-src/driver/xf86-video-ati/6675166.patch
open-src/driver/xf86-video-ati/6675188.patch
open-src/driver/xf86-video-ati/Makefile
open-src/driver/xf86-video-ati/autoconfig.patch
open-src/driver/xf86-video-ati/autoconfig2.patch
open-src/driver/xf86-video-ati/autoconfig3.patch
open-src/driver/xf86-video-ati/build-dri.patch
open-src/driver/xf86-video-ati/mapfiles.patch
open-src/driver/xf86-video-ati/no-debug.patch
packages/SUNWxorg-doc/prototype_i386
packages/SUNWxorg-graphics-ddx/prototype_i386
packages/SUNWxwman/copyright.add
packages/SUNWxwman/prototype_com
packages/SUNWxwplt/copyright.add
packages/SUNWxwplt/prototype_com
--- a/open-src/app/Makefile	Mon Mar 17 20:15:29 2008 -0700
+++ b/open-src/app/Makefile	Tue Mar 18 10:20:23 2008 -0700
@@ -28,7 +28,7 @@
 # or other dealings in this Software without prior written authorization
 # of the copyright holder.
 #
-# @(#)Makefile	1.37	08/03/10
+# @(#)Makefile	1.38	08/03/18
 #
 ###############################################################################
 
@@ -59,6 +59,7 @@
 	xdpyinfo \
 	xev \
 	xfd \
+	xfwp \
 	xgamma \
 	xhost \
 	xkbcomp \
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/open-src/app/xfwp/Makefile	Tue Mar 18 10:20:23 2008 -0700
@@ -0,0 +1,50 @@
+###############################################################################
+#
+# xfwp 1.x Makefile
+#
+# Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
+# Use subject to license terms.
+#
+# Permission is hereby granted, free of charge, to any person obtaining a
+# copy of this software and associated documentation files (the
+# "Software"), to deal in the Software without restriction, including
+# without limitation the rights to use, copy, modify, merge, publish,
+# distribute, and/or sell copies of the Software, and to permit persons
+# to whom the Software is furnished to do so, provided that the above
+# copyright notice(s) and this permission notice appear in all copies of
+# the Software and that both the above copyright notice(s) and this
+# permission notice appear in supporting documentation.
+# 
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
+# OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
+# HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL
+# INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING
+# FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
+# NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
+# WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+# 
+# Except as contained in this notice, the name of a copyright holder
+# shall not be used in advertising or otherwise to promote the sale, use
+# or other dealings in this Software without prior written authorization
+# of the copyright holder.
+#
+# @(#)Makefile	1.1 08/03/18
+#
+
+# Package name used in tarballs
+APP_NAME=xfwp
+
+# Version number (used in path names)
+APP_VERS=1.0.1
+
+# Patches to apply to source after unpacking, in order
+SOURCE_PATCHES = 
+
+# Man pages to apply Sun footer to & attributes to list
+SUNTOUCHED_MANPAGES=*.man
+SUNTOUCH_MAN_FLAGS= \
+ -a '{Availability, SUNWxwplt} {Interface Stability, Committed}'
+
+include ../Makefile.inc
--- a/open-src/driver/xf86-video-ati/6531742.patch	Mon Mar 17 20:15:29 2008 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,66 +0,0 @@
---- src/radeon_driver.c	Mon Mar  5 20:24:36 2007
-+++ src/radeon_driver.c	Tue Mar  6 00:22:41 2007
-@@ -3222,6 +3222,11 @@
- 	     ((*new)->VDisplay < p->VDisplay)) ||
- 	    (((*new)->HDisplay == p->HDisplay) &&
- 	     ((*new)->VDisplay == p->VDisplay) &&
-+	     ((*new)->type < p->type) && 
-+	     !(((*new)->type == M_T_USERDEF) || (!(*new)->type))) ||
-+	    (((*new)->HDisplay == p->HDisplay) &&
-+	     ((*new)->VDisplay == p->VDisplay) &&
-+	     ((*new)->type == p->type) && 
- 	     ((*new)->Clock < p->Clock))) {
- 
- 	    if (p->next) p->next->prev = *new;
-@@ -3311,7 +3316,7 @@
- 	    new->Clock      = d_timings->clock / 1000;
- 	    new->Flags      = (d_timings->interlaced ? V_INTERLACE : 0);
- 	    new->status     = MODE_OK;
--	    new->type       = M_T_DEFAULT;
-+	    new->type       = M_T_DRIVER;
- 
- 	    if (d_timings->sync == 3) {
- 		switch (d_timings->misc) {
-@@ -3335,8 +3340,10 @@
-     for (j = 0; j < 8; j++) {
-         if (ddc->timings2[j].hsize == 0 || ddc->timings2[j].vsize == 0)
-                continue;
--	for (p = pScrn->monitor->Modes; p && p->next; p = p->next->next) {
-+	for (p = pScrn->monitor->Modes; p && p->next; p = p->next) {
- 	    /* Ignore all double scan modes */
-+	    if (p->Flags & V_DBLSCAN)
-+		continue;
- 	    if ((ddc->timings2[j].hsize == p->HDisplay) &&
- 		(ddc->timings2[j].vsize == p->VDisplay)) {
- 		float  refresh =
-@@ -3349,7 +3356,8 @@
- 		    new->name = xnfalloc(strlen(p->name) + 1);
- 		    strcpy(new->name, p->name);
- 		    new->status = MODE_OK;
--		    new->type   = M_T_DEFAULT;
-+		    if ((new->type != M_T_USERDEF) && (new->type))
-+		    	new->type   = M_T_DEFAULT;
- 
- 		    count++;
- 
-@@ -3368,7 +3376,10 @@
-     tmp = (ddc->timings1.t1 << 8) | ddc->timings1.t2;
-     for (j = 0; j < 16; j++) {
- 	if (tmp & (1 << j)) {
--	    for (p = pScrn->monitor->Modes; p && p->next; p = p->next->next) {
-+	    for (p = pScrn->monitor->Modes; p && p->next; p = p->next) {
-+		/* Ignore all double scan modes */
-+		if (p->Flags & V_DBLSCAN)
-+		    continue;
- 		if ((est_timings[j].hsize == p->HDisplay) &&
- 		    (est_timings[j].vsize == p->VDisplay)) {
- 		    float  refresh =
-@@ -3381,7 +3392,8 @@
- 			new->name = xnfalloc(strlen(p->name) + 1);
- 			strcpy(new->name, p->name);
- 			new->status = MODE_OK;
--			new->type   = M_T_DEFAULT;
-+		    	if ((new->type != M_T_USERDEF) && (new->type))
-+		    	    new->type   = M_T_DEFAULT;
- 
- 			count++;
--- a/open-src/driver/xf86-video-ati/6535741.patch	Mon Mar 17 20:15:29 2008 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,66 +0,0 @@
---- src/radeon_driver.c.orig	Thu Mar  8 16:12:01 2007
-+++ src/radeon_driver.c	Wed Mar 21 13:00:24 2007
-@@ -144,6 +144,9 @@
- static xf86MonPtr RADEONProbeDDC(ScrnInfoPtr pScrn, int indx);
- static RADEONMonitorType RADEONCrtIsPhysicallyConnected(ScrnInfoPtr pScrn,
- 							int IsCrtDac);
-+#ifdef RANDR
-+static Bool RADEONDriverFunc(ScrnInfoPtr pScrnInfo, xorgDriverFuncOp op, pointer data);
-+#endif
- 
- 
- /* psuedo xinerama support */
-@@ -6346,6 +6349,9 @@
-     pScreen->SaveScreen  = RADEONSaveScreen;
-     info->BlockHandler = pScreen->BlockHandler;
-     pScreen->BlockHandler = RADEONBlockHandler;
-+#ifdef RANDR
-+    pScrn->DriverFunc = RADEONDriverFunc;
-+#endif
- 
-     /* Note unused options */
-     if (serverGeneration == 1)
-@@ -10291,3 +10297,43 @@
-     pScrn->FreeScreen    = RADEONFreeScreen;
-     pScrn->ValidMode     = RADEONValidMode;
- }
-+
-+
-+#ifdef RANDR
-+static Bool
-+RADEONDriverFunc(ScrnInfoPtr pScrn, xorgDriverFuncOp op, pointer data)
-+{
-+    RADEONInfoPtr info       = RADEONPTR(pScrn);
-+    unsigned char *RADEONMMIO = info->MMIO;
-+    unsigned long mcData;
-+    unsigned long ulData;
-+
-+    if ((op == RR_GET_INFO) && !(info->IsSecondary)) {
-+    	/* Power DAC down first */
-+    	mcData = INREG(RADEON_DAC_MACRO_CNTL);
-+        mcData |= (RADEON_DAC_PDWN_R | RADEON_DAC_PDWN_G | RADEON_DAC_PDWN_B);
-+	OUTREG(RADEON_DAC_MACRO_CNTL, mcData);
-+
-+	ulData     = INREG(RADEON_DAC_CNTL);
-+	ulData     |= RADEON_DAC_PDWN ;
-+	OUTREG(RADEON_DAC_CNTL, ulData);
-+
-+    	RADEONCrtIsPhysicallyConnected(pScrn, TRUE);
-+	
-+	/* Restore registers that may be altered in previous call */
-+    	OUTREGP(RADEON_DAC_CNTL,
-+            (&info->ModeReg)->dac_cntl,
-+            RADEON_DAC_RANGE_CNTL |
-+            RADEON_DAC_BLANKING);
-+
-+    	OUTREGP(RADEON_CRTC_EXT_CNTL,
-+            (&info->ModeReg)->crtc_ext_cntl,
-+            RADEON_CRTC_VSYNC_DIS |
-+            RADEON_CRTC_HSYNC_DIS |
-+            RADEON_CRTC_DISPLAY_DIS);
-+    }
-+
-+    return TRUE;
-+}
-+#endif
-+
--- a/open-src/driver/xf86-video-ati/6568883.patch	Mon Mar 17 20:15:29 2008 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,10 +0,0 @@
---- src/radeon_driver.c.orig	Wed Jun 13 14:15:10 2007
-+++ src/radeon_driver.c	Wed Jun 13 14:17:07 2007
-@@ -9896,6 +9896,7 @@
- 	         currentm = newm;
- 	         tempm = tempm->next;
- 	  }
-+	  info->CRT2pScrn->monitor->Last = currentm;
- 
- 	  /* xf86SetDDCproperties(info->CRT2pScrn, pRADEONEnt->MonInfo2); */
-           info->CRT2pScrn->monitor->DDC = pRADEONEnt->MonInfo2;
--- a/open-src/driver/xf86-video-ati/6583707.patch	Mon Mar 17 20:15:29 2008 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,11 +0,0 @@
---- src/radeon_driver.c.orig	Sat Jul 28 19:48:26 2007
-+++ src/radeon_driver.c	Sat Jul 28 22:59:42 2007
-@@ -9874,7 +9874,7 @@
-        info->CRT2pScrn->monitor = xalloc(sizeof(MonRec));
-        if(info->CRT2pScrn->monitor) {
-           DisplayModePtr tempm = NULL, currentm = NULL, newm = NULL;
--          memcpy(info->CRT2pScrn->monitor, pScrn->monitor, sizeof(MonRec));
-+          memset(info->CRT2pScrn->monitor, 0, sizeof(MonRec));
-           info->CRT2pScrn->monitor->DDC = NULL;
- 	  info->CRT2pScrn->monitor->Modes = NULL;
- 	  info->CRT2pScrn->monitor->id = "CRT2 Monitor";
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/open-src/driver/xf86-video-ati/6675166.patch	Tue Mar 18 10:20:23 2008 -0700
@@ -0,0 +1,26 @@
+--- configure.ac	Thu Mar 13 11:54:25 2008
++++ configure.ac	Thu Mar 13 12:07:45 2008
+@@ -284,6 +284,11 @@
+ fi
+ AM_CONDITIONAL(XSERVER_LIBPCIACCESS, test "x$XSERVER_LIBPCIACCESS" = xyes)
+ 
++case $host_os in
++  *linux*)
++  AC_DEFINE(FGL_LINUX, 1, [Use linux pragma pack]) ;;
++esac
++
+ AC_SUBST([XORG_CFLAGS])
+ AC_SUBST([DRI_CFLAGS])
+ AC_SUBST([moduledir])
+
+--- src/Makefile.am	Thu Mar 13 11:55:00 2008
++++ src/Makefile.am	Thu Mar 13 11:55:47 2008
+@@ -77,7 +77,7 @@
+ RADEON_EXA_SOURCES = radeon_exa.c
+ endif
+ 
+-AM_CFLAGS = @XORG_CFLAGS@ @DRI_CFLAGS@ @XMODES_CFLAGS@ -DDISABLE_EASF -DENABLE_ALL_SERVICE_FUNCTIONS -DATOM_BIOS -DATOM_BIOS_PARSER -DFGL_LINUX -DDRIVER_PARSER
++AM_CFLAGS = @XORG_CFLAGS@ @DRI_CFLAGS@ @XMODES_CFLAGS@ -DDISABLE_EASF -DENABLE_ALL_SERVICE_FUNCTIONS -DATOM_BIOS -DATOM_BIOS_PARSER -DDRIVER_PARSER
+ INCLUDES = -I$(srcdir)/AtomBios/includes
+ 
+ ati_drv_la_LTLIBRARIES = ati_drv.la
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/open-src/driver/xf86-video-ati/6675188.patch	Tue Mar 18 10:20:23 2008 -0700
@@ -0,0 +1,12 @@
+--- src/radeon_crtc.c	Thu Mar 13 12:17:42 2008
++++ src/radeon_crtc.c	Thu Mar 13 12:18:26 2008
+@@ -238,6 +238,9 @@
+     }
+ 
+     radeon_crtc_dpms(crtc, DPMSModeOn);
++
++    if (crtc->scrn->pScreen != NULL)
++	xf86_reload_cursors (crtc->scrn->pScreen);
+ }
+ 
+ void
--- a/open-src/driver/xf86-video-ati/Makefile	Mon Mar 17 20:15:29 2008 -0700
+++ b/open-src/driver/xf86-video-ati/Makefile	Tue Mar 18 10:20:23 2008 -0700
@@ -30,27 +30,17 @@
 # or other dealings in this Software without prior written authorization
 # of the copyright holder.
 #
-# @(#)Makefile	1.13	07/07/30
+# @(#)Makefile	1.14	08/03/18
 #
 
 # Package name used in tarballs
 DRIVER_NAME=xf86-video-ati
 
 # Version number (used in path names)
-DRIVER_VERS=6.6.3
+DRIVER_VERS=6.8.0
 
 # Patches to apply to source after unpacking, in order
-SOURCE_PATCHES = \
-	6205248.patch 		\
-	autoconfig.patch	\
-	no-debug.patch		\
-	autoconfig2.patch	\
-	autoconfig3.patch	\
-	mapfiles.patch		\
-	6531742.patch		\
-	6535741.patch		\
-	6568883.patch		\
-	6583707.patch
+SOURCE_PATCHES = 6205248.patch 6675166.patch 6675188.patch
 
 # Man pages to apply Sun footer to & attributes to list
 SUNTOUCHED_MANPAGES=man/*.man
@@ -66,6 +56,8 @@
 	-L$(PROTODIR)$(X11_SERVERMODS_DIR)$(ARCHLIBSUBDIR) \
 	-L$(PROTODIR)$(X11_SERVERMODS_DIR)$(ARCHLIBSUBDIR)/linux \
 	-L$(PROTODIR)$(X11_SERVERLIBS_DIR)$(ARCHLIBSUBDIR) \
+	-lexa -lint10 -lfb -lshadowfb -lvbe -lxaa -lfbdevhw \
+	-lvgahw -lm -lshadow \
 	-R$(X11_SERVERMODS_DIR)$(ARCHLIBSUBDIR) \
 	-R$(X11_SERVERMODS_DIR)/linux$(ARCHLIBSUBDIR) \
 	-R$(X11_SERVERLIBS_DIR)$(ARCHLIBSUBDIR)
--- a/open-src/driver/xf86-video-ati/autoconfig.patch	Mon Mar 17 20:15:29 2008 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,754 +0,0 @@
-# Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
-# Use subject to license terms.
-#
-# Permission is hereby granted, free of charge, to any person obtaining a
-# copy of this software and associated documentation files (the
-# "Software"), to deal in the Software without restriction, including
-# without limitation the rights to use, copy, modify, merge, publish,
-# distribute, and/or sell copies of the Software, and to permit persons
-# to whom the Software is furnished to do so, provided that the above
-# copyright notice(s) and this permission notice appear in all copies of
-# the Software and that both the above copyright notice(s) and this
-# permission notice appear in supporting documentation.
-# 
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
-# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
-# OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
-# HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL
-# INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING
-# FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
-# NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
-# WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-# 
-# Except as contained in this notice, the name of a copyright holder
-# shall not be used in advertising or otherwise to promote the sale, use
-# or other dealings in this Software without prior written authorization
-# of the copyright holder.
-
-6397125: Radeon driver:  fails to read hsync/vsync rates from EDID
-6420311: auto-config improve: Ferrari 4000 starts with blank screen without a config file
-6423278: auto-config improve: radeon - Sometimes does not sort modes correctly
-6437062: auto-config: radeon - reboot needed for CRT to function when connected later on Ferrari 4000
-6450687: auto-config: radeon - Modes need to be sorted
-6484245: auto-config: radeon: misc fixes to radeon driver - revision and
-enhancement to 6420311 and 6450687
-
-
-diff -urp -x '*~' src/r128_driver.c src/r128_driver.c
---- src/r128_driver.c	2006-10-03 07:53:03.000000000 -0700
-+++ src/r128_driver.c	2006-11-03 16:38:50.989241000 -0800
-@@ -1529,127 +1529,166 @@ static Bool R128GetDFPInfo(ScrnInfoPtr p
- 
- static void R128SetSyncRangeFromEdid(ScrnInfoPtr pScrn, int flag)
- {
--    int i;
--    xf86MonPtr ddc = pScrn->monitor->DDC;
--    if(flag)  /*HSync*/
--    {
--        for(i=0; i<4; i++)
--        {
--            if(ddc->det_mon[i].type == DS_RANGES)
--            {
--                pScrn->monitor->nHsync = 1;
--                pScrn->monitor->hsync[0].lo =
--                    ddc->det_mon[i].section.ranges.min_h;
--                pScrn->monitor->hsync[0].hi =
--                    ddc->det_mon[i].section.ranges.max_h;
--                return;
--            }
--        }
--        /*if no sync ranges detected in detailed timing table,
--          let's try to derive them from supported VESA modes
--          Are we doing too much here!!!?
--        **/
--        i = 0;
--        if(ddc->timings1.t1 & 0x02) /*800x600@56*/
--        {
--            pScrn->monitor->hsync[i].lo =
--                pScrn->monitor->hsync[i].hi = 35.2;
--            i++;
--        }
--        if(ddc->timings1.t1 & 0x04) /*640x480@75*/
--        {
--            pScrn->monitor->hsync[i].lo =
--                pScrn->monitor->hsync[i].hi = 37.5;
--            i++;
--        }
--        if((ddc->timings1.t1 & 0x08) || (ddc->timings1.t1 & 0x01))
--        {
--            pScrn->monitor->hsync[i].lo =
--                pScrn->monitor->hsync[i].hi = 37.9;
--            i++;
--        }
--        if(ddc->timings1.t2 & 0x40)
--        {
--            pScrn->monitor->hsync[i].lo =
--                pScrn->monitor->hsync[i].hi = 46.9;
--            i++;
--        }
--        if((ddc->timings1.t2 & 0x80) || (ddc->timings1.t2 & 0x08))
--        {
--            pScrn->monitor->hsync[i].lo =
--                pScrn->monitor->hsync[i].hi = 48.1;
--            i++;
--        }
--        if(ddc->timings1.t2 & 0x04)
--        {
--            pScrn->monitor->hsync[i].lo =
--                pScrn->monitor->hsync[i].hi = 56.5;
--            i++;
--        }
--        if(ddc->timings1.t2 & 0x02)
--        {
--            pScrn->monitor->hsync[i].lo =
--                pScrn->monitor->hsync[i].hi = 60.0;
--            i++;
--        }
--        if(ddc->timings1.t2 & 0x01)
--        {
--            pScrn->monitor->hsync[i].lo =
--                pScrn->monitor->hsync[i].hi = 64.0;
--            i++;
--        }
--        pScrn->monitor->nHsync = i;
--    }
--    else      /*Vrefresh*/
--    {
--        for(i=0; i<4; i++)
--        {
--            if(ddc->det_mon[i].type == DS_RANGES)
--            {
--                pScrn->monitor->nVrefresh = 1;
--                pScrn->monitor->vrefresh[0].lo =
--                    ddc->det_mon[i].section.ranges.min_v;
--                pScrn->monitor->vrefresh[0].hi =
--                    ddc->det_mon[i].section.ranges.max_v;
--                return;
--            }
--        }
--        i = 0;
--        if(ddc->timings1.t1 & 0x02) /*800x600@56*/
--        {
--            pScrn->monitor->vrefresh[i].lo =
--                pScrn->monitor->vrefresh[i].hi = 56;
--            i++;
--        }
--        if((ddc->timings1.t1 & 0x01) || (ddc->timings1.t2 & 0x08))
--        {
--            pScrn->monitor->vrefresh[i].lo =
--                pScrn->monitor->vrefresh[i].hi = 60;
--            i++;
--        }
--        if(ddc->timings1.t2 & 0x04)
--        {
--            pScrn->monitor->vrefresh[i].lo =
--                pScrn->monitor->vrefresh[i].hi = 70;
--            i++;
--        }
--        if((ddc->timings1.t1 & 0x08) || (ddc->timings1.t2 & 0x80))
--        {
--            pScrn->monitor->vrefresh[i].lo =
--                pScrn->monitor->vrefresh[i].hi = 72;
--            i++;
--        }
--        if((ddc->timings1.t1 & 0x04) || (ddc->timings1.t2 & 0x40)
--           || (ddc->timings1.t2 & 0x02) || (ddc->timings1.t2 & 0x01))
--        {
--            pScrn->monitor->vrefresh[i].lo =
--                pScrn->monitor->vrefresh[i].hi = 75;
--            i++;
--        }
--        pScrn->monitor->nVrefresh = i;
-+    MonPtr monitor = pScrn->monitor;
-+    xf86MonPtr DDC = (xf86MonPtr)(pScrn->monitor->DDC);
-+    int i, j;
-+    float hmin = 1e6, hmax = 0.0, vmin = 1e6, vmax = 0.0;
-+    float h, v;
-+    struct std_timings *t;
-+    struct detailed_timings *dt;
-+    struct monitor_ranges *mon_range = NULL;
-+    int numTimings = 0;
-+    range hsync[MAX_HSYNC];
-+    range vrefresh[MAX_VREFRESH];
-+
-+    numTimings = 0;
-+
-+    if (flag) { /* Hsync */
-+	for (i = 0; i < DET_TIMINGS; i++) {
-+	    switch (DDC->det_mon[i].type) {
-+	    case DS_RANGES:
-+		mon_range = &DDC->det_mon[i].section.ranges;
-+		hsync[numTimings].lo = mon_range->min_h;
-+		hsync[numTimings].hi = mon_range->max_h;
-+		numTimings++;
-+		break;
-+
-+	    case DS_STD_TIMINGS:
-+		t = DDC->det_mon[i].section.std_t;
-+		for (j = 0; j < 5; j++) {
-+		    if (t[j].hsize > 256) { /* sanity check */
-+			h = t[j].refresh * 1.07 * t[j].vsize / 1000.0;
-+			if (h < hmin)
-+			    hmin = h;
-+			if (h > hmax)
-+			    hmax = h;
-+		    }
-+		}
-+		break;
-+
-+	    case DT:
-+		dt = &DDC->det_mon[i].section.d_timings;
-+		if (dt->clock > 15000000) { /* sanity check */
-+		    h = (float)dt->clock / (dt->h_active + dt->h_blanking);
-+		    h /= 1000.0;
-+		    if (h < hmin)
-+			hmin = h;
-+		    if (h > hmax)
-+			hmax = h;
-+		}
-+		break;
-+	    }
-+
-+	    if (numTimings > MAX_HSYNC)
-+		break;
-+	}
-+
-+	if (numTimings == 0) {
-+	    t = DDC->timings2;
-+	    for (i = 0; i < STD_TIMINGS; i++) {
-+		if (t[i].hsize > 256) { /* sanity check */
-+		    h = t[i].refresh * 1.07 * t[i].vsize / 1000.0;
-+		    if (h < hmin)
-+			hmin = h;
-+		    if (h > hmax)
-+			hmax = h;
-+		}
-+	    }
-+
-+	    if (hmax > 0.0) {
-+		hsync[numTimings].lo = hmin;
-+		hsync[numTimings].hi = hmax;
-+		numTimings++;
-+	    }
-+	}
-+
-+	if (numTimings > 0) {
-+	    monitor->nHsync = numTimings;
-+	    for (i = 0; i < numTimings; i++) {
-+	    	monitor->hsync[i].lo = hsync[i].lo;
-+	    	monitor->hsync[i].hi = hsync[i].hi;
-+	    }
-+	} else {
-+	    pScrn->monitor->hsync[0].lo = 28;
-+            pScrn->monitor->hsync[0].hi = 60;
-+            monitor->nHsync = 1;
-+	}
-+
-+    } else {  /* Vrefresh */
-+	for (i = 0; i < DET_TIMINGS; i++) {
-+	    switch (DDC->det_mon[i].type) {
-+	    case DS_RANGES:
-+		mon_range = &DDC->det_mon[i].section.ranges;
-+		vrefresh[numTimings].lo = mon_range->min_v;
-+		vrefresh[numTimings].hi = mon_range->max_v;
-+		numTimings++;
-+		break;
-+
-+	    case DS_STD_TIMINGS:
-+		t = DDC->det_mon[i].section.std_t;
-+		for (j = 0; j < 5; j++) {
-+		    if (t[j].hsize > 256) { /* sanity check */
-+			if (t[j].refresh < vmin)
-+			    vmin = t[i].refresh;
-+			if (t[j].refresh > vmax)
-+			    vmax = t[i].refresh;
-+		    }
-+		}
-+		break;
-+
-+	    case DT:
-+		dt = &DDC->det_mon[i].section.d_timings;
-+		if (dt->clock > 15000000) { /* sanity check */
-+		    h = (float)dt->clock / (dt->h_active + dt->h_blanking);
-+		    v = h / (dt->v_active + dt->v_blanking);
-+		    if (dt->interlaced) 
-+			v /= 2.0;
-+
-+		    if (v < vmin)
-+			vmin = v;
-+		    if (v > vmax)
-+			vmax = v;
-+		}
-+		break;
-+	    }
-+
-+	    if (numTimings > MAX_HSYNC)
-+		break;
-+	}
-+
-+	if (numTimings == 0) {
-+	    t = DDC->timings2;
-+	    for (i = 0; i < STD_TIMINGS; i++) {
-+		if (t[i].hsize > 256) { /* sanity check */
-+		    if (t[i].refresh < vmin)
-+			vmin = t[i].refresh;
-+		    if (t[i].refresh > vmax)
-+			vmax = t[i].refresh;
-+		}
-+	    }
-+
-+	    if (vmax > 0.0) {
-+		vrefresh[numTimings].lo = vmin;
-+		vrefresh[numTimings].hi = vmax;
-+		numTimings++;
-+	    }
-+	}
-+
-+	if (numTimings > 0) {
-+	    monitor->nVrefresh = numTimings;
-+	    for (i = 0; i < numTimings; i++) {
-+		monitor->vrefresh[i].lo = vrefresh[i].lo;
-+		monitor->vrefresh[i].hi = vrefresh[i].hi;
-+	    }
-+	 } else {
-+	    pScrn->monitor->vrefresh[0].lo = 43;
-+            pScrn->monitor->vrefresh[0].hi = 72;
-+            monitor->nVrefresh = 1;
-+	}
-     }
- }
- 
-+
- /***********
-    xfree's xf86ValidateModes routine deosn't work well with DFPs
-    here is our own validation routine. All modes between
-diff -urp -x '*~' src/radeon_driver.c src/radeon_driver.c
---- src/radeon_driver.c	2006-10-03 07:49:31.000000000 -0700
-+++ src/radeon_driver.c	2006-11-03 16:38:51.000510000 -0800
-@@ -141,6 +141,11 @@ static void RADEONSaveMemMapRegisters(Sc
- static void RADEONAdjustMemMapRegisters(ScrnInfoPtr pScrn, RADEONSavePtr save);
- #endif
- 
-+static xf86MonPtr RADEONProbeDDC(ScrnInfoPtr pScrn, int indx);
-+static RADEONMonitorType RADEONCrtIsPhysicallyConnected(ScrnInfoPtr pScrn,
-+							int IsCrtDac);
-+
-+
- /* psuedo xinerama support */
- 
- extern Bool 		RADEONnoPanoramiXExtension;
-@@ -958,6 +963,8 @@ static RADEONMonitorType RADEONDisplayDD
-     RADEONMonitorType MonType = MT_NONE;
-     xf86MonPtr* MonInfo = &port->MonInfo;
-     int i, j;
-+    RADEONEntPtr pRADEONEnt  = RADEONEntPriv(pScrn);
-+    int vbeProbe = FALSE;
- 
-     DDCReg = info->DDCReg;
-     switch(DDCType)
-@@ -976,7 +983,9 @@ static RADEONMonitorType RADEONDisplayDD
- 	break;
-     default:
- 	info->DDCReg = DDCReg;
-+	/* Fall through, can still try ...
- 	return MT_NONE;
-+	*/
-     }
- 
-     /* Read and output monitor info using DDC2 over I2C bus */
-@@ -1042,6 +1051,15 @@ static RADEONMonitorType RADEONDisplayDD
-     OUTREG(info->DDCReg, INREG(info->DDCReg) &
- 	   ~(RADEON_GPIO_EN_0 | RADEON_GPIO_EN_1));
- 
-+    if ((!*MonInfo) && ((port == &pRADEONEnt->PortInfo[0]) ||
-+	(RADEONCrtIsPhysicallyConnected(pScrn, !(pRADEONEnt->PortInfo[1].DACType)) 
-+	== MT_CRT))) {
-+	vbeProbe = TRUE;
-+	xf86DrvMsg(pScrn->scrnIndex, X_INFO, "VBE DDC probing on port %d ::: \n", 
-+	    (port == &pRADEONEnt->PortInfo[0])? 1:2);
-+	*MonInfo = RADEONProbeDDC(pScrn, info->pEnt->index);
-+    }
-+
-     if (*MonInfo) {
- 	if ((*MonInfo)->rawData[0x14] & 0x80) {
- 	    /* Note some laptops have a DVI output that uses internal TMDS,
-@@ -1051,14 +1069,32 @@ static RADEONMonitorType RADEONDisplayDD
- 	     * Also for laptop, when X starts with lid closed (no DVI connection)
- 	     * both LDVS and TMDS are disable, we still need to treat it as a LVDS panel.
- 	     */
--	    if (port->TMDSType == TMDS_EXT) MonType = MT_DFP;
--	    else {
--		if ((INREG(RADEON_FP_GEN_CNTL) & (1<<7)) || !info->IsMobility)
--		    MonType = MT_DFP;
--		else 
--		    MonType = MT_LCD;
-+	    if (vbeProbe && 
-+		(RADEONCrtIsPhysicallyConnected(pScrn, !(port->DACType)) == MT_CRT)) {
-+	    	    MonType = MT_NONE;
-+	    	    *MonInfo = NULL;
-+		    xf86DrvMsg(pScrn->scrnIndex, X_INFO, "VBE probed DDC info nullified on port %d :::\n", (port == &pRADEONEnt->PortInfo[0])? 1:2);
-+		    xf86DrvMsg(pScrn->scrnIndex, X_INFO, "CRT physically connected but digital device indicated in DDC\n");
-+	    } else {
-+		if (port->TMDSType == TMDS_EXT) MonType = MT_DFP;
-+	    	else {
-+		    if ((INREG(RADEON_FP_GEN_CNTL) & (1<<7)) || !info->IsMobility)
-+		    	MonType = MT_DFP;
-+		    else 
-+		    	MonType = MT_LCD;
-+		}
- 	    }
--	} else MonType = MT_CRT;
-+	} else  {
-+	    	if ((RADEONCrtIsPhysicallyConnected(pScrn, 
-+		    !(pRADEONEnt->PortInfo[1].DACType)) == MT_CRT) && vbeProbe && 
-+		    (info->HasCRTC2) && (port == &pRADEONEnt->PortInfo[0])) {
-+	    	    MonType = MT_NONE;
-+	    	    *MonInfo = NULL;
-+		    xf86DrvMsg(pScrn->scrnIndex, X_INFO, "DDC info nullified on port 1 :::\n");
-+		    xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Analog device indicated in DDC but port 2 CRT physically connected\n");
-+		} else
-+	    	    MonType = MT_CRT;
-+	}
-     } else MonType = MT_NONE;
- 
-     info->DDCReg = DDCReg;
-@@ -1855,7 +1891,11 @@ static BOOL RADEONQueryConnectedMonitors
- 	pRADEONEnt->PortInfo[i].ConnectorType = CONNECTOR_NONE;
-     }
- 
--    if (!RADEONGetConnectorInfoFromBIOS(pScrn)) {
-+    /* On a lot of laptops, DDCType is deteced 0 on port 0, and DDCType for
-+       port 1 may be wrong too. Use default common setting 
-+     */
-+    if (!RADEONGetConnectorInfoFromBIOS(pScrn) ||
-+	(pRADEONEnt->PortInfo[0].DDCType == 0)) { 
- 	/* Below is the most common setting, but may not be true */
- 	pRADEONEnt->PortInfo[0].MonType = MT_UNKNOWN;
- 	pRADEONEnt->PortInfo[0].MonInfo = NULL;
-@@ -3177,7 +3217,8 @@ static void RADEONSortModes(DisplayModeP
- 
-     p = *last;
-     while (p) {
--	if ((((*new)->HDisplay < p->HDisplay) &&
-+	if (((*new)->HDisplay < p->HDisplay) ||
-+	    (((*new)->HDisplay == p->HDisplay) &&
- 	     ((*new)->VDisplay < p->VDisplay)) ||
- 	    (((*new)->HDisplay == p->HDisplay) &&
- 	     ((*new)->VDisplay == p->VDisplay) &&
-@@ -3714,89 +3755,162 @@ static Bool RADEONPreInitGamma(ScrnInfoP
- 
- static void RADEONSetSyncRangeFromEdid(ScrnInfoPtr pScrn, int flag)
- {
--    MonPtr      mon = pScrn->monitor;
--    xf86MonPtr  ddc = mon->DDC;
--    int         i;
--
--    if (flag) { /* HSync */
--	for (i = 0; i < 4; i++) {
--	    if (ddc->det_mon[i].type == DS_RANGES) {
--		mon->nHsync = 1;
--		mon->hsync[0].lo = ddc->det_mon[i].section.ranges.min_h;
--		mon->hsync[0].hi = ddc->det_mon[i].section.ranges.max_h;
--		return;
--	    }
--	}
--	/* If no sync ranges detected in detailed timing table, let's
--	 * try to derive them from supported VESA modes.  Are we doing
--	 * too much here!!!?  */
--	i = 0;
--	if (ddc->timings1.t1 & 0x02) { /* 800x600@56 */
--	    mon->hsync[i].lo = mon->hsync[i].hi = 35.2;
--	    i++;
--	}
--	if (ddc->timings1.t1 & 0x04) { /* 640x480@75 */
--	    mon->hsync[i].lo = mon->hsync[i].hi = 37.5;
--	    i++;
--	}
--	if ((ddc->timings1.t1 & 0x08) || (ddc->timings1.t1 & 0x01)) {
--	    mon->hsync[i].lo = mon->hsync[i].hi = 37.9;
--	    i++;
--	}
--	if (ddc->timings1.t2 & 0x40) {
--	    mon->hsync[i].lo = mon->hsync[i].hi = 46.9;
--	    i++;
--	}
--	if ((ddc->timings1.t2 & 0x80) || (ddc->timings1.t2 & 0x08)) {
--	    mon->hsync[i].lo = mon->hsync[i].hi = 48.1;
--	    i++;
--	}
--	if (ddc->timings1.t2 & 0x04) {
--	    mon->hsync[i].lo = mon->hsync[i].hi = 56.5;
--	    i++;
--	}
--	if (ddc->timings1.t2 & 0x02) {
--	    mon->hsync[i].lo = mon->hsync[i].hi = 60.0;
--	    i++;
--	}
--	if (ddc->timings1.t2 & 0x01) {
--	    mon->hsync[i].lo = mon->hsync[i].hi = 64.0;
--	    i++;
-+    MonPtr monitor = pScrn->monitor;
-+    xf86MonPtr DDC = (xf86MonPtr)(pScrn->monitor->DDC);
-+    int i, j;
-+    float hmin = 1e6, hmax = 0.0, vmin = 1e6, vmax = 0.0;
-+    float h, v;
-+    struct std_timings *t;
-+    struct detailed_timings *dt;
-+    struct monitor_ranges *mon_range = NULL;
-+    int numTimings = 0;
-+    range hsync[MAX_HSYNC];
-+    range vrefresh[MAX_VREFRESH];
-+
-+    numTimings = 0;
-+
-+    if (flag) { /* Hsync */
-+	for (i = 0; i < DET_TIMINGS; i++) {
-+	    switch (DDC->det_mon[i].type) {
-+	    case DS_RANGES:
-+		mon_range = &DDC->det_mon[i].section.ranges;
-+		hsync[numTimings].lo = mon_range->min_h;
-+		hsync[numTimings].hi = mon_range->max_h;
-+		numTimings++;
-+		break;
-+
-+	    case DS_STD_TIMINGS:
-+		t = DDC->det_mon[i].section.std_t;
-+		for (j = 0; j < 5; j++) {
-+		    if (t[j].hsize > 256) { /* sanity check */
-+			h = t[j].refresh * 1.07 * t[j].vsize / 1000.0;
-+			if (h < hmin)
-+			    hmin = h;
-+			if (h > hmax)
-+			    hmax = h;
-+		    }
-+		}
-+		break;
-+
-+	    case DT:
-+		dt = &DDC->det_mon[i].section.d_timings;
-+		if (dt->clock > 15000000) { /* sanity check */
-+		    h = (float)dt->clock / (dt->h_active + dt->h_blanking);
-+		    h /= 1000.0;
-+		    if (h < hmin)
-+			hmin = h;
-+		    if (h > hmax)
-+			hmax = h;
-+		}
-+		break;
-+	    }
-+
-+	    if (numTimings > MAX_HSYNC)
-+		break;
-+	}
-+
-+	if (numTimings == 0) {
-+	    t = DDC->timings2;
-+	    for (i = 0; i < STD_TIMINGS; i++) {
-+		if (t[i].hsize > 256) { /* sanity check */
-+		    h = t[i].refresh * 1.07 * t[i].vsize / 1000.0;
-+		    if (h < hmin)
-+			hmin = h;
-+		    if (h > hmax)
-+			hmax = h;
-+		}
-+	    }
-+
-+	    if (hmax > 0.0) {
-+		hsync[numTimings].lo = hmin;
-+		hsync[numTimings].hi = hmax;
-+		numTimings++;
-+	    }
- 	}
--	mon->nHsync = i;
-+
-+	if (numTimings > 0) {
-+	    monitor->nHsync = numTimings;
-+	    for (i = 0; i < numTimings; i++) {
-+	    	monitor->hsync[i].lo = hsync[i].lo;
-+	    	monitor->hsync[i].hi = hsync[i].hi;
-+	    }
-+	} else {
-+	    pScrn->monitor->hsync[0].lo = 28;
-+            pScrn->monitor->hsync[0].hi = 60;
-+            monitor->nHsync = 1;
-+	}
-+
-     } else {  /* Vrefresh */
--	for (i = 0; i < 4; i++) {
--	    if (ddc->det_mon[i].type == DS_RANGES) {
--		mon->nVrefresh = 1;
--		mon->vrefresh[0].lo = ddc->det_mon[i].section.ranges.min_v;
--		mon->vrefresh[0].hi = ddc->det_mon[i].section.ranges.max_v;
--		return;
-+	for (i = 0; i < DET_TIMINGS; i++) {
-+	    switch (DDC->det_mon[i].type) {
-+	    case DS_RANGES:
-+		mon_range = &DDC->det_mon[i].section.ranges;
-+		vrefresh[numTimings].lo = mon_range->min_v;
-+		vrefresh[numTimings].hi = mon_range->max_v;
-+		numTimings++;
-+		break;
-+
-+	    case DS_STD_TIMINGS:
-+		t = DDC->det_mon[i].section.std_t;
-+		for (j = 0; j < 5; j++) {
-+		    if (t[j].hsize > 256) { /* sanity check */
-+			if (t[j].refresh < vmin)
-+			    vmin = t[i].refresh;
-+			if (t[j].refresh > vmax)
-+			    vmax = t[i].refresh;
-+		    }
-+		}
-+		break;
-+
-+	    case DT:
-+		dt = &DDC->det_mon[i].section.d_timings;
-+		if (dt->clock > 15000000) { /* sanity check */
-+		    h = (float)dt->clock / (dt->h_active + dt->h_blanking);
-+		    v = h / (dt->v_active + dt->v_blanking);
-+		    if (dt->interlaced) 
-+			v /= 2.0;
-+
-+		    if (v < vmin)
-+			vmin = v;
-+		    if (v > vmax)
-+			vmax = v;
-+		}
-+		break;
- 	    }
-+
-+	    if (numTimings > MAX_HSYNC)
-+		break;
- 	}
- 
--	i = 0;
--	if (ddc->timings1.t1 & 0x02) { /* 800x600@56 */
--	    mon->vrefresh[i].lo = mon->vrefresh[i].hi = 56;
--	    i++;
--	}
--	if ((ddc->timings1.t1 & 0x01) || (ddc->timings1.t2 & 0x08)) {
--	    mon->vrefresh[i].lo = mon->vrefresh[i].hi = 60;
--	    i++;
--	}
--	if (ddc->timings1.t2 & 0x04) {
--	    mon->vrefresh[i].lo = mon->vrefresh[i].hi = 70;
--	    i++;
--	}
--	if ((ddc->timings1.t1 & 0x08) || (ddc->timings1.t2 & 0x80)) {
--	    mon->vrefresh[i].lo = mon->vrefresh[i].hi = 72;
--	    i++;
--	}
--	if ((ddc->timings1.t1 & 0x04) || (ddc->timings1.t2 & 0x40) ||
--	    (ddc->timings1.t2 & 0x02) || (ddc->timings1.t2 & 0x01)) {
--	    mon->vrefresh[i].lo = mon->vrefresh[i].hi = 75;
--	    i++;
-+	if (numTimings == 0) {
-+	    t = DDC->timings2;
-+	    for (i = 0; i < STD_TIMINGS; i++) {
-+		if (t[i].hsize > 256) { /* sanity check */
-+		    if (t[i].refresh < vmin)
-+			vmin = t[i].refresh;
-+		    if (t[i].refresh > vmax)
-+			vmax = t[i].refresh;
-+		}
-+	    }
-+
-+	    if (vmax > 0.0) {
-+		vrefresh[numTimings].lo = vmin;
-+		vrefresh[numTimings].hi = vmax;
-+		numTimings++;
-+	    }
-+	}
-+
-+	if (numTimings > 0) {
-+	    monitor->nVrefresh = numTimings;
-+	    for (i = 0; i < numTimings; i++) {
-+		monitor->vrefresh[i].lo = vrefresh[i].lo;
-+		monitor->vrefresh[i].hi = vrefresh[i].hi;
-+	    }
-+	 } else {
-+	    pScrn->monitor->vrefresh[0].lo = 43;
-+            pScrn->monitor->vrefresh[0].hi = 72;
-+            monitor->nVrefresh = 1;
- 	}
--	mon->nVrefresh = i;
-     }
- }
- 
-@@ -3972,6 +4086,9 @@ static Bool RADEONPreInitModes(ScrnInfoP
-     int            modesFound;
-     RADEONEntPtr pRADEONEnt = RADEONEntPriv(pScrn);
-     char           *s;
-+    DisplayModePtr	first = NULL;
-+    DisplayModePtr 	last = NULL;
-+    DisplayModePtr 	start, mp;
- 
-     /* This option has two purposes:
-      *
-@@ -4257,6 +4374,34 @@ static Bool RADEONPreInitModes(ScrnInfoP
- 	}
-     }
- 
-+    /* Sort the modes, retain the first */
-+    if (pScrn->modes && (start = pScrn->modes->next)) {
-+	/* Copy modelist into a new sorted modelist */
-+	for (mp = start; mp != pScrn->modes; mp = mp->next) {
-+           DisplayModePtr 	new = NULL;
-+
-+           new = xnfcalloc(1, sizeof (DisplayModeRec));
-+           memcpy(new, mp, sizeof (DisplayModeRec));
-+           new->name = strdup(mp->name);
-+           RADEONSortModes(&new, &first, &last);
-+       }
-+
-+       if (last && first) {
-+           /* Clean up the old modelist */
-+           start->prev = pScrn->modes->prev;
-+           if (start->prev)
-+		start->prev->next = start;
-+           while (start)
-+		xf86DeleteMode(&start, start);
-+
-+           /* Switch to the new sorted modelist */
-+           pScrn->modes->next = first;
-+           pScrn->modes->prev = last;
-+           first->prev = pScrn->modes;
-+	   last->next = pScrn->modes;
-+       }
-+    }
-+
-     pScrn->currentMode = pScrn->modes;
-     if(info->MergedFB) {
-        xf86DrvMsg(pScrn->scrnIndex, X_INFO,
-@@ -4818,15 +4963,18 @@ static Bool RADEONPreInitXv(ScrnInfoPtr 
-     return TRUE;
- }
- 
--static void
-+static xf86MonPtr
- RADEONProbeDDC(ScrnInfoPtr pScrn, int indx)
- {
-     vbeInfoPtr  pVbe;
-+    xf86MonPtr monitor;
- 
-     if (xf86LoadSubModule(pScrn, "vbe")) {
- 	pVbe = VBEInit(NULL,indx);
--	ConfiguredMonitor = vbeDoEDID(pVbe, NULL);
--    }
-+	monitor = vbeDoEDID(pVbe, NULL);
-+	return (monitor);
-+    } else
-+	return (NULL);
- }
- 
- _X_EXPORT Bool RADEONPreInit(ScrnInfoPtr pScrn, int flags)
-@@ -4919,7 +5067,7 @@ _X_EXPORT Bool RADEONPreInit(ScrnInfoPtr
-     }
- 
-     if (flags & PROBE_DETECT) {
--	RADEONProbeDDC(pScrn, info->pEnt->index);
-+	ConfiguredMonitor = RADEONProbeDDC(pScrn, info->pEnt->index);
- 	RADEONPostInt10Check(pScrn, int10_save);
- 	if(info->MMIO) RADEONUnmapMMIO(pScrn);
- 	return TRUE;
--- a/open-src/driver/xf86-video-ati/autoconfig2.patch	Mon Mar 17 20:15:29 2008 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,51 +0,0 @@
-# Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
-# Use subject to license terms.
-#
-# Permission is hereby granted, free of charge, to any person obtaining a
-# copy of this software and associated documentation files (the
-# "Software"), to deal in the Software without restriction, including
-# without limitation the rights to use, copy, modify, merge, publish,
-# distribute, and/or sell copies of the Software, and to permit persons
-# to whom the Software is furnished to do so, provided that the above
-# copyright notice(s) and this permission notice appear in all copies of
-# the Software and that both the above copyright notice(s) and this
-# permission notice appear in supporting documentation.
-# 
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
-# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
-# OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
-# HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL
-# INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING
-# FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
-# NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
-# WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-# 
-# Except as contained in this notice, the name of a copyright holder
-# shall not be used in advertising or otherwise to promote the sale, use
-# or other dealings in this Software without prior written authorization
-# of the copyright holder.
-
-In validating CRT, xf86SetDDCproperties() needs to be called to 
-create mode pool to include EDID modes. 
-
---- src/radeon_driver.c	Tue Dec  5 18:09:30 2006
-+++ src/radeon_driver.c	Wed Dec  6 23:57:08 2006
-@@ -3967,7 +3967,7 @@
-      * 'stretched' from their native mode.
-      */
-     if (info->MergeType == MT_CRT && !info->ddc_mode) {
-- 
-+	xf86SetDDCproperties(pScrn, pScrn->monitor->DDC); 
- 	modesFound =
- 	    xf86ValidateModes(pScrn,
- 			      pScrn->monitor->Modes,
-@@ -4235,7 +4235,7 @@
-      * 'stretched' from their native mode.
-      */
-     if (info->DisplayType == MT_CRT && !info->ddc_mode) {
--
-+	xf86SetDDCproperties(pScrn, pScrn->monitor->DDC);
- 	modesFound =
- 	    xf86ValidateModes(pScrn,
- 			      pScrn->monitor->Modes,
--- a/open-src/driver/xf86-video-ati/autoconfig3.patch	Mon Mar 17 20:15:29 2008 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,58 +0,0 @@
-# Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
-# Use subject to license terms.
-#
-# Permission is hereby granted, free of charge, to any person obtaining a
-# copy of this software and associated documentation files (the
-# "Software"), to deal in the Software without restriction, including
-# without limitation the rights to use, copy, modify, merge, publish,
-# distribute, and/or sell copies of the Software, and to permit persons
-# to whom the Software is furnished to do so, provided that the above
-# copyright notice(s) and this permission notice appear in all copies of
-# the Software and that both the above copyright notice(s) and this
-# permission notice appear in supporting documentation.
-# 
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
-# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
-# OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
-# HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL
-# INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING
-# FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
-# NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
-# WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-# 
-# Except as contained in this notice, the name of a copyright holder
-# shall not be used in advertising or otherwise to promote the sale, use
-# or other dealings in this Software without prior written authorization
-# of the copyright holder.
-
-6484245: auto-config: radeon: misc fixes to radeon driver - revision to 6436994
-
-diff -ur src.orig/radeon_mergedfb.c src/radeon_mergedfb.c
---- src.orig/radeon_mergedfb.c	Mon Jan  8 14:26:27 2007
-+++ src/radeon_mergedfb.c	Mon Jan  8 14:28:26 2007
-@@ -212,19 +212,15 @@
-     mode->VSyncEnd += dy;
-     mode->VTotal += dy;
- 
--    /* This is needed for not generating negative refesh rates in xrandr with the
--       faked DotClock below
--     */
--    if (!(mode->VRefresh))
--        mode->VRefresh = mode->Clock * 1000.0 / mode->HTotal / mode->VTotal;
--
--     /* Provide a sophisticated fake DotClock in order to trick the vidmode
-+     /* Provide a fake VRefresh/DotClock in order to trick the vidmode
-       * extension to allow selecting among a number of modes whose merged result
-       * looks identical but consists of different modes for CRT1 and CRT2
-       */
--    mode->Clock = (((i->Clock >> 3) + i->HTotal) << 16) | ((j->Clock >> 2) + j->HTotal);
--    mode->Clock ^= ((i->VTotal << 19) | (j->VTotal << 3));
-+    mode->VRefresh = (float)((i->Clock * 1000.0 / i->HTotal / i->VTotal) * 100 +
-+	(j->Clock * 1000.0 / j->HTotal / j->VTotal));
- 
-+    mode->Clock = (int)(mode->VRefresh * 0.001 * mode->HTotal * mode->VTotal);
-+
-     if( ((mode->HDisplay * ((pScrn->bitsPerPixel + 7) / 8) * mode->VDisplay) > 
- 	(pScrn->videoRam * 1024)) ||
-         (mode->HDisplay > 8191) ||
--- a/open-src/driver/xf86-video-ati/build-dri.patch	Mon Mar 17 20:15:29 2008 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,43 +0,0 @@
-# Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
-# Use subject to license terms.
-#
-# Permission is hereby granted, free of charge, to any person obtaining a
-# copy of this software and associated documentation files (the
-# "Software"), to deal in the Software without restriction, including
-# without limitation the rights to use, copy, modify, merge, publish,
-# distribute, and/or sell copies of the Software, and to permit persons
-# to whom the Software is furnished to do so, provided that the above
-# copyright notice(s) and this permission notice appear in all copies of
-# the Software and that both the above copyright notice(s) and this
-# permission notice appear in supporting documentation.
-# 
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
-# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
-# OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
-# HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL
-# INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING
-# FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
-# NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
-# WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-# 
-# Except as contained in this notice, the name of a copyright holder
-# shall not be used in advertising or otherwise to promote the sale, use
-# or other dealings in this Software without prior written authorization
-# of the copyright holder.
-
---- configure.ac	2006-12-07 01:43:28.000000000 -0800
-+++ configure.ac	2006-12-20 10:18:56.490999000 -0800
-@@ -77,7 +77,11 @@ XORG_DRIVER_CHECK_EXT(DPMSExtension, xex
- 
- # Checks for pkg-config packages
- PKG_CHECK_MODULES(XORG, [xorg-server xproto fontsproto $REQUIRED_MODULES])
--sdkdir=$(pkg-config --variable=sdkdir xorg-server)
-+AC_ARG_WITH(xorg-sdk-dir,
-+            AC_HELP_STRING([--with-xorg-sdk-dir=DIR],
-+                           [Default xorg sdk include directory [[default is taken from pkgconfig]]]),
-+            [sdkdir="$withval"],
-+            [sdkdir=$(pkg-config --variable=sdkdir xorg-server)])
- 
- # Checks for libraries.
- 
--- a/open-src/driver/xf86-video-ati/mapfiles.patch	Mon Mar 17 20:15:29 2008 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,78 +0,0 @@
-# Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
-# Use subject to license terms.
-#
-# Permission is hereby granted, free of charge, to any person obtaining a
-# copy of this software and associated documentation files (the
-# "Software"), to deal in the Software without restriction, including
-# without limitation the rights to use, copy, modify, merge, publish,
-# distribute, and/or sell copies of the Software, and to permit persons
-# to whom the Software is furnished to do so, provided that the above
-# copyright notice(s) and this permission notice appear in all copies of
-# the Software and that both the above copyright notice(s) and this
-# permission notice appear in supporting documentation.
-# 
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
-# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
-# OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
-# HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL
-# INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING
-# FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
-# NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
-# WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-# 
-# Except as contained in this notice, the name of a copyright holder
-# shall not be used in advertising or otherwise to promote the sale, use
-# or other dealings in this Software without prior written authorization
-# of the copyright holder.
-
---- src/Makefile.am	2006-10-03 07:49:13.000000000 -0700
-+++ src/Makefile.am	2007-01-10 18:41:48.343028000 -0800
-@@ -195,3 +195,47 @@
- 	theatre.h \
- 	theatre_reg.h \
- 	atipciids.h
-+
-+
-+# Generate linker mapfiles for symbols found in other modules and use them
-+# and library flag additions to make sure all symbols are resolvable
-+
-+MAPFILES = \
-+	mapfile-ati_drv-external 	\
-+	mapfile-atimisc_drv-external 	\
-+	mapfile-radeon_drv-external 	\
-+	mapfile-r128_drv-external 	\
-+	mapfile-theatre_detect_drv-external
-+
-+BUILT_SOURCES = $(MAPFILES)
-+
-+ati_drv_la_LDFLAGS += \
-+	-Wl,-M,mapfile-atimisc_drv-external \
-+	-Wl,-M,mapfile-radeon_drv-external \
-+	-Wl,-M,mapfile-r128_drv-external
-+
-+atimisc_drv_la_LDFLAGS += \
-+	-Wl,-M,mapfile-ati_drv-external \
-+	-lexa -lfb -lint10 -lshadowfb -lvbe -lxaa -lxf1bpp -lxf4bpp
-+
-+r128_drv_la_LDFLAGS += \
-+	-lfb -lint10 -lshadowfb -lvbe -lvgahw -lxaa -lfbdevhw
-+
-+radeon_drv_la_LDFLAGS += \
-+	-lexa -lfb -lint10 -lvbe -lvgahw -lxaa -lfbdevhw -lm
-+
-+mapfiles: $(MAPFILES)
-+
-+mapfile-ati_drv-external: $(ati_drv_la_OBJECTS)
-+mapfile-atimisc_drv-external: $(atimisc_drv_la_OBJECTS)
-+mapfile-radeon_drv-external: $(radeon_drv_la_OBJECTS)
-+mapfile-r128_drv-external: $(r128_drv_la_OBJECTS)
-+mapfile-theatre_detect_drv-external: $(theatre_detect_drv_la_OBJECTS)
-+
-+mapfile-%-external: 
-+	-rm -f $@
-+	printf '# Functions exported to loadable modules\n\n' > $@
-+	printf '{\n  global:\n' >> $@
-+	/usr/ccs/bin/nm -g $? | grep -v UNDEF | sed -n -e 's/^.*\|FUNC \|GLOB \|.*\|\(.*\)$$/    \1 = FUNCTION extern;/p' -e 's/^.*\|OBJT \|GLOB \|.*\|\(.*\)$$/    \1 = DATA extern;/p' >> $@
-+	printf '};\n' >> $@
-+
--- a/open-src/driver/xf86-video-ati/no-debug.patch	Mon Mar 17 20:15:29 2008 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,14 +0,0 @@
-fix for 6473283
-
-diff -urp -x '*~' src/radeon.h src/radeon.h
---- src/radeon.h	2006-10-03 07:49:13.000000000 -0700
-+++ src/radeon.h	2006-11-03 16:38:52.186691000 -0800
-@@ -172,7 +172,7 @@ typedef struct _region {
- 
- /* ------------------------------------- */
- 
--#define RADEON_DEBUG            1 /* Turn off debugging output               */
-+#define RADEON_DEBUG            0 /* Turn off debugging output               */
- #define RADEON_IDLE_RETRY      16 /* Fall out of idle loops after this count */
- #define RADEON_TIMEOUT    2000000 /* Fall out of wait loops after this count */
- 
--- a/packages/SUNWxorg-doc/prototype_i386	Mon Mar 17 20:15:29 2008 -0700
+++ b/packages/SUNWxorg-doc/prototype_i386	Tue Mar 18 10:20:23 2008 -0700
@@ -29,7 +29,7 @@
 #
 ##########################################################################
 #
-# ident "@(#)prototype_i386 1.13     08/01/11 SMI"
+# ident "@(#)prototype_i386 1.14     08/03/18 SMI"
 #
 # X.Org Foundation X server for Solaris
 
@@ -53,6 +53,7 @@
 
 !search $HOME/share/man/man7
 f none X11/share/man/man7/apm.7 0444 root bin
+f none X11/share/man/man7/ati.7 0444 root bin
 f none X11/share/man/man7/chips.7 0444 root bin
 f none X11/share/man/man7/cirrus.7 0444 root bin
 f none X11/share/man/man7/citron.7 0444 root bin
--- a/packages/SUNWxorg-graphics-ddx/prototype_i386	Mon Mar 17 20:15:29 2008 -0700
+++ b/packages/SUNWxorg-graphics-ddx/prototype_i386	Tue Mar 18 10:20:23 2008 -0700
@@ -29,7 +29,7 @@
 #
 ###########################################################################
 #
-# ident "@(#)prototype_i386 1.15     07/12/03 SMI"
+# ident "@(#)prototype_i386 1.16     08/03/18 SMI"
 #
 # X.Org Foundation X server for Solaris
 
@@ -50,7 +50,6 @@
 f none X11/lib/modules/drivers/ark_drv.so 0755 root bin
 f none X11/lib/modules/drivers/ast_drv.so 0755 root bin
 f none X11/lib/modules/drivers/ati_drv.so 0755 root bin
-f none X11/lib/modules/drivers/atimisc_drv.so 0755 root bin
 f none X11/lib/modules/drivers/chips_drv.so 0755 root bin
 f none X11/lib/modules/drivers/cirrus_alpine.so 0755 root bin
 f none X11/lib/modules/drivers/cirrus_drv.so 0755 root bin
@@ -61,6 +60,7 @@
 f none X11/lib/modules/drivers/i740_drv.so 0755 root bin
 f none X11/lib/modules/drivers/intel_drv.so 0755 root bin
 s none X11/lib/modules/drivers/i810_drv.so=intel_drv.so
+f none X11/lib/modules/drivers/mach64_drv.so 0755 root bin
 f none X11/lib/modules/drivers/mga_drv.so 0755 root bin
 f none X11/lib/modules/drivers/neomagic_drv.so 0755 root bin
 f none X11/lib/modules/drivers/nsc_drv.so 0755 root bin
@@ -86,7 +86,6 @@
 !search $HOME/lib/modules/amd64/drivers
 d none X11/lib/modules/drivers/amd64 0755 root bin
 f none X11/lib/modules/drivers/amd64/ati_drv.so 0755 root bin
-f none X11/lib/modules/drivers/amd64/atimisc_drv.so 0755 root bin
 f none X11/lib/modules/drivers/amd64/cirrus_alpine.so 0755 root bin
 f none X11/lib/modules/drivers/amd64/cirrus_drv.so 0755 root bin
 f none X11/lib/modules/drivers/amd64/cirrus_laguna.so 0755 root bin
@@ -98,6 +97,7 @@
 f none X11/lib/modules/drivers/amd64/ast_drv.so 0755 root bin
 f none X11/lib/modules/drivers/amd64/intel_drv.so 0755 root bin
 s none X11/lib/modules/drivers/amd64/i810_drv.so=intel_drv.so
+f none X11/lib/modules/drivers/amd64/mach64_drv.so 0755 root bin
 f none X11/lib/modules/drivers/amd64/mga_drv.so 0755 root bin
 f none X11/lib/modules/drivers/amd64/nv_drv.so 0755 root bin
 f none X11/lib/modules/drivers/amd64/trident_drv.so 0755 root bin
--- a/packages/SUNWxwman/copyright.add	Mon Mar 17 20:15:29 2008 -0700
+++ b/packages/SUNWxwman/copyright.add	Tue Mar 18 10:20:23 2008 -0700
@@ -87,6 +87,10 @@
 
 include app/xfd/COPYING
 ------------------------------------------------------------------------------
+Files from the app/xfwp package are covered by the following notice:
+
+include app/xfwp/COPYING
+------------------------------------------------------------------------------
 Files from the app/xhost package are covered by the following notice:
 
 include app/xhost/COPYING
--- a/packages/SUNWxwman/prototype_com	Mon Mar 17 20:15:29 2008 -0700
+++ b/packages/SUNWxwman/prototype_com	Tue Mar 18 10:20:23 2008 -0700
@@ -26,7 +26,7 @@
 # or other dealings in this Software without prior written authorization
 # of the copyright holder.
 #
-# ident "@(#)prototype_com 35.63     08/03/07 SMI"
+# ident "@(#)prototype_com 35.64     08/03/18 SMI"
 #
 #  X Window System online user man pages
 
@@ -50,7 +50,6 @@
 
 !search            $HOME/man1
 d none openwin/share/man/man1 0755 root bin
-f none openwin/share/man/man1/xfwp.1 0444 root bin
 f none openwin/share/man/man1/lbxproxy.1 0444 root bin
 f none openwin/share/man/man1/proxymngr.1 0444 root bin
 f none openwin/share/man/man1/xrx.1 0444 root bin
@@ -230,6 +229,9 @@
 # open-src/app/xfd
 f none X11/share/man/man1/xfd.1 	0444 root bin
 
+# open-src/app/xfwp
+f none X11/share/man/man1/xfwp.1 	0444 root bin
+
 # open-src/app/xhost
 f none X11/share/man/man1/xhost.1 	0444 root bin
 
--- a/packages/SUNWxwplt/copyright.add	Mon Mar 17 20:15:29 2008 -0700
+++ b/packages/SUNWxwplt/copyright.add	Tue Mar 18 10:20:23 2008 -0700
@@ -190,6 +190,10 @@
 
 include app/xfd/COPYING
 ------------------------------------------------------------------------------
+Files from the app/xfwp package are covered by the following notice:
+
+include app/xfwp/COPYING
+------------------------------------------------------------------------------
 Files from the app/xhost package are covered by the following notice:
 
 include app/xhost/COPYING
--- a/packages/SUNWxwplt/prototype_com	Mon Mar 17 20:15:29 2008 -0700
+++ b/packages/SUNWxwplt/prototype_com	Tue Mar 18 10:20:23 2008 -0700
@@ -26,7 +26,7 @@
 # or other dealings in this Software without prior written authorization
 # of the copyright holder.
 # 
-#      "@(#)prototype_com	35.169    08/03/12   Sun Microsystems"
+#      "@(#)prototype_com	35.170    08/03/18   Sun Microsystems"
 #
 # X Window System required core package
 
@@ -76,7 +76,6 @@
 #
 f none openwin/bin/lbxproxy     2755 root root
 f none openwin/bin/proxymngr    0755 root bin
-f none openwin/bin/xfwp         0755 root bin
 f none openwin/bin/xkbbell      0755 root bin
 f none openwin/bin/xkbprint     0755 root bin
 f none openwin/bin/xkbvleds     0755 root bin
@@ -122,6 +121,10 @@
 f none X11/bin/xfd 			0755 root bin
 s none openwin/bin/xfd=../../X11/bin/xfd
 
+# open-src/app/xfwp
+f none X11/bin/xfwp 			0755 root bin
+s none openwin/bin/xfwp=../../X11/bin/xfwp
+
 # open-src/app/xhost
 f none X11/bin/xhost 		0755 root bin
 s none openwin/bin/xhost=../../X11/bin/xhost