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

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



 ChangeLog                         |  167 +++++++++++++
 configure.ac                      |    2 
 debian/changelog                  |    7 
 src/ati_pciids_gen.h              |    5 
 src/atombios_output.c             |  479 +++++++++++++++++++-------------------
 src/pcidb/ati_pciids.csv          |   15 -
 src/r600_exa.c                    |   11 
 src/r600_textured_videofuncs.c    |    1 
 src/r6xx_accel.c                  |    2 
 src/radeon_atombios.c             |    2 
 src/radeon_chipinfo_gen.h         |    5 
 src/radeon_chipset_gen.h          |   15 -
 src/radeon_dri.c                  |   22 +
 src/radeon_driver.c               |   12 
 src/radeon_exa_render.c           |   16 -
 src/radeon_output.c               |    5 
 src/radeon_pci_chipset_gen.h      |    5 
 src/radeon_pci_device_match_gen.h |    5 
 src/radeon_probe.c                |    3 
 src/radeon_tv.c                   |    2 
 20 files changed, 511 insertions(+), 270 deletions(-)

New commits:
commit 5e998e05652e64881c103c99138457161c34d468
Author: Brice Goglin <bgoglin@debian.org>
Date:   Thu Sep 10 07:40:18 2009 +0200

    Prepare changelog for upload

diff --git a/debian/changelog b/debian/changelog
index 8063489..d0597aa 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,9 +1,9 @@
-xserver-xorg-video-ati (1:6.12.3-1) UNRELEASED; urgency=low
+xserver-xorg-video-ati (1:6.12.3-1) unstable; urgency=low
 
   * New upstream release.
     + More AGP quirks, closes: #545040.
 
- -- Brice Goglin <bgoglin@debian.org>  Thu, 10 Sep 2009 07:33:28 +0200
+ -- Brice Goglin <bgoglin@debian.org>  Thu, 10 Sep 2009 07:40:14 +0200
 
 xserver-xorg-video-ati (1:6.12.2-3) unstable; urgency=low
 

commit 1da441c95702f86fd4c9431faaafd05f31d3257d
Author: Brice Goglin <bgoglin@debian.org>
Date:   Thu Sep 10 07:39:47 2009 +0200

    New upstream release

diff --git a/ChangeLog b/ChangeLog
index adebbb7..25241ab 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,170 @@
+commit 9589d19eb8cbf7b1a978c7ea3eaacb328fb48cd8
+Author: Dave Airlie <airlied@redhat.com>
+Date:   Thu Sep 10 13:02:26 2009 +1000
+
+    ati 6.12.3
+
+commit 1c09cdd8d23c6f79640b5b653e799089798eea2a
+Author: Dave Airlie <airlied@redhat.com>
+Date:   Tue Jul 28 15:22:40 2009 +1000
+
+    ati: change to using ABI version check
+    (cherry picked from commit 63c873cbd4d1d21d9f688028c0900c79fadc42c1)
+
+commit 034b6d057cd62ce60961d4f7b3fa4e9eb35c9626
+Author: Dave Airlie <airlied@redhat.com>
+Date:   Tue Jul 28 13:32:28 2009 +1000
+
+    ati: update for resources/RAC API removal
+    (cherry picked from commit 21a621c297ac71c65c239ea960c38706e718b91c)
+
+commit b0de26fb70a21f03a66e192913a571dcf0ac616f
+Author: Alex Deucher <alexdeucher@gmail.com>
+Date:   Sun Sep 6 10:53:29 2009 -0400
+
+    RV280: add agp quirk
+    
+    deb bug 545040
+
+commit a2968896884545f5c8f3f16c398c1ee4534ad7a8
+Author: Alex Deucher <alexdeucher@gmail.com>
+Date:   Tue Aug 25 11:39:56 2009 -0400
+
+    RV740: disable small DFS transfers
+    
+    Seems problematic on all rv740 chips, so until we
+    can find a solution, disable them.
+
+commit 4a2f0022373b553c922e63c84f2de82a5426a1b5
+Author: Dave Airlie <airlied@redhat.com>
+Date:   Mon Aug 24 14:11:24 2009 +1000
+
+    r600: fix bad unit in texture setup
+
+commit 7d91ae120894dec5361d7ac5a981749fa96eed0e
+Author: Dave Airlie <airlied@redhat.com>
+Date:   Mon Aug 17 15:50:21 2009 +1000
+
+    radeon: move detected monitor type debugging.
+    
+    We should print this after DAC detection to be useful for TV
+
+commit db7af4cf56a60228110f60f6dc49931f28548cff
+Author: Dave Airlie <airlied@redhat.com>
+Date:   Mon Aug 17 15:31:16 2009 +1000
+
+    atom: recall crtc source script after tv dpms on
+    
+    For some reason we lost the DACB source when we dpms tv back on.
+
+commit 2647a20eb4ece70ce668234129220a3e43f324fa
+Author: Dave Airlie <airlied@redhat.com>
+Date:   Mon Aug 17 15:25:17 2009 +1000
+
+    atombios: store dac detect result into save register.
+    
+    We end up writing back an empty save register over the dac
+    detection results so the atombios table can no longer
+    figure out the S-video vs composite so sets the wrong one up.
+    
+    this gets tv-out on my r580 with a composite connector working.
+
+commit d22557069e1691dbb998015f286ab3a8331f486b
+Author: Dave Airlie <airlied@redhat.com>
+Date:   Mon Aug 17 13:44:20 2009 +1000
+
+    atom/tvout: set the correct scaler up for tv out
+    
+    If we need to use the second scaler actually set the second scaler
+    up.
+
+commit dc9799c94c7f2c7f16e09de03376936e24b4e17f
+Author: Dave Airlie <airlied@redhat.com>
+Date:   Mon Aug 17 12:17:31 2009 +1000
+
+    r100/r200: dont emit wrong clamp modes.
+    
+    for rect textures you don't want to use wrap clamping which
+    is the default.
+
+commit c71efd81b070fc9fee862dce02391e42b6524405
+Author: Dave Airlie <airlied@itt42.(none)>
+Date:   Mon Aug 17 09:38:09 2009 +1000
+
+    radeon/tv: fix typo in crtc register modifications
+
+commit dcfecf624a43bbe2c24d03505c4e6cb755dd3b44
+Author: Adam Jackson <ajax@redhat.com>
+Date:   Mon Aug 10 13:59:49 2009 -0400
+
+    Fix misleading filenames in DRI setup failure messages
+
+commit 2fee5d4925f1ac031f37577c66a148d6e5e8d161
+Author: Alex Deucher <alexdeucher@gmail.com>
+Date:   Tue Aug 11 15:29:17 2009 -0400
+
+    RV280: add agp quirk
+    
+    from Hartmut Niemann
+
+commit 9a6cf3c145e1a42f50f8f1a85a4bea5ceeb98578
+Author: Alex Deucher <alexdeucher@gmail.com>
+Date:   Tue Aug 4 11:16:05 2009 -0400
+
+    RS880: enable accel
+
+commit 7c317c6cd8762429743b6d1f62312b35971f7841
+Author: Alex Deucher <alexdeucher@gmail.com>
+Date:   Mon Aug 3 15:55:04 2009 -0400
+
+    radeon: add some new r7xx pci ids
+
+commit 1dd67e5bcd4ee760926fb5bd90fa519060a22577
+Author: Bryce Harrington <bryce@canonical.com>
+Date:   Sat Aug 1 16:50:43 2009 -0400
+
+    radeon: AGPMode quirk needed for SiS
+    
+    fixes bug 23065
+
+commit 35a44bfa8fd6f2e5c7d45162c38a5c9f50c61452
+Author: Bryce Harrington <bryce@canonical.com>
+Date:   Sat Aug 1 16:48:48 2009 -0400
+
+    radeon: AGPMode quirk needed for IBM Thinkpad T40 with Mobility M7 LW
+    
+    fixes bug 23064
+
+commit fc0cdcc3d287228242f0b5d3dad464f0440fe590
+Author: Bryce Harrington <bryce@canonical.com>
+Date:   Sat Aug 1 16:41:41 2009 -0400
+
+    radeon: AGPMode quirk needed for HP Omnibook 6200
+    
+    fixed bug 23063
+
+commit 0a03220810a5fa4eec3f16c3c25bd42dd3b31f1c
+Author: Dave Airlie <airlied@redhat.com>
+Date:   Thu Jul 30 09:54:01 2009 +1000
+
+    radeon: fix r600 shadow fb mode with cursor allocation in wrong place
+    
+    From RHEL QE testing, we could end up with the cursor at 0 since
+    we think EXA is in use when really it isn't. the info->useEXA = FALSe
+    might be unnecessary but better to be explicit
+    
+    stable: fix slightly different
+    
+    Signed-off-by: Dave Airlie <airlied@redhat.com>
+
+commit a8225ce61a26bd310b3d649a33e9687cf9626858
+Author: Alex Deucher <alexdeucher@gmail.com>
+Date:   Wed Jul 29 03:34:11 2009 -0400
+
+    radeon: fix typo in object header to connector type conversion
+    
+    Should fix bug 19943
+
 commit b1f005bf16064db62ae35d362f69250427a45b3b
 Author: Alex Deucher <alexdeucher@gmail.com>
 Date:   Sat Jul 25 14:19:38 2009 -0400
diff --git a/debian/changelog b/debian/changelog
index e0aeb22..8063489 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,10 @@
+xserver-xorg-video-ati (1:6.12.3-1) UNRELEASED; urgency=low
+
+  * New upstream release.
+    + More AGP quirks, closes: #545040.
+
+ -- Brice Goglin <bgoglin@debian.org>  Thu, 10 Sep 2009 07:33:28 +0200
+
 xserver-xorg-video-ati (1:6.12.2-3) unstable; urgency=low
 
   * Pull upstream commits from 6.12-branch up to commit b1f005bf:

commit 9589d19eb8cbf7b1a978c7ea3eaacb328fb48cd8
Author: Dave Airlie <airlied@redhat.com>
Date:   Thu Sep 10 13:02:26 2009 +1000

    ati 6.12.3

diff --git a/configure.ac b/configure.ac
index 709fb19..7c113e9 100644
--- a/configure.ac
+++ b/configure.ac
@@ -22,7 +22,7 @@
 
 AC_PREREQ(2.57)
 AC_INIT([xf86-video-ati],
-        6.12.2,
+        6.12.3,
         [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg],
         xf86-video-ati)
 

commit 1c09cdd8d23c6f79640b5b653e799089798eea2a
Author: Dave Airlie <airlied@redhat.com>
Date:   Tue Jul 28 15:22:40 2009 +1000

    ati: change to using ABI version check
    (cherry picked from commit 63c873cbd4d1d21d9f688028c0900c79fadc42c1)

diff --git a/src/radeon_driver.c b/src/radeon_driver.c
index 9488666..9d8bd39 100644
--- a/src/radeon_driver.c
+++ b/src/radeon_driver.c
@@ -93,7 +93,7 @@
 #include "xf86.h"
 #include "xf86_OSproc.h"
 #include "xf86RandR12.h"
-#ifndef XSERVER_LIBPCIACCESS
+#if GET_ABI_MAJOR(ABI_VIDEODRV_VERSION) < 6
 #include "xf86RAC.h"
 #include "xf86Resources.h"
 #endif
diff --git a/src/radeon_probe.c b/src/radeon_probe.c
index 234d292..d5f9a14 100644
--- a/src/radeon_probe.c
+++ b/src/radeon_probe.c
@@ -44,7 +44,7 @@
 #include "atipcirename.h"
 
 #include "xf86.h"
-#ifndef XSERVER_LIBPCIACCESS
+#if GET_ABI_MAJOR(ABI_VIDEODRV_VERSION) < 6
 #include "xf86Resources.h"
 #endif
 

commit 034b6d057cd62ce60961d4f7b3fa4e9eb35c9626
Author: Dave Airlie <airlied@redhat.com>
Date:   Tue Jul 28 13:32:28 2009 +1000

    ati: update for resources/RAC API removal
    (cherry picked from commit 21a621c297ac71c65c239ea960c38706e718b91c)

diff --git a/src/radeon_driver.c b/src/radeon_driver.c
index 056ff29..9488666 100644
--- a/src/radeon_driver.c
+++ b/src/radeon_driver.c
@@ -92,9 +92,11 @@
 				/* X and server generic header files */
 #include "xf86.h"
 #include "xf86_OSproc.h"
-#include "xf86RAC.h"
 #include "xf86RandR12.h"
+#ifndef XSERVER_LIBPCIACCESS
+#include "xf86RAC.h"
 #include "xf86Resources.h"
+#endif
 #include "xf86cmap.h"
 #include "vbe.h"
 
@@ -2873,12 +2875,14 @@ Bool RADEONPreInit(ScrnInfoPtr pScrn, int flags)
 	       PCI_DEV_DEV(info->PciInfo),
 	       PCI_DEV_FUNC(info->PciInfo));
 
+#ifndef XSERVER_LIBPCIACCESS
     if (xf86RegisterResources(info->pEnt->index, 0, ResExclusive))
 	goto fail;
 
     xf86SetOperatingState(resVga, info->pEnt->index, ResUnusedOpr);
 
     pScrn->racMemFlags = RAC_FB | RAC_COLORMAP | RAC_VIEWPORT | RAC_CURSOR;
+#endif
     pScrn->monitor     = pScrn->confScreen->monitor;
 
    /* Allocate an xf86CrtcConfig */
diff --git a/src/radeon_probe.c b/src/radeon_probe.c
index 041bab6..234d292 100644
--- a/src/radeon_probe.c
+++ b/src/radeon_probe.c
@@ -44,12 +44,15 @@
 #include "atipcirename.h"
 
 #include "xf86.h"
+#ifndef XSERVER_LIBPCIACCESS
 #include "xf86Resources.h"
+#endif
 
 #include "radeon_chipset_gen.h"
 
 #include "radeon_pci_chipset_gen.h"
 
+
 #ifdef XSERVER_LIBPCIACCESS
 #include "radeon_pci_device_match_gen.h"
 #endif

commit b0de26fb70a21f03a66e192913a571dcf0ac616f
Author: Alex Deucher <alexdeucher@gmail.com>
Date:   Sun Sep 6 10:53:29 2009 -0400

    RV280: add agp quirk
    
    deb bug 545040

diff --git a/src/radeon_dri.c b/src/radeon_dri.c
index 8a7ed83..d67d649 100644
--- a/src/radeon_dri.c
+++ b/src/radeon_dri.c
@@ -800,7 +800,9 @@ static radeon_agpmode_quirk radeon_agpmode_quirk_list[] = {
     /* VIA VT8377 Host Bridge / RV280 Needs AGPMode 4 (ati ML) */
     { PCI_VENDOR_VIA,0x3189,    PCI_VENDOR_ATI,0x5964,  0x148c,0x2073,           4 },
     /* VIA VT8377 Host Bridge / RV280 Needs AGPMode 4 (fdo #12544) */
-    { PCI_VENDOR_VIA,0x3189,    PCI_VENDOR_ATI,0x5964,  0x1043,0xc008,           4 },
+    { PCI_VENDOR_VIA,0x3189,    PCI_VENDOR_ATI,0x5964,  PCI_VENDOR_ASUS,0xc008,  4 },
+    /* VIA VT8377 Host Bridge / RV280 Needs AGPMode 4 (deb #545040) */
+    { PCI_VENDOR_VIA,0x3189,    PCI_VENDOR_ATI,0x5960,  PCI_VENDOR_ASUS,0x004c,  4 },
 
     /* ATI Host Bridge / RV280 [M9+] Needs AGPMode 1 (phoronix forum) */
     { PCI_VENDOR_ATI,0xcbb2,    PCI_VENDOR_ATI,0x5c61,  PCI_VENDOR_SONY,0x8175,  1 },

commit a2968896884545f5c8f3f16c398c1ee4534ad7a8
Author: Alex Deucher <alexdeucher@gmail.com>
Date:   Tue Aug 25 11:39:56 2009 -0400

    RV740: disable small DFS transfers
    
    Seems problematic on all rv740 chips, so until we
    can find a solution, disable them.

diff --git a/src/r600_exa.c b/src/r600_exa.c
index 77e94ea..bee8f09 100644
--- a/src/r600_exa.c
+++ b/src/r600_exa.c
@@ -1847,6 +1847,10 @@ R600DownloadFromScreen(PixmapPtr pSrc, int x, int y, int w, int h,
     int wpass = w * (bpp/8);
     drmBufPtr scratch;
 
+    /* RV740 seems to be particularly problematic with small xfers */
+    if ((info->ChipFamily == CHIP_FAMILY_RV740) && (w < 32 || h < 32))
+	return FALSE;
+
     if (src_pitch & 7)
 	return FALSE;
 

commit 4a2f0022373b553c922e63c84f2de82a5426a1b5
Author: Dave Airlie <airlied@redhat.com>
Date:   Mon Aug 24 14:11:24 2009 +1000

    r600: fix bad unit in texture setup

diff --git a/src/r600_exa.c b/src/r600_exa.c
index 9b80ed2..77e94ea 100644
--- a/src/r600_exa.c
+++ b/src/r600_exa.c
@@ -1109,10 +1109,10 @@ static Bool R600TextureSetup(PicturePtr pPict, PixmapPtr pPix,
     accel_state->src_pitch[unit] = exaGetPixmapPitch(pPix) / (pPix->drawable.bitsPerPixel / 8);
     accel_state->src_size[unit] = exaGetPixmapPitch(pPix) * pPix->drawable.height;
 
-    if (accel_state->src_pitch[1] & 7)
+    if (accel_state->src_pitch[unit] & 7)
 	RADEON_FALLBACK(("Bad pitch %d 0x%x\n", (int)accel_state->src_pitch[unit], unit));
 
-    if (accel_state->src_mc_addr[1] & 0xff)
+    if (accel_state->src_mc_addr[unit] & 0xff)
 	RADEON_FALLBACK(("Bad offset %d 0x%x\n", (int)accel_state->src_mc_addr[unit], unit));
 
     for (i = 0; i < sizeof(R600TexFormats) / sizeof(R600TexFormats[0]); i++) {

commit 7d91ae120894dec5361d7ac5a981749fa96eed0e
Author: Dave Airlie <airlied@redhat.com>
Date:   Mon Aug 17 15:50:21 2009 +1000

    radeon: move detected monitor type debugging.
    
    We should print this after DAC detection to be useful for TV

diff --git a/src/radeon_output.c b/src/radeon_output.c
index ee8de6a..acba31f 100644
--- a/src/radeon_output.c
+++ b/src/radeon_output.c
@@ -274,9 +274,6 @@ radeon_ddc_connected(xf86OutputPtr output)
     } else
 	MonType = MT_NONE;
 
-    xf86DrvMsg(pScrn->scrnIndex, X_INFO,
-	       "Output: %s, Detected Monitor Type: %d\n", output->name, MonType);
-
     return MonType;
 }
 
@@ -995,6 +992,8 @@ radeon_detect(xf86OutputPtr output)
     }
 
 
+    xf86DrvMsg(pScrn->scrnIndex, X_INFO,
+	       "Output: %s, Detected Monitor Type: %d\n", output->name, radeon_output->MonType);
     if (output->MonInfo) {
 	xf86DrvMsg(pScrn->scrnIndex, X_INFO, "EDID data from the display on output: %s ----------------------\n",
 		   output->name);

commit db7af4cf56a60228110f60f6dc49931f28548cff
Author: Dave Airlie <airlied@redhat.com>
Date:   Mon Aug 17 15:31:16 2009 +1000

    atom: recall crtc source script after tv dpms on
    
    For some reason we lost the DACB source when we dpms tv back on.

diff --git a/src/atombios_output.c b/src/atombios_output.c
index d4baa55..e6ef025 100644
--- a/src/atombios_output.c
+++ b/src/atombios_output.c
@@ -60,6 +60,8 @@ const char *device_name[12] = {
     "DFP5",
 };
 
+static void atombios_set_output_crtc_source(xf86OutputPtr output);
+
 static int
 atombios_output_dac_setup(xf86OutputPtr output, int action)
 {
@@ -1275,6 +1277,9 @@ atombios_output_dpms(xf86OutputPtr output, int mode)
 		ErrorF("Output %s enable failed\n",
 		       device_name[radeon_get_device_index(radeon_output->active_device)]);
 	}
+	/* at least for TV atom fails to reassociate the correct crtc source at dpms on */
+	if (radeon_output->active_device & (ATOM_DEVICE_TV_SUPPORT))
+		atombios_set_output_crtc_source(output);
 	break;
     case DPMSModeStandby:
     case DPMSModeSuspend:

commit 2647a20eb4ece70ce668234129220a3e43f324fa
Author: Dave Airlie <airlied@redhat.com>
Date:   Mon Aug 17 15:25:17 2009 +1000

    atombios: store dac detect result into save register.
    
    We end up writing back an empty save register over the dac
    detection results so the atombios table can no longer
    figure out the S-video vs composite so sets the wrong one up.
    
    this gets tv-out on my r580 with a composite connector working.

diff --git a/src/atombios_output.c b/src/atombios_output.c
index 63b2c36..d4baa55 100644
--- a/src/atombios_output.c
+++ b/src/atombios_output.c
@@ -1604,7 +1604,7 @@ atombios_dac_detect(xf86OutputPtr output)
     RADEONOutputPrivatePtr radeon_output = output->driver_private;
     RADEONMonitorType MonType = MT_NONE;
     AtomBiosResult ret;
-    uint32_t bios_0_scratch;
+    RADEONSavePtr save = info->ModeReg;
 
     if (radeon_output->devices & ATOM_DEVICE_TV1_SUPPORT) {
 	if (xf86ReturnOptValBool(info->Options, OPTION_FORCE_TVOUT, FALSE)) {
@@ -1618,24 +1618,24 @@ atombios_dac_detect(xf86OutputPtr output)
     ret = atom_bios_dac_load_detect(info->atomBIOS, output);
     if (ret == ATOM_SUCCESS) {
 	if (info->ChipFamily >= CHIP_FAMILY_R600)
-	    bios_0_scratch = INREG(R600_BIOS_0_SCRATCH);
+	    save->bios_0_scratch = INREG(R600_BIOS_0_SCRATCH);
 	else
-	    bios_0_scratch = INREG(RADEON_BIOS_0_SCRATCH);
-	/*ErrorF("DAC connect %08X\n", (unsigned int)bios_0_scratch);*/
+	    save->bios_0_scratch = INREG(RADEON_BIOS_0_SCRATCH);
+	/*ErrorF("DAC connect %08X\n", (unsigned int)save->bios_0_scratch);*/
 
 	if (radeon_output->devices & ATOM_DEVICE_CRT1_SUPPORT) {
-	    if (bios_0_scratch & ATOM_S0_CRT1_MASK)
+	    if (save->bios_0_scratch & ATOM_S0_CRT1_MASK)
 		MonType = MT_CRT;
 	} else if (radeon_output->devices & ATOM_DEVICE_CRT2_SUPPORT) {
-	    if (bios_0_scratch & ATOM_S0_CRT2_MASK)
+	    if (save->bios_0_scratch & ATOM_S0_CRT2_MASK)
 		MonType = MT_CRT;
 	} else if (radeon_output->devices & ATOM_DEVICE_CV_SUPPORT) {
-	    if (bios_0_scratch & (ATOM_S0_CV_MASK | ATOM_S0_CV_MASK_A))
+	    if (save->bios_0_scratch & (ATOM_S0_CV_MASK | ATOM_S0_CV_MASK_A))
 		MonType = MT_CV;
 	} else if (radeon_output->devices & ATOM_DEVICE_TV1_SUPPORT) {
-	    if (bios_0_scratch & (ATOM_S0_TV1_COMPOSITE | ATOM_S0_TV1_COMPOSITE_A))
+	    if (save->bios_0_scratch & (ATOM_S0_TV1_COMPOSITE | ATOM_S0_TV1_COMPOSITE_A))
 		MonType = MT_CTV;
-	    else if (bios_0_scratch & (ATOM_S0_TV1_SVIDEO | ATOM_S0_TV1_SVIDEO_A))
+	    else if (save->bios_0_scratch & (ATOM_S0_TV1_SVIDEO | ATOM_S0_TV1_SVIDEO_A))
 		MonType = MT_STV;
 	}
     }

commit d22557069e1691dbb998015f286ab3a8331f486b
Author: Dave Airlie <airlied@redhat.com>
Date:   Mon Aug 17 13:44:20 2009 +1000

    atom/tvout: set the correct scaler up for tv out
    
    If we need to use the second scaler actually set the second scaler
    up.

diff --git a/src/atombios_output.c b/src/atombios_output.c
index 158e76f..63b2c36 100644
--- a/src/atombios_output.c
+++ b/src/atombios_output.c
@@ -766,234 +766,238 @@ atombios_output_dig_transmitter_setup(xf86OutputPtr output, int action)
 
 }
 
-static void atom_rv515_force_tv_scaler(ScrnInfoPtr pScrn)
+static void atom_rv515_force_tv_scaler(ScrnInfoPtr pScrn, RADEONCrtcPrivatePtr radeon_crtc)
 {
     RADEONInfoPtr info       = RADEONPTR(pScrn);
     unsigned char *RADEONMMIO = info->MMIO;
-
-    OUTREG(0x659C,0x0);
-    OUTREG(0x6594,0x705);
-    OUTREG(0x65A4,0x10001);
-    OUTREG(0x65D8,0x0);
-    OUTREG(0x65B0,0x0);
-    OUTREG(0x65C0,0x0);
-    OUTREG(0x65D4,0x0);
-    OUTREG(0x6578,0x0);
-    OUTREG(0x657C,0x841880A8);
-    OUTREG(0x6578,0x1);
-    OUTREG(0x657C,0x84208680);
-    OUTREG(0x6578,0x2);
-    OUTREG(0x657C,0xBFF880B0);
-    OUTREG(0x6578,0x100);
-    OUTREG(0x657C,0x83D88088);
-    OUTREG(0x6578,0x101);
-    OUTREG(0x657C,0x84608680);
-    OUTREG(0x6578,0x102);
-    OUTREG(0x657C,0xBFF080D0);
-    OUTREG(0x6578,0x200);
-    OUTREG(0x657C,0x83988068);
-    OUTREG(0x6578,0x201);
-    OUTREG(0x657C,0x84A08680);
-    OUTREG(0x6578,0x202);
-    OUTREG(0x657C,0xBFF080F8);
-    OUTREG(0x6578,0x300);
-    OUTREG(0x657C,0x83588058);
-    OUTREG(0x6578,0x301);
-    OUTREG(0x657C,0x84E08660);
-    OUTREG(0x6578,0x302);
-    OUTREG(0x657C,0xBFF88120);
-    OUTREG(0x6578,0x400);
-    OUTREG(0x657C,0x83188040);
-    OUTREG(0x6578,0x401);
-    OUTREG(0x657C,0x85008660);
-    OUTREG(0x6578,0x402);
-    OUTREG(0x657C,0xBFF88150);
-    OUTREG(0x6578,0x500);
-    OUTREG(0x657C,0x82D88030);
-    OUTREG(0x6578,0x501);
-    OUTREG(0x657C,0x85408640);
-    OUTREG(0x6578,0x502);
-    OUTREG(0x657C,0xBFF88180);
-    OUTREG(0x6578,0x600);
-    OUTREG(0x657C,0x82A08018);
-    OUTREG(0x6578,0x601);
-    OUTREG(0x657C,0x85808620);
-    OUTREG(0x6578,0x602);
-    OUTREG(0x657C,0xBFF081B8);
-    OUTREG(0x6578,0x700);
-    OUTREG(0x657C,0x82608010);
-    OUTREG(0x6578,0x701);
-    OUTREG(0x657C,0x85A08600);
-    OUTREG(0x6578,0x702);
-    OUTREG(0x657C,0x800081F0);
-    OUTREG(0x6578,0x800);
-    OUTREG(0x657C,0x8228BFF8);
-    OUTREG(0x6578,0x801);
-    OUTREG(0x657C,0x85E085E0);
-    OUTREG(0x6578,0x802);
-    OUTREG(0x657C,0xBFF88228);
-    OUTREG(0x6578,0x10000);
-    OUTREG(0x657C,0x82A8BF00);
-    OUTREG(0x6578,0x10001);
-    OUTREG(0x657C,0x82A08CC0);
-    OUTREG(0x6578,0x10002);
-    OUTREG(0x657C,0x8008BEF8);
-    OUTREG(0x6578,0x10100);
-    OUTREG(0x657C,0x81F0BF28);
-    OUTREG(0x6578,0x10101);
-    OUTREG(0x657C,0x83608CA0);
-    OUTREG(0x6578,0x10102);
-    OUTREG(0x657C,0x8018BED0);
-    OUTREG(0x6578,0x10200);
-    OUTREG(0x657C,0x8148BF38);
-    OUTREG(0x6578,0x10201);
-    OUTREG(0x657C,0x84408C80);
-    OUTREG(0x6578,0x10202);
-    OUTREG(0x657C,0x8008BEB8);
-    OUTREG(0x6578,0x10300);
-    OUTREG(0x657C,0x80B0BF78);
-    OUTREG(0x6578,0x10301);
-    OUTREG(0x657C,0x85008C20);
-    OUTREG(0x6578,0x10302);
-    OUTREG(0x657C,0x8020BEA0);
-    OUTREG(0x6578,0x10400);
-    OUTREG(0x657C,0x8028BF90);
-    OUTREG(0x6578,0x10401);
-    OUTREG(0x657C,0x85E08BC0);
-    OUTREG(0x6578,0x10402);
-    OUTREG(0x657C,0x8018BE90);
-    OUTREG(0x6578,0x10500);
-    OUTREG(0x657C,0xBFB8BFB0);
-    OUTREG(0x6578,0x10501);
-    OUTREG(0x657C,0x86C08B40);
-    OUTREG(0x6578,0x10502);
-    OUTREG(0x657C,0x8010BE90);
-    OUTREG(0x6578,0x10600);
-    OUTREG(0x657C,0xBF58BFC8);
-    OUTREG(0x6578,0x10601);
-    OUTREG(0x657C,0x87A08AA0);
-    OUTREG(0x6578,0x10602);
-    OUTREG(0x657C,0x8010BE98);
-    OUTREG(0x6578,0x10700);
-    OUTREG(0x657C,0xBF10BFF0);
-    OUTREG(0x6578,0x10701);
-    OUTREG(0x657C,0x886089E0);
-    OUTREG(0x6578,0x10702);
-    OUTREG(0x657C,0x8018BEB0);
-    OUTREG(0x6578,0x10800);
-    OUTREG(0x657C,0xBED8BFE8);
-    OUTREG(0x6578,0x10801);
-    OUTREG(0x657C,0x89408940);
-    OUTREG(0x6578,0x10802);
-    OUTREG(0x657C,0xBFE8BED8);
-    OUTREG(0x6578,0x20000);
-    OUTREG(0x657C,0x80008000);
-    OUTREG(0x6578,0x20001);
-    OUTREG(0x657C,0x90008000);
-    OUTREG(0x6578,0x20002);
-    OUTREG(0x657C,0x80008000);
-    OUTREG(0x6578,0x20003);
-    OUTREG(0x657C,0x80008000);
-    OUTREG(0x6578,0x20100);
-    OUTREG(0x657C,0x80108000);
-    OUTREG(0x6578,0x20101);
-    OUTREG(0x657C,0x8FE0BF70);
-    OUTREG(0x6578,0x20102);
-    OUTREG(0x657C,0xBFE880C0);
-    OUTREG(0x6578,0x20103);
-    OUTREG(0x657C,0x80008000);
-    OUTREG(0x6578,0x20200);
-    OUTREG(0x657C,0x8018BFF8);
-    OUTREG(0x6578,0x20201);
-    OUTREG(0x657C,0x8F80BF08);
-    OUTREG(0x6578,0x20202);
-    OUTREG(0x657C,0xBFD081A0);
-    OUTREG(0x6578,0x20203);
-    OUTREG(0x657C,0xBFF88000);
-    OUTREG(0x6578,0x20300);
-    OUTREG(0x657C,0x80188000);
-    OUTREG(0x6578,0x20301);
-    OUTREG(0x657C,0x8EE0BEC0);
-    OUTREG(0x6578,0x20302);
-    OUTREG(0x657C,0xBFB082A0);
-    OUTREG(0x6578,0x20303);
-    OUTREG(0x657C,0x80008000);
-    OUTREG(0x6578,0x20400);
-    OUTREG(0x657C,0x80188000);
-    OUTREG(0x6578,0x20401);
-    OUTREG(0x657C,0x8E00BEA0);
-    OUTREG(0x6578,0x20402);
-    OUTREG(0x657C,0xBF8883C0);
-    OUTREG(0x6578,0x20403);
-    OUTREG(0x657C,0x80008000);
-    OUTREG(0x6578,0x20500);
-    OUTREG(0x657C,0x80188000);
-    OUTREG(0x6578,0x20501);
-    OUTREG(0x657C,0x8D00BE90);
-    OUTREG(0x6578,0x20502);
-    OUTREG(0x657C,0xBF588500);
-    OUTREG(0x6578,0x20503);
-    OUTREG(0x657C,0x80008008);
-    OUTREG(0x6578,0x20600);
-    OUTREG(0x657C,0x80188000);
-    OUTREG(0x6578,0x20601);
-    OUTREG(0x657C,0x8BC0BE98);
-    OUTREG(0x6578,0x20602);
-    OUTREG(0x657C,0xBF308660);
-    OUTREG(0x6578,0x20603);
-    OUTREG(0x657C,0x80008008);
-    OUTREG(0x6578,0x20700);
-    OUTREG(0x657C,0x80108000);
-    OUTREG(0x6578,0x20701);
-    OUTREG(0x657C,0x8A80BEB0);
-    OUTREG(0x6578,0x20702);
-    OUTREG(0x657C,0xBF0087C0);
-    OUTREG(0x6578,0x20703);
-    OUTREG(0x657C,0x80008008);
-    OUTREG(0x6578,0x20800);
-    OUTREG(0x657C,0x80108000);
-    OUTREG(0x6578,0x20801);
-    OUTREG(0x657C,0x8920BED0);
-    OUTREG(0x6578,0x20802);
-    OUTREG(0x657C,0xBED08920);
-    OUTREG(0x6578,0x20803);
-    OUTREG(0x657C,0x80008010);
-    OUTREG(0x6578,0x30000);
-    OUTREG(0x657C,0x90008000);
-    OUTREG(0x6578,0x30001);
-    OUTREG(0x657C,0x80008000);
-    OUTREG(0x6578,0x30100);
-    OUTREG(0x657C,0x8FE0BF90);
-    OUTREG(0x6578,0x30101);
-    OUTREG(0x657C,0xBFF880A0);
-    OUTREG(0x6578,0x30200);
-    OUTREG(0x657C,0x8F60BF40);
-    OUTREG(0x6578,0x30201);
-    OUTREG(0x657C,0xBFE88180);
-    OUTREG(0x6578,0x30300);
-    OUTREG(0x657C,0x8EC0BF00);
-    OUTREG(0x6578,0x30301);
-    OUTREG(0x657C,0xBFC88280);
-    OUTREG(0x6578,0x30400);
-    OUTREG(0x657C,0x8DE0BEE0);
-    OUTREG(0x6578,0x30401);
-    OUTREG(0x657C,0xBFA083A0);
-    OUTREG(0x6578,0x30500);
-    OUTREG(0x657C,0x8CE0BED0);
-    OUTREG(0x6578,0x30501);
-    OUTREG(0x657C,0xBF7884E0);
-    OUTREG(0x6578,0x30600);
-    OUTREG(0x657C,0x8BA0BED8);
-    OUTREG(0x6578,0x30601);
-    OUTREG(0x657C,0xBF508640);
-    OUTREG(0x6578,0x30700);
-    OUTREG(0x657C,0x8A60BEE8);
-    OUTREG(0x6578,0x30701);
-    OUTREG(0x657C,0xBF2087A0);
-    OUTREG(0x6578,0x30800);
-    OUTREG(0x657C,0x8900BF00);
-    OUTREG(0x6578,0x30801);
-    OUTREG(0x657C,0xBF008900);
+    int index_reg = 0x6578, data_reg = 0x657c;
+
+    index_reg += radeon_crtc->crtc_offset;
+    data_reg += radeon_crtc->crtc_offset;
+
+    OUTREG(0x659C + radeon_crtc->crtc_offset, 0x0);
+    OUTREG(0x6594 + radeon_crtc->crtc_offset, 0x705);
+    OUTREG(0x65A4 + radeon_crtc->crtc_offset, 0x10001);
+    OUTREG(0x65D8 + radeon_crtc->crtc_offset, 0x0);
+    OUTREG(0x65B0 + radeon_crtc->crtc_offset, 0x0);
+    OUTREG(0x65C0 + radeon_crtc->crtc_offset, 0x0);
+    OUTREG(0x65D4 + radeon_crtc->crtc_offset, 0x0);
+    OUTREG(index_reg,0x0);
+    OUTREG(data_reg,0x841880A8);
+    OUTREG(index_reg,0x1);
+    OUTREG(data_reg,0x84208680);
+    OUTREG(index_reg,0x2);
+    OUTREG(data_reg,0xBFF880B0);
+    OUTREG(index_reg,0x100);
+    OUTREG(data_reg,0x83D88088);
+    OUTREG(index_reg,0x101);
+    OUTREG(data_reg,0x84608680);
+    OUTREG(index_reg,0x102);
+    OUTREG(data_reg,0xBFF080D0);
+    OUTREG(index_reg,0x200);
+    OUTREG(data_reg,0x83988068);
+    OUTREG(index_reg,0x201);
+    OUTREG(data_reg,0x84A08680);
+    OUTREG(index_reg,0x202);
+    OUTREG(data_reg,0xBFF080F8);
+    OUTREG(index_reg,0x300);
+    OUTREG(data_reg,0x83588058);
+    OUTREG(index_reg,0x301);
+    OUTREG(data_reg,0x84E08660);
+    OUTREG(index_reg,0x302);
+    OUTREG(data_reg,0xBFF88120);
+    OUTREG(index_reg,0x400);
+    OUTREG(data_reg,0x83188040);
+    OUTREG(index_reg,0x401);
+    OUTREG(data_reg,0x85008660);
+    OUTREG(index_reg,0x402);
+    OUTREG(data_reg,0xBFF88150);
+    OUTREG(index_reg,0x500);
+    OUTREG(data_reg,0x82D88030);
+    OUTREG(index_reg,0x501);
+    OUTREG(data_reg,0x85408640);
+    OUTREG(index_reg,0x502);
+    OUTREG(data_reg,0xBFF88180);
+    OUTREG(index_reg,0x600);
+    OUTREG(data_reg,0x82A08018);
+    OUTREG(index_reg,0x601);
+    OUTREG(data_reg,0x85808620);
+    OUTREG(index_reg,0x602);
+    OUTREG(data_reg,0xBFF081B8);
+    OUTREG(index_reg,0x700);
+    OUTREG(data_reg,0x82608010);
+    OUTREG(index_reg,0x701);
+    OUTREG(data_reg,0x85A08600);
+    OUTREG(index_reg,0x702);
+    OUTREG(data_reg,0x800081F0);
+    OUTREG(index_reg,0x800);
+    OUTREG(data_reg,0x8228BFF8);
+    OUTREG(index_reg,0x801);
+    OUTREG(data_reg,0x85E085E0);
+    OUTREG(index_reg,0x802);
+    OUTREG(data_reg,0xBFF88228);
+    OUTREG(index_reg,0x10000);
+    OUTREG(data_reg,0x82A8BF00);
+    OUTREG(index_reg,0x10001);
+    OUTREG(data_reg,0x82A08CC0);
+    OUTREG(index_reg,0x10002);
+    OUTREG(data_reg,0x8008BEF8);
+    OUTREG(index_reg,0x10100);
+    OUTREG(data_reg,0x81F0BF28);
+    OUTREG(index_reg,0x10101);
+    OUTREG(data_reg,0x83608CA0);
+    OUTREG(index_reg,0x10102);
+    OUTREG(data_reg,0x8018BED0);
+    OUTREG(index_reg,0x10200);
+    OUTREG(data_reg,0x8148BF38);
+    OUTREG(index_reg,0x10201);
+    OUTREG(data_reg,0x84408C80);
+    OUTREG(index_reg,0x10202);
+    OUTREG(data_reg,0x8008BEB8);
+    OUTREG(index_reg,0x10300);
+    OUTREG(data_reg,0x80B0BF78);
+    OUTREG(index_reg,0x10301);
+    OUTREG(data_reg,0x85008C20);
+    OUTREG(index_reg,0x10302);
+    OUTREG(data_reg,0x8020BEA0);
+    OUTREG(index_reg,0x10400);
+    OUTREG(data_reg,0x8028BF90);
+    OUTREG(index_reg,0x10401);
+    OUTREG(data_reg,0x85E08BC0);
+    OUTREG(index_reg,0x10402);
+    OUTREG(data_reg,0x8018BE90);
+    OUTREG(index_reg,0x10500);
+    OUTREG(data_reg,0xBFB8BFB0);
+    OUTREG(index_reg,0x10501);
+    OUTREG(data_reg,0x86C08B40);
+    OUTREG(index_reg,0x10502);
+    OUTREG(data_reg,0x8010BE90);
+    OUTREG(index_reg,0x10600);
+    OUTREG(data_reg,0xBF58BFC8);
+    OUTREG(index_reg,0x10601);
+    OUTREG(data_reg,0x87A08AA0);
+    OUTREG(index_reg,0x10602);
+    OUTREG(data_reg,0x8010BE98);
+    OUTREG(index_reg,0x10700);
+    OUTREG(data_reg,0xBF10BFF0);
+    OUTREG(index_reg,0x10701);
+    OUTREG(data_reg,0x886089E0);
+    OUTREG(index_reg,0x10702);
+    OUTREG(data_reg,0x8018BEB0);
+    OUTREG(index_reg,0x10800);
+    OUTREG(data_reg,0xBED8BFE8);
+    OUTREG(index_reg,0x10801);
+    OUTREG(data_reg,0x89408940);
+    OUTREG(index_reg,0x10802);
+    OUTREG(data_reg,0xBFE8BED8);
+    OUTREG(index_reg,0x20000);
+    OUTREG(data_reg,0x80008000);
+    OUTREG(index_reg,0x20001);
+    OUTREG(data_reg,0x90008000);
+    OUTREG(index_reg,0x20002);
+    OUTREG(data_reg,0x80008000);
+    OUTREG(index_reg,0x20003);
+    OUTREG(data_reg,0x80008000);
+    OUTREG(index_reg,0x20100);
+    OUTREG(data_reg,0x80108000);
+    OUTREG(index_reg,0x20101);
+    OUTREG(data_reg,0x8FE0BF70);
+    OUTREG(index_reg,0x20102);
+    OUTREG(data_reg,0xBFE880C0);
+    OUTREG(index_reg,0x20103);
+    OUTREG(data_reg,0x80008000);
+    OUTREG(index_reg,0x20200);
+    OUTREG(data_reg,0x8018BFF8);
+    OUTREG(index_reg,0x20201);
+    OUTREG(data_reg,0x8F80BF08);
+    OUTREG(index_reg,0x20202);
+    OUTREG(data_reg,0xBFD081A0);
+    OUTREG(index_reg,0x20203);
+    OUTREG(data_reg,0xBFF88000);
+    OUTREG(index_reg,0x20300);
+    OUTREG(data_reg,0x80188000);
+    OUTREG(index_reg,0x20301);
+    OUTREG(data_reg,0x8EE0BEC0);
+    OUTREG(index_reg,0x20302);
+    OUTREG(data_reg,0xBFB082A0);
+    OUTREG(index_reg,0x20303);
+    OUTREG(data_reg,0x80008000);
+    OUTREG(index_reg,0x20400);
+    OUTREG(data_reg,0x80188000);
+    OUTREG(index_reg,0x20401);
+    OUTREG(data_reg,0x8E00BEA0);
+    OUTREG(index_reg,0x20402);
+    OUTREG(data_reg,0xBF8883C0);
+    OUTREG(index_reg,0x20403);
+    OUTREG(data_reg,0x80008000);
+    OUTREG(index_reg,0x20500);
+    OUTREG(data_reg,0x80188000);
+    OUTREG(index_reg,0x20501);
+    OUTREG(data_reg,0x8D00BE90);
+    OUTREG(index_reg,0x20502);
+    OUTREG(data_reg,0xBF588500);
+    OUTREG(index_reg,0x20503);
+    OUTREG(data_reg,0x80008008);
+    OUTREG(index_reg,0x20600);
+    OUTREG(data_reg,0x80188000);
+    OUTREG(index_reg,0x20601);
+    OUTREG(data_reg,0x8BC0BE98);
+    OUTREG(index_reg,0x20602);
+    OUTREG(data_reg,0xBF308660);
+    OUTREG(index_reg,0x20603);
+    OUTREG(data_reg,0x80008008);
+    OUTREG(index_reg,0x20700);
+    OUTREG(data_reg,0x80108000);
+    OUTREG(index_reg,0x20701);
+    OUTREG(data_reg,0x8A80BEB0);
+    OUTREG(index_reg,0x20702);
+    OUTREG(data_reg,0xBF0087C0);
+    OUTREG(index_reg,0x20703);
+    OUTREG(data_reg,0x80008008);
+    OUTREG(index_reg,0x20800);
+    OUTREG(data_reg,0x80108000);
+    OUTREG(index_reg,0x20801);
+    OUTREG(data_reg,0x8920BED0);
+    OUTREG(index_reg,0x20802);
+    OUTREG(data_reg,0xBED08920);
+    OUTREG(index_reg,0x20803);
+    OUTREG(data_reg,0x80008010);
+    OUTREG(index_reg,0x30000);
+    OUTREG(data_reg,0x90008000);
+    OUTREG(index_reg,0x30001);
+    OUTREG(data_reg,0x80008000);
+    OUTREG(index_reg,0x30100);
+    OUTREG(data_reg,0x8FE0BF90);
+    OUTREG(index_reg,0x30101);
+    OUTREG(data_reg,0xBFF880A0);
+    OUTREG(index_reg,0x30200);


Reply to: