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

xserver-xorg-video-ati: Changes to 'debian-experimental'



 ChangeLog              |  156 +++++++++++++++++++++++++++
 debian/changelog       |    6 +
 man/r128.man           |    2 
 man/radeon.man         |   14 +-
 src/AtomBios/Decoder.c |    2 
 src/Makefile.am        |    2 
 src/atombios_crtc.c    |   34 ++++-
 src/atombios_output.c  |   66 +++++++++++
 src/legacy_output.c    |   19 ++-
 src/r128_driver.c      |    6 -
 src/radeon.h           |    2 
 src/radeon_atombios.c  |  189 ++++++++++++++++++++++++++-------
 src/radeon_atombios.h  |    5 
 src/radeon_bios.c      |    1 
 src/radeon_crtc.c      |    5 
 src/radeon_driver.c    |   43 +++++--
 src/radeon_modes.c     |   69 +++++++++++-
 src/radeon_output.c    |  278 +++++++++++++++++++++++++++++--------------------
 src/radeon_probe.h     |    2 
 src/radeon_tv.c        |    2 
 20 files changed, 704 insertions(+), 199 deletions(-)

New commits:
commit 204e868de3f224cb3fb20d24e5915609de0b7df9
Author: Brice Goglin <bgoglin@debian.org>
Date:   Wed Jan 9 23:45:14 2008 +0100

    New upstream snapshot

diff --git a/ChangeLog b/ChangeLog
index 1f9cb65..17760f7 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,159 @@
+commit 10e7636c02478b8ffe183bb0c46229ca0d6584e1
+Author: Kristian Høgsberg <krh@bitplanet.net>
+Date:   Wed Jan 9 12:47:39 2008 -0500
+
+    RADEON: fix crtc routing on r4xx cards when using atom to init DVO chip
+
+commit 3af671f5963810dbfd63abc9889b1d46b68f404c
+Author: Alex Deucher <alex@botch2.(none)>
+Date:   Wed Jan 9 11:30:25 2008 -0500
+
+    RADEON: restore FP2 regs before external encoders
+    
+    This may fix krh's dvi problem
+
+commit 2a54c6bb09ade2ec8f998dfc1624017029d47fa3
+Author: Alex Deucher <alex@botch2.(none)>
+Date:   Tue Jan 8 18:43:54 2008 -0500
+
+    RADEON: Make default output actually work...
+
+commit fa3e2055225c27e25465fc46786da1b7574fd3cc
+Author: Alex Deucher <alex@botch2.(none)>
+Date:   Mon Jan 7 01:13:09 2008 -0500
+
+    RADEON: add default outputs if no connected devices
+    
+    If no connected devices found at server startup, default
+    to something so the server comes up.  LVDS on mobility chips,
+    DAC or TMDS on others.
+
+commit d972cc9237eb90b49b11f8d2bdc5b61f628911dc
+Author: Alex Deucher <alex@botch2.(none)>
+Date:   Sat Jan 5 17:19:06 2008 -0500
+
+    RADEON: Fix TVStandard option
+
+commit 45656b9d5a426053da2a094de39c2690c0c6f799
+Author: Alex Deucher <alex@botch2.(none)>
+Date:   Sat Jan 5 12:00:55 2008 -0500
+
+    R128: Like powerpc, don't use VGA by default on sparc
+
+commit b8e8db4675d07e45782de0d7c67ee0fd85eaedb3
+Author: Alex Deucher <alex@t41p.hsd1.va.comcast.net>
+Date:   Fri Jan 4 20:16:19 2008 -0500
+
+    RADEON: fix tvdac load detection at server start up
+
+commit 3ba7f393d0669df36848715799de8affc10a5534
+Author: Alex Deucher <alex@t41p.hsd1.va.comcast.net>
+Date:   Fri Jan 4 20:00:48 2008 -0500
+
+    RADEON: further fixup for pScrn->pScreen issue
+    
+    the previous fix seems to cause the driver to hang on
+    some cards.
+
+commit a0de9c0844f9e066e0f02e8cd8045bdd278e6494
+Author: Alex Deucher <alex@t41p.hsd1.va.comcast.net>
+Date:   Fri Jan 4 19:48:30 2008 -0500
+
+    RADEON: improve ntsc image centering
+
+commit 03d2f25801c8a8ec15030f06008df112d07c1a2d
+Author: Alex Deucher <alex@t41p.hsd1.va.comcast.net>
+Date:   Fri Jan 4 18:19:54 2008 -0500
+
+    RADEON: fix compile
+
+commit 308848783ed9ae27aed7c7de6ee813d375ef495e
+Author: Dave Airlie <airlied@linux.ie>
+Date:   Sat Jan 5 09:11:55 2008 +1000
+
+    i2c: a line mux of 0 is valid
+
+commit 94d5a432f72801f821d1c4ce952baba17552659d
+Author: Dave Airlie <airlied@linux.ie>
+Date:   Fri Jan 4 17:16:54 2008 +1000
+
+    atombios: i2c lines are all done with sw so we can accept any of them.
+    
+    hch reported this working on his laptop with 0x7e60 as EDID for LVDS
+
+commit 2e4473b63d65801ae8ac5a8391de232b2201d958
+Author: Alex Deucher <alex@samba.(none)>
+Date:   Thu Jan 3 15:47:50 2008 -0500
+
+    RADEON: fix crash when setting rotation in the config file
+    
+    xf86CrtcRotate() accesses pScrn->pScreen which is not set
+    during ScreenInit().  This should also be fixed in the server.
+    See bug 12129
+
+commit c652208861bffca94f06b7f67688ce220e050bfb
+Author: Michel Dänzer <michel@tungstengraphics.com>
+Date:   Thu Jan 3 17:54:58 2008 +0100
+
+    radeon: Adapt manpage to reality wrt AGP options.
+
+commit ab451e4b7a5423d61b57cf0646599267d8504af4
+Author: Michel Dänzer <michel@tungstengraphics.com>
+Date:   Thu Jan 3 17:52:39 2008 +0100
+
+    radeon: Miscellaneous warning fixes.
+
+commit 394c52273328e90518568b694ee79dc1a8dab651
+Author: Dave Airlie <airlied@linux.ie>
+Date:   Thu Jan 3 18:56:16 2008 +1000
+
+    r500: tvout avoid doing dpms here it makes my tv mode go all crappy
+    
+    need to investigate further
+
+commit 1c647279f021d01e110980727b7c7dd7efae1642
+Author: Dave Airlie <airlied@linux.ie>
+Date:   Thu Jan 3 11:55:28 2008 +1000
+
+    r600: change devices list depending on connector
+
+commit f36db6e10d32a68b32d20ae4ad02cfc0bfd1c9c3
+Author: Dave Airlie <airlied@linux.ie>
+Date:   Thu Jan 3 11:27:47 2008 +1000
+
+    r600: fixup crash on unknown output type
+    
+    not sure this is 100% the correct approach
+
+commit 1accfdd590828e95e0d68a576c8ee05a06a86e43
+Author: Alex Deucher <alex@samba.(none)>
+Date:   Wed Jan 2 19:48:28 2008 -0500
+
+    RADEON: various avivo tv-out related clean-ups
+
+commit ce34090c758ac91171cb6adb9b8a36e4adbf99cf
+Merge: 2180f04... 30cab1d...
+Author: Alex Deucher <alex@samba.(none)>
+Date:   Wed Jan 2 16:41:36 2008 -0500
+
+    Merge branch 'master' of git+ssh://agd5f@git.freedesktop.org/git/xorg/driver/xf86-video-ati
+
+commit 2180f04b6fb94a638f6274cb4455d5688b324dbc
+Author: Alex Deucher <alex@samba.(none)>
+Date:   Wed Jan 2 16:41:06 2008 -0500
+
+    RADEON: preliminary support for ATOM RMX
+    
+    not functional yet.
+
+commit dab4dc285154d40303aadaa849b85f8e251e578e
+Author: Alex Deucher <alex@samba.(none)>
+Date:   Wed Jan 2 16:27:19 2008 -0500
+
+    RADEON: add support for ATOM component video table
+    
+    Component output is still not working.
+
 commit 30cab1dbebb7bdb925f2fe9f91b84183312bbbfd
 Author: Alex Deucher <alex@botch2.(none)>
 Date:   Wed Jan 2 15:41:01 2008 -0500
diff --git a/debian/changelog b/debian/changelog
index f6df073..65530c9 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+xserver-xorg-video-ati (1:6.7.198~git20080109.10e7636c-1) experimental; urgency=low
+
+  * New upstream snapshot, containing commits up to 10e7636c.
+
+ -- Brice Goglin <bgoglin@debian.org>  Wed, 09 Jan 2008 23:43:53 +0100
+
 xserver-xorg-video-ati (1:6.7.198~git20080102.30cab1db-1) experimental; urgency=low
 
   * New upstream snapshot, containing commits up to 30cab1db.

commit 10e7636c02478b8ffe183bb0c46229ca0d6584e1
Author: Kristian Høgsberg <krh@bitplanet.net>
Date:   Wed Jan 9 12:47:39 2008 -0500

    RADEON: fix crtc routing on r4xx cards when using atom to init DVO chip

diff --git a/src/legacy_output.c b/src/legacy_output.c
index 595b243..45706b9 100644
--- a/src/legacy_output.c
+++ b/src/legacy_output.c
@@ -1230,11 +1230,24 @@ legacy_output_mode_set(xf86OutputPtr output, DisplayModePtr mode,
 	    RADEONRestoreFPRegisters(pScrn, info->ModeReg);
 	} else {
 	    ErrorF("restore FP2\n");
-	    RADEONRestoreFP2Registers(pScrn, info->ModeReg);
-	    if (info->IsAtomBios)
+	    if (info->IsAtomBios) {
+		unsigned char *RADEONMMIO = info->MMIO;
+		CARD32 fp2_gen_cntl;
+
 		atombios_external_tmds_setup(output, mode);
-	    else
+		/* r4xx atom seems to have hard coded crtc mappings in the atom code
+		 * Fix it up here.
+		 */
+		fp2_gen_cntl = INREG(RADEON_FP2_GEN_CNTL) & ~R200_FP2_SOURCE_SEL_MASK;
+		if (radeon_crtc->crtc_id == 1)
+		    fp2_gen_cntl |= R200_FP2_SOURCE_SEL_CRTC2;
+		else
+		    fp2_gen_cntl |= R200_FP2_SOURCE_SEL_CRTC1;
+		OUTREG(RADEON_FP2_GEN_CNTL, fp2_gen_cntl);
+	    } else {
 		RADEONRestoreDVOChip(pScrn, output);
+		RADEONRestoreFP2Registers(pScrn, info->ModeReg);
+	    }
 	}
 	break;
     case MT_STV:

commit 3af671f5963810dbfd63abc9889b1d46b68f404c
Author: Alex Deucher <alex@botch2.(none)>
Date:   Wed Jan 9 11:30:25 2008 -0500

    RADEON: restore FP2 regs before external encoders
    
    This may fix krh's dvi problem

diff --git a/src/legacy_output.c b/src/legacy_output.c
index 4b7fded..595b243 100644
--- a/src/legacy_output.c
+++ b/src/legacy_output.c
@@ -1230,11 +1230,11 @@ legacy_output_mode_set(xf86OutputPtr output, DisplayModePtr mode,
 	    RADEONRestoreFPRegisters(pScrn, info->ModeReg);
 	} else {
 	    ErrorF("restore FP2\n");
+	    RADEONRestoreFP2Registers(pScrn, info->ModeReg);
 	    if (info->IsAtomBios)
 		atombios_external_tmds_setup(output, mode);
 	    else
 		RADEONRestoreDVOChip(pScrn, output);
-	    RADEONRestoreFP2Registers(pScrn, info->ModeReg);
 	}
 	break;
     case MT_STV:

commit 2a54c6bb09ade2ec8f998dfc1624017029d47fa3
Author: Alex Deucher <alex@botch2.(none)>
Date:   Tue Jan 8 18:43:54 2008 -0500

    RADEON: Make default output actually work...

diff --git a/src/radeon.h b/src/radeon.h
index d16a234..bddbc7b 100644
--- a/src/radeon.h
+++ b/src/radeon.h
@@ -727,6 +727,8 @@ typedef struct {
     void (*PointerMoved)(int, int, int);
     CreateScreenResourcesProcPtr CreateScreenResources;
 
+    /* if no devices are connected at server startup */
+    Bool              first_load_no_devices;
 
     Bool              IsSecondary;
     Bool              IsPrimary;
diff --git a/src/radeon_driver.c b/src/radeon_driver.c
index d10d81b..07f96a7 100644
--- a/src/radeon_driver.c
+++ b/src/radeon_driver.c
@@ -2678,6 +2678,7 @@ static Bool RADEONPreInitControllers(ScrnInfoPtr pScrn)
       
     RADEONPrintPortMap(pScrn);
 
+    info->first_load_no_devices = FALSE;
     for (i = 0; i < config->num_output; i++) {
 	xf86OutputPtr	      output = config->output[i];
       
@@ -2694,32 +2695,7 @@ static Bool RADEONPreInitControllers(ScrnInfoPtr pScrn)
     if (!found) {
 	/* nothing connected, light up some defaults so the server comes up */
 	xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "No connected devices found!\n");
-	for (i = 0; i < config->num_output; i++) {
-	    xf86OutputPtr output = config->output[i];
-	    RADEONOutputPrivatePtr radeon_output = output->driver_private;
-
-	    if (info->IsMobility) {
-		if (radeon_output->type == OUTPUT_LVDS) {
-		    radeon_output->MonType = MT_LCD;
-		    output->status = XF86OutputStatusConnected;
-		    xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "Using LVDS default\n");
-		    break;
-		}
-	    } else {
-		if (radeon_output->type == OUTPUT_VGA ||
-		    radeon_output->type == OUTPUT_DVI_I) {
-		    radeon_output->MonType = MT_CRT;
-		    output->status = XF86OutputStatusUnknown;
-		    xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "Using VGA default\n");
-		    break;
-		} else if (radeon_output->type == OUTPUT_DVI_D) {
-		    radeon_output->MonType = MT_DFP;
-		    output->status = XF86OutputStatusUnknown;
-		    xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "Using DVI default\n");
-		    break;
-		}
-	    }
-	}
+	info->first_load_no_devices = TRUE;
     }
 
     ErrorF("finished all detect\n");
diff --git a/src/radeon_output.c b/src/radeon_output.c
index b62eeaf..59e01bb 100644
--- a/src/radeon_output.c
+++ b/src/radeon_output.c
@@ -626,12 +626,36 @@ static xf86OutputStatus
 radeon_detect(xf86OutputPtr output)
 {
     ScrnInfoPtr	    pScrn = output->scrn;
+    RADEONInfoPtr info = RADEONPTR(pScrn);
     RADEONOutputPrivatePtr radeon_output = output->driver_private;
     Bool connected = TRUE;
 
     radeon_output->MonType = MT_UNKNOWN;
     RADEONConnectorFindMonitor(pScrn, output);
 
+    /* nothing connected, light up some defaults so the server comes up */
+    if (radeon_output->MonType == MT_NONE &&
+	info->first_load_no_devices) {
+	if (info->IsMobility) {
+	    if (radeon_output->type == OUTPUT_LVDS) {
+		radeon_output->MonType = MT_LCD;
+		info->first_load_no_devices = FALSE;
+		xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "Using LVDS default\n");
+	    }
+	} else {
+	    if (radeon_output->type == OUTPUT_VGA ||
+		radeon_output->type == OUTPUT_DVI_I) {
+		radeon_output->MonType = MT_CRT;
+		info->first_load_no_devices = FALSE;
+		xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "Using VGA default\n");
+	    } else if (radeon_output->type == OUTPUT_DVI_D) {
+		radeon_output->MonType = MT_DFP;
+		info->first_load_no_devices = FALSE;
+		xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "Using DVI default\n");
+	    }
+	}
+    }
+
     /* set montype so users can force outputs on even if detection fails */
     if (radeon_output->MonType == MT_NONE) {
 	connected = FALSE;

commit fa3e2055225c27e25465fc46786da1b7574fd3cc
Author: Alex Deucher <alex@botch2.(none)>
Date:   Mon Jan 7 01:13:09 2008 -0500

    RADEON: add default outputs if no connected devices
    
    If no connected devices found at server startup, default
    to something so the server comes up.  LVDS on mobility chips,
    DAC or TMDS on others.

diff --git a/src/radeon_driver.c b/src/radeon_driver.c
index 176e80d..d10d81b 100644
--- a/src/radeon_driver.c
+++ b/src/radeon_driver.c
@@ -2653,6 +2653,7 @@ static Bool RADEONPreInitControllers(ScrnInfoPtr pScrn)
     RADEONInfoPtr info = RADEONPTR(pScrn);
     int i;
     int mask;
+    int found = 0;
 
     if (!info->IsPrimary && !info->IsSecondary)
 	mask = 3;
@@ -2677,17 +2678,50 @@ static Bool RADEONPreInitControllers(ScrnInfoPtr pScrn)
       
     RADEONPrintPortMap(pScrn);
 
-    for (i = 0; i < config->num_output; i++) 
-    {
-      xf86OutputPtr	      output = config->output[i];
+    for (i = 0; i < config->num_output; i++) {
+	xf86OutputPtr	      output = config->output[i];
       
-      output->status = (*output->funcs->detect) (output);
-      ErrorF("finished output detect: %d\n", i);
-      if (info->IsPrimary || info->IsSecondary) {
-             if (output->status != XF86OutputStatusConnected)
-	         return FALSE;
-      }
+	output->status = (*output->funcs->detect) (output);
+	ErrorF("finished output detect: %d\n", i);
+	if (info->IsPrimary || info->IsSecondary) {
+	    if (output->status != XF86OutputStatusConnected)
+		return FALSE;
+	}
+	if (output->status != XF86OutputStatusDisconnected)
+	    found++;
+    }
+
+    if (!found) {
+	/* nothing connected, light up some defaults so the server comes up */
+	xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "No connected devices found!\n");
+	for (i = 0; i < config->num_output; i++) {
+	    xf86OutputPtr output = config->output[i];
+	    RADEONOutputPrivatePtr radeon_output = output->driver_private;
+
+	    if (info->IsMobility) {
+		if (radeon_output->type == OUTPUT_LVDS) {
+		    radeon_output->MonType = MT_LCD;
+		    output->status = XF86OutputStatusConnected;
+		    xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "Using LVDS default\n");
+		    break;
+		}
+	    } else {
+		if (radeon_output->type == OUTPUT_VGA ||
+		    radeon_output->type == OUTPUT_DVI_I) {
+		    radeon_output->MonType = MT_CRT;
+		    output->status = XF86OutputStatusUnknown;
+		    xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "Using VGA default\n");
+		    break;
+		} else if (radeon_output->type == OUTPUT_DVI_D) {
+		    radeon_output->MonType = MT_DFP;
+		    output->status = XF86OutputStatusUnknown;
+		    xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "Using DVI default\n");
+		    break;
+		}
+	    }
+	}
     }
+
     ErrorF("finished all detect\n");
     return TRUE;
 }
diff --git a/src/radeon_output.c b/src/radeon_output.c
index b9c8165..b62eeaf 100644
--- a/src/radeon_output.c
+++ b/src/radeon_output.c
@@ -626,7 +626,6 @@ static xf86OutputStatus
 radeon_detect(xf86OutputPtr output)
 {
     ScrnInfoPtr	    pScrn = output->scrn;
-    RADEONInfoPtr info = RADEONPTR(pScrn);
     RADEONOutputPrivatePtr radeon_output = output->driver_private;
     Bool connected = TRUE;
 
@@ -675,6 +674,7 @@ radeon_detect(xf86OutputPtr output)
 	  break;
       }
 
+#if 0
       if (!connected) {
 	  /* default to unknown for flaky chips/connectors
 	   * so we can get something on the screen
@@ -690,6 +690,7 @@ radeon_detect(xf86OutputPtr output)
 	      return XF86OutputStatusUnknown;
 	  }
       }
+#endif
 
       if (connected)
 	  return XF86OutputStatusConnected;
@@ -755,7 +756,6 @@ radeon_create_resources(xf86OutputPtr output)
     INT32 range[2];
     int data, err;
     const char *s;
-    char *optstr;
 
     /* backlight control */
     if (radeon_output->type == OUTPUT_LVDS) {

commit d972cc9237eb90b49b11f8d2bdc5b61f628911dc
Author: Alex Deucher <alex@botch2.(none)>
Date:   Sat Jan 5 17:19:06 2008 -0500

    RADEON: Fix TVStandard option

diff --git a/src/radeon_bios.c b/src/radeon_bios.c
index 9b28b6f..335bdfe 100644
--- a/src/radeon_bios.c
+++ b/src/radeon_bios.c
@@ -523,7 +523,6 @@ Bool RADEONGetTVInfoFromBIOS (xf86OutputPtr output) {
     if (!info->VBIOS) return FALSE;
 
     if (info->IsAtomBios) {
-	/* no idea where TV table is on ATOM bios */
         return RADEONGetATOMTVInfo(output);
     } else {
 	offset = RADEON_BIOS16(info->ROMHeaderStart + 0x32);
diff --git a/src/radeon_output.c b/src/radeon_output.c
index d2c6e2b..b9c8165 100644
--- a/src/radeon_output.c
+++ b/src/radeon_output.c
@@ -951,8 +951,9 @@ radeon_create_resources(xf86OutputPtr output)
 	    xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
 		       "RRConfigureOutputProperty error, %d\n", err);
 	}
+
 	/* Set the current value of the property */
-	switch (radeon_output->default_tvStd) {
+	switch (radeon_output->tvStd) {
 	case TV_STD_PAL:
 	    s = "pal";
 	    break;
@@ -974,25 +975,6 @@ radeon_create_resources(xf86OutputPtr output)
 	    break;
 	}
 
-	optstr = (char *)xf86GetOptValString(info->Options, OPTION_TVSTD);
-	if (optstr) {
-	    if (!strncmp("ntsc", optstr, strlen("ntsc")))
-		radeon_output->tvStd = TV_STD_NTSC;
-	    else if (!strncmp("pal", optstr, strlen("pal")))
-		radeon_output->tvStd = TV_STD_PAL;
-	    else if (!strncmp("pal-m", optstr, strlen("pal-m")))
-		radeon_output->tvStd = TV_STD_PAL_M;
-	    else if (!strncmp("pal-60", optstr, strlen("pal-60")))
-		radeon_output->tvStd = TV_STD_PAL_60;
-	    else if (!strncmp("ntsc-j", optstr, strlen("ntsc-j")))
-		radeon_output->tvStd = TV_STD_NTSC_J;
-	    else if (!strncmp("scart-pal", optstr, strlen("scart-pal")))
-		radeon_output->tvStd = TV_STD_SCART_PAL;
-	    else {
-		xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "Invalid TV Standard: %s\n", optstr);
-	    }
-	}
-
 	err = RRChangeOutputProperty(output->randr_output, tv_std_atom,
 				     XA_STRING, 8, PropModeReplace, strlen(s), (pointer)s,
 				     FALSE, FALSE);
@@ -1662,19 +1644,41 @@ RADEONGetTMDSInfo(xf86OutputPtr output)
 static void
 RADEONGetTVInfo(xf86OutputPtr output)
 {
+    ScrnInfoPtr pScrn = output->scrn;
+    RADEONInfoPtr  info       = RADEONPTR(pScrn);
     RADEONOutputPrivatePtr radeon_output = output->driver_private;
+    char *optstr;
 
     radeon_output->hPos = 0;
     radeon_output->vPos = 0;
     radeon_output->hSize = 0;
 
-    if (RADEONGetTVInfoFromBIOS(output)) return;
+    if (!RADEONGetTVInfoFromBIOS(output)) {
+	/* set some reasonable defaults */
+	radeon_output->default_tvStd = TV_STD_NTSC;
+	radeon_output->tvStd = TV_STD_NTSC;
+	radeon_output->TVRefClk = 27.000000000;
+	radeon_output->SupportedTVStds = TV_STD_NTSC | TV_STD_PAL;
+    }
 
-    /* set some reasonable defaults */
-    radeon_output->default_tvStd = TV_STD_NTSC;
-    radeon_output->tvStd = TV_STD_NTSC;
-    radeon_output->TVRefClk = 27.000000000;
-    radeon_output->SupportedTVStds = TV_STD_NTSC | TV_STD_PAL;
+    optstr = (char *)xf86GetOptValString(info->Options, OPTION_TVSTD);
+    if (optstr) {
+	if (!strncmp("ntsc", optstr, strlen("ntsc")))
+	    radeon_output->tvStd = TV_STD_NTSC;
+	else if (!strncmp("pal", optstr, strlen("pal")))
+	    radeon_output->tvStd = TV_STD_PAL;
+	else if (!strncmp("pal-m", optstr, strlen("pal-m")))
+	    radeon_output->tvStd = TV_STD_PAL_M;
+	else if (!strncmp("pal-60", optstr, strlen("pal-60")))
+	    radeon_output->tvStd = TV_STD_PAL_60;
+	else if (!strncmp("ntsc-j", optstr, strlen("ntsc-j")))
+	    radeon_output->tvStd = TV_STD_NTSC_J;
+	else if (!strncmp("scart-pal", optstr, strlen("scart-pal")))
+	    radeon_output->tvStd = TV_STD_SCART_PAL;
+	else {
+	    xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "Invalid TV Standard: %s\n", optstr);
+	}
+    }
 
 }
 

commit 45656b9d5a426053da2a094de39c2690c0c6f799
Author: Alex Deucher <alex@botch2.(none)>
Date:   Sat Jan 5 12:00:55 2008 -0500

    R128: Like powerpc, don't use VGA by default on sparc

diff --git a/man/r128.man b/man/r128.man
index 32bbaae..709c2fe 100644
--- a/man/r128.man
+++ b/man/r128.man
@@ -136,7 +136,7 @@ shouldn't be if the console is using radeonfb or some other graphic
 mode driver. Some platforms like PowerPC have issues with those, and they aren't
 necessary unless you have a real text mode in console. The default is
 .B off
-on PowerPC and
+on PowerPC and SPARC and
 .B on
 on other architectures.
 
diff --git a/src/r128_driver.c b/src/r128_driver.c
index 6e26a6e..9c41b7b 100644
--- a/src/r128_driver.c
+++ b/src/r128_driver.c
@@ -1376,7 +1376,7 @@ static Bool R128PreInitConfig(ScrnInfoPtr pScrn)
 
 static Bool R128PreInitDDC(ScrnInfoPtr pScrn, xf86Int10InfoPtr pInt10)
 {
-#if !defined(__powerpc__) && !defined(__alpha__)
+#if !defined(__powerpc__) && !defined(__alpha__) && !defined(__sparc__)
     R128InfoPtr   info = R128PTR(pScrn);
     vbeInfoPtr pVbe;
 #endif
@@ -1384,7 +1384,7 @@ static Bool R128PreInitDDC(ScrnInfoPtr pScrn, xf86Int10InfoPtr pInt10)
     if (!xf86LoadSubModule(pScrn, "ddc")) return FALSE;
     xf86LoaderReqSymLists(ddcSymbols, NULL);
 
-#if defined(__powerpc__) || defined(__alpha__)
+#if defined(__powerpc__) || defined(__alpha__) || defined(__sparc__)
     /* Int10 is broken on PPC and some Alphas */
     return TRUE;
 #else
@@ -2127,7 +2127,7 @@ Bool R128PreInit(ScrnInfoPtr pScrn, int flags)
     xf86ProcessOptions(pScrn->scrnIndex, pScrn->options, info->Options);
 
     /* By default, don't do VGA IOs on ppc */
-#if defined(__powerpc__) || !defined(WITH_VGAHW)
+#if defined(__powerpc__) || defined(__sparc__) || !defined(WITH_VGAHW)
     info->VGAAccess = FALSE;
 #else
     info->VGAAccess = TRUE;

commit b8e8db4675d07e45782de0d7c67ee0fd85eaedb3
Author: Alex Deucher <alex@t41p.hsd1.va.comcast.net>
Date:   Fri Jan 4 20:16:19 2008 -0500

    RADEON: fix tvdac load detection at server start up

diff --git a/src/radeon_output.c b/src/radeon_output.c
index c1a0ba8..d2c6e2b 100644
--- a/src/radeon_output.c
+++ b/src/radeon_output.c
@@ -794,12 +794,7 @@ radeon_create_resources(xf86OutputPtr output)
 		       "RRConfigureOutputProperty error, %d\n", err);
 	}
 
-	if (radeon_output->DACType == DAC_PRIMARY)
-	    data = 1; /* primary dac, only drives vga */
-	/*else if (radeon_output->DACType == DAC_TVDAC &&
-		 info->tvdac_use_count < 2)
-		 data = 1;*/ /* only one output with tvdac */
-	else if (xf86ReturnOptValBool(info->Options, OPTION_TVDAC_LOAD_DETECT, FALSE))
+	if (radeon_output->load_detection)
 	    data = 1; /* user forces on tv dac load detection */
 	else
 	    data = 0; /* shared tvdac between vga/dvi/tv */
@@ -1722,6 +1717,9 @@ void RADEONInitConnector(xf86OutputPtr output)
     /*else if (radeon_output->DACType == DAC_TVDAC &&
 	     info->tvdac_use_count < 2)
 	     radeon_output->load_detection = 1;*/ /* only one output with tvdac */
+    else if ((radeon_output->DACType == DAC_TVDAC) &&
+	     (xf86ReturnOptValBool(info->Options, OPTION_TVDAC_LOAD_DETECT, FALSE)))
+	radeon_output->load_detection = 1; /* shared tvdac between vga/dvi/tv */
     else
 	radeon_output->load_detection = 0; /* shared tvdac between vga/dvi/tv */
 

commit 3ba7f393d0669df36848715799de8affc10a5534
Author: Alex Deucher <alex@t41p.hsd1.va.comcast.net>
Date:   Fri Jan 4 20:00:48 2008 -0500

    RADEON: further fixup for pScrn->pScreen issue
    
    the previous fix seems to cause the driver to hang on
    some cards.

diff --git a/src/radeon_driver.c b/src/radeon_driver.c
index 1f12e87..176e80d 100644
--- a/src/radeon_driver.c
+++ b/src/radeon_driver.c
@@ -3181,7 +3181,9 @@ Bool RADEONScreenInit(int scrnIndex, ScreenPtr pScreen,
 {
     ScrnInfoPtr    pScrn = xf86Screens[pScreen->myNum];
     RADEONInfoPtr  info  = RADEONPTR(pScrn);
+    xf86CrtcConfigPtr   xf86_config = XF86_CRTC_CONFIG_PTR(pScrn);
     int            hasDRI = 0;
+    int i;
 #ifdef RENDER
     int            subPixelOrder = SubPixelUnknown;
     char*          s;
@@ -3481,6 +3483,34 @@ Bool RADEONScreenInit(int scrnIndex, ScreenPtr pScreen,
 
     pScrn->vtSema = TRUE;
 
+    /* xf86CrtcRotate() accesses pScrn->pScreen */
+    pScrn->pScreen = pScreen;
+
+#if 1
+    for (i = 0; i < xf86_config->num_crtc; i++) {
+	xf86CrtcPtr crtc = xf86_config->crtc[i];
+
+	/* Mark that we'll need to re-set the mode for sure */
+	memset(&crtc->mode, 0, sizeof(crtc->mode));
+	if (!crtc->desiredMode.CrtcHDisplay) {
+	    crtc->desiredMode = *RADEONCrtcFindClosestMode (crtc, pScrn->currentMode);
+	    crtc->desiredRotation = RR_Rotate_0;
+	    crtc->desiredX = 0;
+	    crtc->desiredY = 0;
+	}
+
+	if (!xf86CrtcSetMode (crtc, &crtc->desiredMode, crtc->desiredRotation, crtc->desiredX, crtc->desiredY))
+	    return FALSE;
+
+    }
+#else
+    /* seems to do the wrong thing on some cards??? */
+    if (!xf86SetDesiredModes (pScrn))
+	return FALSE;
+#endif
+
+    RADEONSaveScreen(pScreen, SCREEN_SAVER_ON);
+
     /* Backing store setup */
     xf86DrvMsgVerb(pScrn->scrnIndex, X_INFO, RADEON_LOGLEVEL_DEBUG,
 		   "Initializing backing store\n");
@@ -3623,6 +3653,9 @@ Bool RADEONScreenInit(int scrnIndex, ScreenPtr pScreen,
     info->CreateScreenResources = pScreen->CreateScreenResources;
     pScreen->CreateScreenResources = RADEONCreateScreenResources;
 
+   if (!xf86CrtcScreenInit (pScreen))
+       return FALSE;
+
     /* Wrap pointer motion to flip touch screen around */
     info->PointerMoved = pScrn->PointerMoved;
     pScrn->PointerMoved = RADEONPointerMoved;
@@ -3639,16 +3672,6 @@ Bool RADEONScreenInit(int scrnIndex, ScreenPtr pScreen,
 #endif
 			     | CMAP_RELOAD_ON_MODE_SWITCH)) return FALSE;
 
-#if 1
-    /* xf86CrtcRotate() accesses pScrn->pScreen */
-    pScrn->pScreen = pScreen;
-
-   if (!xf86CrtcScreenInit (pScreen))
-       return FALSE;
-   if (!xf86SetDesiredModes (pScrn))
-       return FALSE;
-#endif
-
     /* Note unused options */
     if (serverGeneration == 1)
 	xf86ShowUnusedOptions(pScrn->scrnIndex, pScrn->options);

commit a0de9c0844f9e066e0f02e8cd8045bdd278e6494
Author: Alex Deucher <alex@t41p.hsd1.va.comcast.net>
Date:   Fri Jan 4 19:48:30 2008 -0500

    RADEON: improve ntsc image centering

diff --git a/src/radeon_tv.c b/src/radeon_tv.c
index ab95a30..51f21d0 100644
--- a/src/radeon_tv.c
+++ b/src/radeon_tv.c
@@ -619,6 +619,8 @@ static Bool RADEONInitTVRestarts(xf86OutputPtr output, RADEONSavePtr save,
     if (radeon_output->tvStd == TV_STD_NTSC ||
 	radeon_output->tvStd == TV_STD_NTSC_J ||
 	radeon_output->tvStd == TV_STD_PAL_M) {
+	/* improve image centering */
+	hOffset -= 50;
 	p1 = hor_timing_NTSC[ H_TABLE_POS1 ];
 	p2 = hor_timing_NTSC[ H_TABLE_POS2 ];
     } else {

commit 03d2f25801c8a8ec15030f06008df112d07c1a2d
Author: Alex Deucher <alex@t41p.hsd1.va.comcast.net>
Date:   Fri Jan 4 18:19:54 2008 -0500

    RADEON: fix compile

diff --git a/src/radeon_atombios.c b/src/radeon_atombios.c
index 8b31a33..bff164d 100644
--- a/src/radeon_atombios.c
+++ b/src/radeon_atombios.c
@@ -1725,7 +1725,6 @@ RADEONGetATOMConnectorInfoFromBIOSConnectorTable (ScrnInfoPtr pScrn)
 	else
 	    info->BiosConnector[i].ddc_line =
 	        RADEONLookupGPIOLineForDDC(pScrn, ci.sucI2cId.sbfAccess.bfI2C_LineMux);
-	}
 
 	if (i == ATOM_DEVICE_DFP1_INDEX)
 	    info->BiosConnector[i].TMDSType = TMDS_INT;

commit 308848783ed9ae27aed7c7de6ee813d375ef495e
Author: Dave Airlie <airlied@linux.ie>
Date:   Sat Jan 5 09:11:55 2008 +1000

    i2c: a line mux of 0 is valid

diff --git a/src/radeon_atombios.c b/src/radeon_atombios.c
index 73a185b..8b31a33 100644
--- a/src/radeon_atombios.c
+++ b/src/radeon_atombios.c
@@ -1717,17 +1717,14 @@ RADEONGetATOMConnectorInfoFromBIOSConnectorTable (ScrnInfoPtr pScrn)
 	info->BiosConnector[i].ConnectorType = ci.sucConnectorInfo.sbfAccess.bfConnectorType;
 	info->BiosConnector[i].DACType = ci.sucConnectorInfo.sbfAccess.bfAssociatedDAC - 1;
 
-	if (ci.sucI2cId.sbfAccess.bfI2C_LineMux) {
-	    /* don't assign a gpio for tv */
-	    if ((i == ATOM_DEVICE_TV1_INDEX) ||
-		(i == ATOM_DEVICE_TV2_INDEX) ||
-		(i == ATOM_DEVICE_CV_INDEX))
-		info->BiosConnector[i].ddc_line = 0;
-	    else
-		info->BiosConnector[i].ddc_line =
-		    RADEONLookupGPIOLineForDDC(pScrn, ci.sucI2cId.sbfAccess.bfI2C_LineMux);
-	} else {
-	    info->BiosConnector[i].ddc_line = 0;
+	/* don't assign a gpio for tv */
+	if ((i == ATOM_DEVICE_TV1_INDEX) ||
+	    (i == ATOM_DEVICE_TV2_INDEX) ||
+            (i == ATOM_DEVICE_CV_INDEX))
+            info->BiosConnector[i].ddc_line = 0;
+	else
+	    info->BiosConnector[i].ddc_line =
+	        RADEONLookupGPIOLineForDDC(pScrn, ci.sucI2cId.sbfAccess.bfI2C_LineMux);
 	}
 
 	if (i == ATOM_DEVICE_DFP1_INDEX)

commit 94d5a432f72801f821d1c4ce952baba17552659d
Author: Dave Airlie <airlied@linux.ie>
Date:   Fri Jan 4 17:16:54 2008 +1000

    atombios: i2c lines are all done with sw so we can accept any of them.
    
    hch reported this working on his laptop with 0x7e60 as EDID for LVDS

diff --git a/src/radeon_atombios.c b/src/radeon_atombios.c
index 7cf0556..73a185b 100644
--- a/src/radeon_atombios.c
+++ b/src/radeon_atombios.c
@@ -1717,7 +1717,7 @@ RADEONGetATOMConnectorInfoFromBIOSConnectorTable (ScrnInfoPtr pScrn)
 	info->BiosConnector[i].ConnectorType = ci.sucConnectorInfo.sbfAccess.bfConnectorType;
 	info->BiosConnector[i].DACType = ci.sucConnectorInfo.sbfAccess.bfAssociatedDAC - 1;
 
-	if (ci.sucI2cId.sbfAccess.bfHW_Capable) {
+	if (ci.sucI2cId.sbfAccess.bfI2C_LineMux) {
 	    /* don't assign a gpio for tv */
 	    if ((i == ATOM_DEVICE_TV1_INDEX) ||
 		(i == ATOM_DEVICE_TV2_INDEX) ||
@@ -1726,11 +1726,6 @@ RADEONGetATOMConnectorInfoFromBIOSConnectorTable (ScrnInfoPtr pScrn)
 	    else
 		info->BiosConnector[i].ddc_line =
 		    RADEONLookupGPIOLineForDDC(pScrn, ci.sucI2cId.sbfAccess.bfI2C_LineMux);
-	} else if (ci.sucI2cId.sbfAccess.bfI2C_LineMux) {
-	    /* add support for GPIO line */
-	    ErrorF("Unsupported SW GPIO - device %d: gpio line: 0x%x\n",
-		   i, (unsigned int)RADEONLookupGPIOLineForDDC(pScrn, ci.sucI2cId.sbfAccess.bfI2C_LineMux));
-	    info->BiosConnector[i].ddc_line = 0;
 	} else {
 	    info->BiosConnector[i].ddc_line = 0;
 	}

commit 2e4473b63d65801ae8ac5a8391de232b2201d958
Author: Alex Deucher <alex@samba.(none)>
Date:   Thu Jan 3 15:47:50 2008 -0500

    RADEON: fix crash when setting rotation in the config file
    
    xf86CrtcRotate() accesses pScrn->pScreen which is not set
    during ScreenInit().  This should also be fixed in the server.
    See bug 12129

diff --git a/src/radeon_crtc.c b/src/radeon_crtc.c
index 207a5a6..585b452 100644
--- a/src/radeon_crtc.c
+++ b/src/radeon_crtc.c
@@ -361,7 +361,8 @@ static void *
 radeon_crtc_shadow_allocate (xf86CrtcPtr crtc, int width, int height)
 {
     ScrnInfoPtr pScrn = crtc->scrn;
-    ScreenPtr pScreen = pScrn->pScreen;
+    /* if this is called during ScreenInit() we don't have pScrn->pScreen yet */
+    ScreenPtr pScreen = screenInfo.screens[pScrn->scrnIndex];
     RADEONInfoPtr  info = RADEONPTR(pScrn);
     RADEONCrtcPrivatePtr radeon_crtc = crtc->driver_private;
     unsigned long rotate_pitch;
diff --git a/src/radeon_driver.c b/src/radeon_driver.c
index d68b18f..1f12e87 100644
--- a/src/radeon_driver.c
+++ b/src/radeon_driver.c
@@ -3181,9 +3181,7 @@ Bool RADEONScreenInit(int scrnIndex, ScreenPtr pScreen,
 {
     ScrnInfoPtr    pScrn = xf86Screens[pScreen->myNum];
     RADEONInfoPtr  info  = RADEONPTR(pScrn);
-    xf86CrtcConfigPtr   xf86_config = XF86_CRTC_CONFIG_PTR(pScrn);
     int            hasDRI = 0;
-    int i;
 #ifdef RENDER
     int            subPixelOrder = SubPixelUnknown;
     char*          s;
@@ -3483,27 +3481,6 @@ Bool RADEONScreenInit(int scrnIndex, ScreenPtr pScreen,
 
     pScrn->vtSema = TRUE;
 
-    for (i = 0; i < xf86_config->num_crtc; i++) {
-	xf86CrtcPtr	crtc = xf86_config->crtc[i];
-	    
-	/* Mark that we'll need to re-set the mode for sure */
-	memset(&crtc->mode, 0, sizeof(crtc->mode));
-	if (!crtc->desiredMode.CrtcHDisplay) {
-	    crtc->desiredMode = *RADEONCrtcFindClosestMode (crtc, pScrn->currentMode);
-	    crtc->desiredRotation = RR_Rotate_0;
-	    crtc->desiredX = 0;
-	    crtc->desiredY = 0;
-	}
-
-	if (!xf86CrtcSetMode (crtc, &crtc->desiredMode, crtc->desiredRotation, crtc->desiredX, crtc->desiredY))
-	    return FALSE;
-
-    }
-
-    RADEONSaveScreen(pScreen, SCREEN_SAVER_ON);
-
-    //    pScrn->AdjustFrame(scrnIndex, pScrn->frameX0, pScrn->frameY0, 0);
-
     /* Backing store setup */
     xf86DrvMsgVerb(pScrn->scrnIndex, X_INFO, RADEON_LOGLEVEL_DEBUG,
 		   "Initializing backing store\n");
@@ -3646,9 +3623,6 @@ Bool RADEONScreenInit(int scrnIndex, ScreenPtr pScreen,
     info->CreateScreenResources = pScreen->CreateScreenResources;
     pScreen->CreateScreenResources = RADEONCreateScreenResources;
 
-   if (!xf86CrtcScreenInit (pScreen))
-       return FALSE;
-
     /* Wrap pointer motion to flip touch screen around */
     info->PointerMoved = pScrn->PointerMoved;
     pScrn->PointerMoved = RADEONPointerMoved;
@@ -3665,6 +3639,16 @@ Bool RADEONScreenInit(int scrnIndex, ScreenPtr pScreen,
 #endif
 			     | CMAP_RELOAD_ON_MODE_SWITCH)) return FALSE;
 
+#if 1
+    /* xf86CrtcRotate() accesses pScrn->pScreen */
+    pScrn->pScreen = pScreen;
+
+   if (!xf86CrtcScreenInit (pScreen))
+       return FALSE;
+   if (!xf86SetDesiredModes (pScrn))
+       return FALSE;
+#endif
+
     /* Note unused options */
     if (serverGeneration == 1)
 	xf86ShowUnusedOptions(pScrn->scrnIndex, pScrn->options);

commit c652208861bffca94f06b7f67688ce220e050bfb
Author: Michel Dänzer <michel@tungstengraphics.com>
Date:   Thu Jan 3 17:54:58 2008 +0100

    radeon: Adapt manpage to reality wrt AGP options.

diff --git a/man/radeon.man b/man/radeon.man
index 141342e..b8f4f93 100644
--- a/man/radeon.man
+++ b/man/radeon.man
@@ -154,26 +154,28 @@ The default value is either 1536 (for most chips) or 1920.
 Set AGP data transfer rate.
 (used only when DRI is enabled)
 .br
-1      \-\- 1x (before AGPv3 only)
+1      \-\- 1x (before AGP v3 only)
 .br


Reply to: