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

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



 configure.ac                      |    6 
 man/radeon.man                    |   75 
 src/Makefile.am                   |    8 
 src/ati_pciids_gen.h              |   24 
 src/atipciids.h                   |    1 
 src/atombios_crtc.c               |  208 ++
 src/atombios_output.c             |  889 +++++-----
 src/legacy_crtc.c                 |   52 
 src/legacy_output.c               |   14 
 src/pcidb/ati_pciids.csv          |   24 
 src/r600_exa.c                    | 2106 +++++++++++++++++++++++++
 src/r600_reg.h                    |  132 +
 src/r600_reg_auto_r6xx.h          | 3087 ++++++++++++++++++++++++++++++++++++++
 src/r600_reg_r6xx.h               |  503 ++++++
 src/r600_reg_r7xx.h               |  149 +
 src/r600_shader.c                 | 1848 ++++++++++++++++++++++
 src/r600_shader.h                 |  359 ++++
 src/r600_state.h                  |  282 +++
 src/r600_textured_videofuncs.c    |  519 ++++++
 src/r6xx_accel.c                  | 1106 +++++++++++++
 src/radeon.h                      |  153 +
 src/radeon_accel.c                |  129 +
 src/radeon_atombios.c             |   87 -
 src/radeon_atombios.h             |    2 
 src/radeon_bios.c                 |   17 
 src/radeon_chipinfo_gen.h         |   24 
 src/radeon_chipset_gen.h          |   24 
 src/radeon_commonfuncs.c          |  130 -
 src/radeon_crtc.c                 |   39 
 src/radeon_cursor.c               |   70 
 src/radeon_dri.c                  |  308 ++-
 src/radeon_driver.c               |  473 +++--
 src/radeon_exa.c                  |    3 
 src/radeon_exa_funcs.c            |   16 
 src/radeon_exa_render.c           |   54 
 src/radeon_legacy_memory.c        |    4 
 src/radeon_macros.h               |   17 
 src/radeon_modes.c                |   78 
 src/radeon_output.c               |  449 +++--
 src/radeon_pci_chipset_gen.h      |   24 
 src/radeon_pci_device_match_gen.h |   24 
 src/radeon_probe.c                |    3 
 src/radeon_probe.h                |   18 
 src/radeon_reg.h                  |  139 +
 src/radeon_textured_video.c       |  366 +++-
 src/radeon_textured_videofuncs.c  |  680 +++++++-
 src/radeon_tv.c                   |    6 
 src/radeon_version.h              |    1 
 src/radeon_video.c                |   44 
 src/radeon_video.h                |   12 
 50 files changed, 13380 insertions(+), 1406 deletions(-)

New commits:
commit b7c14b00ff6a217cb69727b384cc4f4b433a907e
Author: Dave Airlie <airlied@redhat.com>
Date:   Fri Sep 11 09:31:46 2009 +1000

    ati 6.12.4

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

commit 93df2faf1ea2008248566326f10ed737e7f6fc66
Author: Dave Airlie <airlied@redhat.com>
Date:   Fri Sep 11 09:19:17 2009 +1000

    Update to xextproto 7.1 support.
    
    DPMS header was split into dpms.h (client) and dpmsconst.h (server). Drivers
    need to include dpmsconst.h if xextproto 7.1 is available.
    
    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
    
    Conflicts:
    
    	src/drmmode_display.c

diff --git a/configure.ac b/configure.ac
index 7c113e9..40045c5 100644
--- a/configure.ac
+++ b/configure.ac
@@ -76,6 +76,10 @@ XORG_DRIVER_CHECK_EXT(DPMSExtension, xextproto)
 
 # Checks for pkg-config packages
 PKG_CHECK_MODULES(XORG, [xorg-server >= 1.2 xproto fontsproto $REQUIRED_MODULES])
+PKG_CHECK_MODULES(XEXT, [xextproto >= 7.0.99.1],
+                  HAVE_XEXTPROTO_71="yes"; AC_DEFINE(HAVE_XEXTPROTO_71, 1, [xextproto 7.1 available]),
+                  HAVE_XEXTPROTO_71="no")
+AM_CONDITIONAL(HAVE_XEXTPROTO_71, [ test "$HAVE_XEXTPROTO_71" = "yes" ])
 sdkdir=$(pkg-config --variable=sdkdir xorg-server)
 
 # Checks for libraries.
diff --git a/src/atombios_crtc.c b/src/atombios_crtc.c
index f060d8d..cd98c21 100644
--- a/src/atombios_crtc.c
+++ b/src/atombios_crtc.c
@@ -33,8 +33,13 @@
 #include "config.h"
 #endif
 /* DPMS */
+#ifdef HAVE_XEXTPROTO_71
+#include <X11/extensions/dpmsconst.h>
+#else
 #define DPMS_SERVER
 #include <X11/extensions/dpms.h>
+#endif
+
 
 #include "radeon.h"
 #include "radeon_reg.h"
diff --git a/src/atombios_output.c b/src/atombios_output.c
index e6ef025..57345b3 100644
--- a/src/atombios_output.c
+++ b/src/atombios_output.c
@@ -34,8 +34,13 @@
 #include "config.h"
 #endif
 /* DPMS */
+#ifdef HAVE_XEXTPROTO_71
+#include <X11/extensions/dpmsconst.h>
+#else
 #define DPMS_SERVER
 #include <X11/extensions/dpms.h>
+#endif
+
 #include <unistd.h>
 
 #include "radeon.h"
diff --git a/src/radeon_driver.c b/src/radeon_driver.c
index 9d8bd39..551cb7f 100644
--- a/src/radeon_driver.c
+++ b/src/radeon_driver.c
@@ -106,8 +106,13 @@
 #include "vgaHW.h"
 #endif
 
+#ifdef HAVE_XEXTPROTO_71
+#include <X11/extensions/dpmsconst.h>
+#else
 #define DPMS_SERVER
 #include <X11/extensions/dpms.h>
+#endif
+
 
 #include "atipciids.h"
 #include "radeon_chipset_gen.h"

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);
+    OUTREG(data_reg,0x8F60BF40);
+    OUTREG(index_reg,0x30201);
+    OUTREG(data_reg,0xBFE88180);
+    OUTREG(index_reg,0x30300);
+    OUTREG(data_reg,0x8EC0BF00);
+    OUTREG(index_reg,0x30301);
+    OUTREG(data_reg,0xBFC88280);
+    OUTREG(index_reg,0x30400);
+    OUTREG(data_reg,0x8DE0BEE0);
+    OUTREG(index_reg,0x30401);
+    OUTREG(data_reg,0xBFA083A0);
+    OUTREG(index_reg,0x30500);
+    OUTREG(data_reg,0x8CE0BED0);
+    OUTREG(index_reg,0x30501);
+    OUTREG(data_reg,0xBF7884E0);
+    OUTREG(index_reg,0x30600);
+    OUTREG(data_reg,0x8BA0BED8);
+    OUTREG(index_reg,0x30601);
+    OUTREG(data_reg,0xBF508640);
+    OUTREG(index_reg,0x30700);
+    OUTREG(data_reg,0x8A60BEE8);
+    OUTREG(index_reg,0x30701);
+    OUTREG(data_reg,0xBF2087A0);
+    OUTREG(index_reg,0x30800);
+    OUTREG(data_reg,0x8900BF00);
+    OUTREG(index_reg,0x30801);
+    OUTREG(data_reg,0xBF008900);
 }
 
 static int
@@ -1182,7 +1186,7 @@ atombios_output_scaler_setup(xf86OutputPtr output)
 	if (radeon_output->active_device & (ATOM_DEVICE_CV_SUPPORT | ATOM_DEVICE_TV_SUPPORT)
 	    && info->ChipFamily >= CHIP_FAMILY_RV515 && info->ChipFamily <= CHIP_FAMILY_RV570) {
 	    ErrorF("forcing TV scaler\n");
-	    atom_rv515_force_tv_scaler(output->scrn);
+	    atom_rv515_force_tv_scaler(output->scrn, radeon_crtc);
 	}
 	ErrorF("scaler %d setup success\n", radeon_crtc->crtc_id);
 	return ATOM_SUCCESS;

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.

diff --git a/src/radeon_exa_render.c b/src/radeon_exa_render.c
index 65197c0..8e98b9f 100644
--- a/src/radeon_exa_render.c
+++ b/src/radeon_exa_render.c
@@ -409,8 +409,7 @@ static Bool FUNC_NAME(R100TextureSetup)(PicturePtr pPict, PixmapPtr pPix,
 	RADEON_FALLBACK(("Bad filter 0x%x\n", pPict->filter));
     }
 
-    if (repeat) {
-	switch (pPict->repeatType) {
+    switch (pPict->repeatType) {
 	case RepeatNormal:
 	    txfilter |= RADEON_CLAMP_S_WRAP | RADEON_CLAMP_T_WRAP;
 	    break;
@@ -421,9 +420,10 @@ static Bool FUNC_NAME(R100TextureSetup)(PicturePtr pPict, PixmapPtr pPix,
 	    txfilter |= RADEON_CLAMP_S_MIRROR | RADEON_CLAMP_T_MIRROR;
 	    break;
 	case RepeatNone:
-	    /* Nothing to do */
+	    /* don't set an illegal clamp mode for rects */
+	    if (txformat & RADEON_TXFORMAT_NON_POWER2)
+		txfilter |= RADEON_CLAMP_S_CLAMP_LAST | RADEON_CLAMP_T_CLAMP_LAST;
 	    break;
-	}
     }
 
     BEGIN_ACCEL(5);
@@ -747,8 +747,7 @@ static Bool FUNC_NAME(R200TextureSetup)(PicturePtr pPict, PixmapPtr pPix,
 	RADEON_FALLBACK(("Bad filter 0x%x\n", pPict->filter));
     }
 
-    if (repeat) {
-	switch (pPict->repeatType) {
+    switch (pPict->repeatType) {
 	case RepeatNormal:
 	    txfilter |= R200_CLAMP_S_WRAP | R200_CLAMP_T_WRAP;


Reply to: