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

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



 ChangeLog             |  157 +++++++++++
 configure.ac          |  118 ++++++++
 debian/changelog      |   29 ++
 debian/control        |    8 
 debian/patches/series |    1 
 man/r128.man          |   21 +
 src/Makefile.am       |    8 
 src/compat-api.h      |   99 +++++++
 src/r128.h            |   98 ++++++-
 src/r128_accel.c      |   48 +++
 src/r128_cursor.c     |   56 ++--
 src/r128_dga.c        |   20 -
 src/r128_dri.c        |   90 +++++-
 src/r128_driver.c     |  469 ++++++++++++++++++++++-----------
 src/r128_exa.c        |  493 +++++++++++++++++++++++++++++++++++
 src/r128_exa_render.c |  695 ++++++++++++++++++++++++++++++++++++++++++++++++++
 src/r128_misc.c       |    3 
 src/r128_probe.c      |    4 
 src/r128_probe.h      |   14 -
 src/r128_video.c      |  158 ++++++++---
 20 files changed, 2329 insertions(+), 260 deletions(-)

New commits:
commit 521324de2e6a8da6d97704e4c7d7c31454e220a5
Author: Michele Cane <michele.cane@gmail.com>
Date:   Fri Sep 6 16:27:59 2013 +0200

    Bump Standards-Version to 3.9.4, no changes needed.

diff --git a/debian/changelog b/debian/changelog
index ff8429f..bb0cf5c 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,8 +1,12 @@
 xserver-xorg-video-r128 (6.9.1-1) UNRELEASED; urgency=low
 
+  [ Maarten Lankhorst ]
   * New upstream release.
   * Bump Standards-Version to 3.9.3
 
+  [ Michele Cane ]
+  * Bump Standards-Version to 3.9.4, no changes deeded.
+
  -- Maarten Lankhorst <maarten.lankhorst@canonical.com>  Wed, 18 Jul 2012 16:13:52 +0200
 
 xserver-xorg-video-r128 (6.8.2-1) unstable; urgency=low
diff --git a/debian/control b/debian/control
index 45eec5e..04b28ac 100644
--- a/debian/control
+++ b/debian/control
@@ -21,7 +21,7 @@ Build-Depends:
  x11proto-xf86dri-dev,
  quilt,
  xutils-dev
-Standards-Version: 3.9.3
+Standards-Version: 3.9.4
 Vcs-Git: git://git.debian.org/git/pkg-xorg/driver/xserver-xorg-video-r128
 Vcs-Browser: http://git.debian.org/?p=pkg-xorg/driver/xserver-xorg-video-r128.git
 

commit 1aae585e509241bde988a043ad9808137cc3d8a2
Author: Timo Aaltonen <tjaalton@ubuntu.com>
Date:   Mon Oct 1 12:26:04 2012 +0300

    update the changelogs

diff --git a/ChangeLog b/ChangeLog
index bb89291..938043d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,126 @@
+commit ef4467b4aac70b9a8a1ef1194eb02d7551be2602
+Author: Dave Airlie <airlied@redhat.com>
+Date:   Fri Sep 28 11:25:17 2012 +1000
+
+    r128: bump to 6.9.1
+    
+    Signed-off-by: Dave Airlie <airlied@redhat.com>
+
+commit 1793fe6e84a0ee4e4924d90e9e777213a6a5ea20
+Author: Dave Airlie <airlied@redhat.com>
+Date:   Fri Sep 28 11:24:53 2012 +1000
+
+    fix make distcheck
+    
+    Signed-off-by: Dave Airlie <airlied@redhat.com>
+
+commit e0222a5f5e7cad482044a542e4b1ebc32f774648
+Author: Dave Airlie <airlied@redhat.com>
+Date:   Fri Sep 28 11:22:40 2012 +1000
+
+    r128: bump release to 6.9.0
+    
+    Signed-off-by: Dave Airlie <airlied@redhat.com>
+
+commit e8b741e8fd4acebd79ee495cdd5437746ae80c39
+Author: Dave Airlie <airlied@redhat.com>
+Date:   Fri Sep 28 11:20:41 2012 +1000
+
+    r128: enable EXA by default if XAA isn't available at build time.
+    
+    Signed-off-by: Dave Airlie <airlied@redhat.com>
+
+commit 4ecd6e67fbbfd52e0ac77a6c48bd3c6a6d5598e7
+Author: Connor Behan <connor.behan@gmail.com>
+Date:   Fri Aug 31 00:19:21 2012 -0700
+
+    Scale Xv with the vertical stretch ratio
+    
+    If we are using a resolution lower than the native resolution of the
+    flat panel, the video overlay needs to know this. Otherwise a black bar
+    appears beneath the video. This is essentially Conn's patch from the bug
+    tracker except it doesn't always rely on info->PanelYRes. ACPI events
+    can change this without the driver's knowledge.
+    Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=6493
+    
+    Signed-off-by: Connor Behan <connor.behan@gmail.com>
+
+commit 7f279e9d4e329ccb95de16f205ea4cd0ab37a65b
+Author: Connor Behan <connor.behan@gmail.com>
+Date:   Wed Aug 29 16:06:39 2012 -0700
+
+    Remove nested preprocessor checks
+    
+    When checking for R128DRI and RENDER, it is better to use two lines
+    instead of four.
+    
+    Signed-off-by: Connor Behan <connor.behan@gmail.com>
+
+commit deb05ac9cf58608b3d8d9947f52e9bcc5e0ae6b5
+Author: Connor Behan <connor.behan@gmail.com>
+Date:   Mon Jul 30 14:28:05 2012 +1000
+
+    Fix build without XAA again
+    
+    referring to info->accel instead of info->accelOn
+    
+    Signed-off-by: Connor Behan <connor.behan@gmail.com>
+    Signed-off-by: Dave Airlie <airlied@redhat.com>
+
+commit 310d998b7bb6d1befb1001deb565fb51a4b17013
+Author: Connor Behan <connor.behan@gmail.com>
+Date:   Fri Jul 27 11:49:38 2012 +1000
+
+    r128: fix missing preprocessor check for R128DRI
+    
+    This fixes one build problem seen in tinderbox.
+    
+    [airlied: split out from larger patch]
+    Signed-off-by: Connor Behan <connor.behan@gmail.com>
+    Signed-off-by: Dave Airlie <airlied@redhat.com>
+
+commit f83ee3144236bcca35eeadee2924e8bc15092447
+Author: Connor Behan <connor.behan@gmail.com>
+Date:   Tue Jul 17 22:53:17 2012 -0700
+
+    Fix build without EXA
+    
+    The offscreen area used by EXA needs to be declared even with lazy
+    evaluation.
+    
+    Signed-off-by: Connor Behan <connor.behan@gmail.com>
+
+commit 599c69a9cbf78c8717fb9ec92d9e764d9b358cf3
+Author: Connor Behan <connor.behan@gmail.com>
+Date:   Tue Jul 17 22:33:43 2012 -0700
+
+    Make debug mode work again
+    
+    The source should not assume that debugging is turned off. It should
+    build even if the user edits r128.h and enables it.
+    Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=47785
+    
+    Signed-off-by: Connor Behan <connor.behan@gmail.com>
+
+commit c16d4e8bc068cb8127fa95347d26c7b80258f816
+Author: Connor Behan <connor.behan@gmail.com>
+Date:   Mon Jul 16 12:56:00 2012 -0700
+
+    Add EXA support
+    
+    This introduces EXA acceleration which can improve performance and allow
+    2D acceleration to be used without XAA. Implemented hooks are Solid,
+    Copy and Composite. They appear to pass all rendercheck tests, except
+    the gradient test which XAA also fails. Tested on multiple color depths,
+    with and without DRI, with and without the composite extension. Hardware
+    cursor, Xvideo and page flipping are supported as well.
+    Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=47866
+    
+    [ Michel Dänzer: Drop unrelated addition of #include "r128_version.h" ]
+    
+    Signed-off-by: Connor Behan <connor.behan@gmail.com>
+    Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>
+
 commit a4231073010096f689df72c1f8f1453852f28d81
 Author: Dave Airlie <airlied@redhat.com>
 Date:   Tue Jul 17 16:05:09 2012 +1000
diff --git a/debian/changelog b/debian/changelog
index ef69746..ff8429f 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,4 +1,4 @@
-xserver-xorg-video-r128 (6.8.4-1) UNRELEASED; urgency=low
+xserver-xorg-video-r128 (6.9.1-1) UNRELEASED; urgency=low
 
   * New upstream release.
   * Bump Standards-Version to 3.9.3

commit ef4467b4aac70b9a8a1ef1194eb02d7551be2602
Author: Dave Airlie <airlied@redhat.com>
Date:   Fri Sep 28 11:25:17 2012 +1000

    r128: bump to 6.9.1
    
    Signed-off-by: Dave Airlie <airlied@redhat.com>

diff --git a/configure.ac b/configure.ac
index c5cbc69..38dc9bd 100644
--- a/configure.ac
+++ b/configure.ac
@@ -23,7 +23,7 @@
 # Initialize Autoconf
 AC_PREREQ([2.60])
 AC_INIT([xf86-video-r128],
-        [6.9.0],
+        [6.9.1],
         [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg],
         [xf86-video-r128])
 AC_CONFIG_SRCDIR([Makefile.am])

commit 1793fe6e84a0ee4e4924d90e9e777213a6a5ea20
Author: Dave Airlie <airlied@redhat.com>
Date:   Fri Sep 28 11:24:53 2012 +1000

    fix make distcheck
    
    Signed-off-by: Dave Airlie <airlied@redhat.com>

diff --git a/src/Makefile.am b/src/Makefile.am
index 4ee9725..23e6c49 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -53,4 +53,5 @@ EXTRA_DIST = \
 	r128_reg.h \
 	r128_sarea.h \
 	r128_version.h \
+	r128_exa_render.c \
 	atipcirename.h

commit e0222a5f5e7cad482044a542e4b1ebc32f774648
Author: Dave Airlie <airlied@redhat.com>
Date:   Fri Sep 28 11:22:40 2012 +1000

    r128: bump release to 6.9.0
    
    Signed-off-by: Dave Airlie <airlied@redhat.com>

diff --git a/configure.ac b/configure.ac
index edb65a3..c5cbc69 100644
--- a/configure.ac
+++ b/configure.ac
@@ -23,7 +23,7 @@
 # Initialize Autoconf
 AC_PREREQ([2.60])
 AC_INIT([xf86-video-r128],
-        [6.8.4],
+        [6.9.0],
         [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg],
         [xf86-video-r128])
 AC_CONFIG_SRCDIR([Makefile.am])

commit e8b741e8fd4acebd79ee495cdd5437746ae80c39
Author: Dave Airlie <airlied@redhat.com>
Date:   Fri Sep 28 11:20:41 2012 +1000

    r128: enable EXA by default if XAA isn't available at build time.
    
    Signed-off-by: Dave Airlie <airlied@redhat.com>

diff --git a/src/r128_driver.c b/src/r128_driver.c
index ae16e97..a062a60 100644
--- a/src/r128_driver.c
+++ b/src/r128_driver.c
@@ -2251,6 +2251,11 @@ Bool R128ScreenInit(SCREEN_INIT_ARGS_DECL)
 
     R128TRACE(("R128ScreenInit %x %d\n", pScrn->memPhysBase, pScrn->fbOffset));
     info->useEXA = FALSE;
+#ifdef USE_EXA
+#ifndef HAVE_XAA_H
+    info->useEXA = TRUE;
+#endif
+#endif
 
 #ifdef USE_EXA
     optstr = (char *)xf86GetOptValString(info->Options, OPTION_ACCELMETHOD);

commit 4ecd6e67fbbfd52e0ac77a6c48bd3c6a6d5598e7
Author: Connor Behan <connor.behan@gmail.com>
Date:   Fri Aug 31 00:19:21 2012 -0700

    Scale Xv with the vertical stretch ratio
    
    If we are using a resolution lower than the native resolution of the
    flat panel, the video overlay needs to know this. Otherwise a black bar
    appears beneath the video. This is essentially Conn's patch from the bug
    tracker except it doesn't always rely on info->PanelYRes. ACPI events
    can change this without the driver's knowledge.
    Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=6493
    
    Signed-off-by: Connor Behan <connor.behan@gmail.com>

diff --git a/src/r128_video.c b/src/r128_video.c
index 4507b30..bb5a655 100644
--- a/src/r128_video.c
+++ b/src/r128_video.c
@@ -661,13 +661,25 @@ R128DisplayVideo422(
     R128InfoPtr info = R128PTR(pScrn);
     unsigned char *R128MMIO = info->MMIO;
     R128PortPrivPtr pPriv = info->adaptor->pPortPrivates[0].ptr;
-    int v_inc, h_inc, step_by, tmp;
+    int v_inc, h_inc, step_by, tmp, v_inc_shift;
     int p1_h_accum_init, p23_h_accum_init;
     int p1_v_accum_init;
+    Bool rmx_active;
 
     R128ECP(pScrn, pPriv);
 
-    v_inc = (src_h << 20) / drw_h;
+    v_inc_shift = 20;
+    if (pScrn->currentMode->Flags & V_INTERLACE)
+        v_inc_shift++;
+    if (pScrn->currentMode->Flags & V_DBLSCAN)
+        v_inc_shift--;
+    
+    rmx_active = INREG(R128_FP_VERT_STRETCH) & R128_VERT_STRETCH_ENABLE;
+    if (rmx_active) {
+        v_inc = ((src_h * pScrn->currentMode->CrtcVDisplay / info->PanelYRes) << v_inc_shift) / drw_h;
+    } else {
+        v_inc = (src_h << v_inc_shift) / drw_h;
+    }
     h_inc = (src_w << (12 + pPriv->ecp_div)) / drw_w;
     step_by = 1;
 
@@ -735,11 +747,23 @@ R128DisplayVideo420(
     R128InfoPtr info = R128PTR(pScrn);
     unsigned char *R128MMIO = info->MMIO;
     R128PortPrivPtr pPriv = info->adaptor->pPortPrivates[0].ptr;
-    int v_inc, h_inc, step_by, tmp, leftUV;
+    int v_inc, h_inc, step_by, tmp, leftUV, v_inc_shift;
     int p1_h_accum_init, p23_h_accum_init;
     int p1_v_accum_init, p23_v_accum_init;
-
-    v_inc = (src_h << 20) / drw_h;
+    Bool rmx_active;
+
+    v_inc_shift = 20;
+    if (pScrn->currentMode->Flags & V_INTERLACE)
+        v_inc_shift++;
+    if (pScrn->currentMode->Flags & V_DBLSCAN)
+        v_inc_shift--;
+    
+    rmx_active = INREG(R128_FP_VERT_STRETCH) & R128_VERT_STRETCH_ENABLE;
+    if (rmx_active) {
+        v_inc = ((src_h * pScrn->currentMode->CrtcVDisplay / info->PanelYRes) << v_inc_shift) / drw_h;
+    } else {
+        v_inc = (src_h << v_inc_shift) / drw_h;
+    }
     h_inc = (src_w << (12 + pPriv->ecp_div)) / drw_w;
     step_by = 1;
 

commit 7f279e9d4e329ccb95de16f205ea4cd0ab37a65b
Author: Connor Behan <connor.behan@gmail.com>
Date:   Wed Aug 29 16:06:39 2012 -0700

    Remove nested preprocessor checks
    
    When checking for R128DRI and RENDER, it is better to use two lines
    instead of four.
    
    Signed-off-by: Connor Behan <connor.behan@gmail.com>

diff --git a/src/r128.h b/src/r128.h
index 9b2556f..9c0ecb6 100644
--- a/src/r128.h
+++ b/src/r128.h
@@ -284,8 +284,7 @@ struct r128_2d_state {
     uint32_t dp_src_frgd_clr;
     uint32_t dp_src_bkgd_clr;
     uint32_t default_sc_bottom_right;
-#ifdef R128DRI
-#ifdef RENDER
+#if defined(R128DRI) && defined(RENDER)
     Bool has_mask;
     int x_offset;
     int y_offset;
@@ -296,7 +295,6 @@ struct r128_2d_state {
     PixmapPtr src_pix;
     PixmapPtr msk_pix;
 #endif
-#endif
 };
 #endif
 
diff --git a/src/r128_exa.c b/src/r128_exa.c
index b3e2406..2a628a8 100644
--- a/src/r128_exa.c
+++ b/src/r128_exa.c
@@ -335,8 +335,7 @@ R128Done(PixmapPtr pPixmap)
     R128InfoPtr   info      = R128PTR(pScrn);
 
     info->state_2d.in_use = FALSE;
-#ifdef R128DRI
-#ifdef RENDER
+#if defined(R128DRI) && defined(RENDER)
     if (info->state_2d.src_pix) {
         pScreen->DestroyPixmap(info->state_2d.src_pix);
 	info->state_2d.src_pix = NULL;
@@ -346,7 +345,6 @@ R128Done(PixmapPtr pPixmap)
 	info->state_2d.msk_pix = NULL;
     }
 #endif
-#endif
 }
 
 #ifdef R128DRI

commit deb05ac9cf58608b3d8d9947f52e9bcc5e0ae6b5
Author: Connor Behan <connor.behan@gmail.com>
Date:   Mon Jul 30 14:28:05 2012 +1000

    Fix build without XAA again
    
    referring to info->accel instead of info->accelOn
    
    Signed-off-by: Connor Behan <connor.behan@gmail.com>
    Signed-off-by: Dave Airlie <airlied@redhat.com>

diff --git a/src/r128_accel.c b/src/r128_accel.c
index 1df4eb8..1b8c023 100644
--- a/src/r128_accel.c
+++ b/src/r128_accel.c
@@ -1875,7 +1875,6 @@ Bool R128AccelInit(ScreenPtr pScreen)
 {
     ScrnInfoPtr   pScrn = xf86ScreenToScrn(pScreen);
     R128InfoPtr   info  = R128PTR(pScrn);
-    XAAInfoRecPtr a;
 
 #ifdef USE_EXA
     if (info->useEXA) {
@@ -1895,15 +1894,18 @@ Bool R128AccelInit(ScreenPtr pScreen)
 	info->ExaDriver = exaDriverAlloc();
 	if (!info->ExaDriver) {
 	    xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Could not allocate EXA driver...\n");
-	    info->accel = FALSE;
+	    info->accelOn = FALSE;
 	}
 
 	return TRUE;
     }
 #endif
+
 #ifndef HAVE_XAA_H
     return FALSE;
 #else
+    XAAInfoRecPtr a;
+
     if (!info->useEXA) {
         if (!xf86LoadSubModule(pScrn, "xaa")) return FALSE;
     }

commit 310d998b7bb6d1befb1001deb565fb51a4b17013
Author: Connor Behan <connor.behan@gmail.com>
Date:   Fri Jul 27 11:49:38 2012 +1000

    r128: fix missing preprocessor check for R128DRI
    
    This fixes one build problem seen in tinderbox.
    
    [airlied: split out from larger patch]
    Signed-off-by: Connor Behan <connor.behan@gmail.com>
    Signed-off-by: Dave Airlie <airlied@redhat.com>

diff --git a/src/r128_exa.c b/src/r128_exa.c
index 8fb8b64..b3e2406 100644
--- a/src/r128_exa.c
+++ b/src/r128_exa.c
@@ -142,6 +142,7 @@ static void Emit2DState(ScrnInfoPtr pScrn)
     if (has_src) OUTREG(R128_SRC_PITCH_OFFSET, info->state_2d.src_pitch_offset);
 }
 
+#ifdef R128DRI
 static void EmitCCE2DState(ScrnInfoPtr pScrn)
 {
     R128InfoPtr   info      = R128PTR(pScrn);
@@ -166,6 +167,7 @@ static void EmitCCE2DState(ScrnInfoPtr pScrn)
 
     ADVANCE_RING();
 }
+#endif
 
 /* EXA Callbacks */
 

commit 1592e880e50acceb83883bdbcd55197cda50059d
Author: Maarten Lankhorst <maarten.lankhorst@canonical.com>
Date:   Wed Jul 18 16:17:18 2012 +0200

    Add missing misc:Depends to shut up lintian

diff --git a/debian/control b/debian/control
index eba422e..45eec5e 100644
--- a/debian/control
+++ b/debian/control
@@ -46,7 +46,9 @@ Description: X.Org X server -- ATI r128 display driver
 
 Package: xserver-xorg-video-r128-dbg
 Architecture: any
-Depends: xserver-xorg-video-r128 (= ${binary:Version})
+Depends:
+ xserver-xorg-video-r128 (= ${binary:Version}),
+ ${misc:Depends},
 Section: debug
 Priority: extra
 Description: X.Org X server -- ATI r128 display driver (debugging symbols)

commit 10ff322effd588ae9ece92e19a3885915d959eae
Author: Maarten Lankhorst <maarten.lankhorst@canonical.com>
Date:   Wed Jul 18 16:15:03 2012 +0200

    Bump Standards-Version to 3.9.3

diff --git a/debian/changelog b/debian/changelog
index f8774b1..ef69746 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,6 +1,7 @@
 xserver-xorg-video-r128 (6.8.4-1) UNRELEASED; urgency=low
 
   * New upstream release.
+  * Bump Standards-Version to 3.9.3
 
  -- Maarten Lankhorst <maarten.lankhorst@canonical.com>  Wed, 18 Jul 2012 16:13:52 +0200
 
diff --git a/debian/control b/debian/control
index 5567265..eba422e 100644
--- a/debian/control
+++ b/debian/control
@@ -21,7 +21,7 @@ Build-Depends:
  x11proto-xf86dri-dev,
  quilt,
  xutils-dev
-Standards-Version: 3.9.1
+Standards-Version: 3.9.3
 Vcs-Git: git://git.debian.org/git/pkg-xorg/driver/xserver-xorg-video-r128
 Vcs-Browser: http://git.debian.org/?p=pkg-xorg/driver/xserver-xorg-video-r128.git
 
diff --git a/debian/patches/series b/debian/patches/series
index e69de29..fdffa2a 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -0,0 +1 @@
+# placeholder

commit 1dd257e2ae08b4ecf373431b1e1cb05c5421bf73
Author: Maarten Lankhorst <maarten.lankhorst@canonical.com>
Date:   Wed Jul 18 16:14:41 2012 +0200

    New upstream release.

diff --git a/debian/changelog b/debian/changelog
index 499a397..f8774b1 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+xserver-xorg-video-r128 (6.8.4-1) UNRELEASED; urgency=low
+
+  * New upstream release.
+
+ -- Maarten Lankhorst <maarten.lankhorst@canonical.com>  Wed, 18 Jul 2012 16:13:52 +0200
+
 xserver-xorg-video-r128 (6.8.2-1) unstable; urgency=low
 
   * New upstream release.

commit c0418e1fb0407fcdfa665386ddd33ebad219d7a8
Author: Maarten Lankhorst <maarten.lankhorst@canonical.com>
Date:   Wed Jul 18 16:13:46 2012 +0200

    Bump changelog.

diff --git a/ChangeLog b/ChangeLog
index eb9ceaf..bb89291 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,37 @@
+commit a4231073010096f689df72c1f8f1453852f28d81
+Author: Dave Airlie <airlied@redhat.com>
+Date:   Tue Jul 17 16:05:09 2012 +1000
+
+    xf86-video-r128: bump to version 6.8.4
+    
+    Signed-off-by: Dave Airlie <airlied@redhat.com>
+
+commit 16df5622c550c64711a25a9d8ece9152c3047a94
+Author: Dave Airlie <airlied@gmail.com>
+Date:   Sun Jul 15 17:14:10 2012 +1000
+
+    r128: drop XAA support.
+    
+    this just makes XAA conditional.
+    
+    Signed-off-by: Dave Airlie <airlied@redhat.com>
+
+commit 734e9ff97b81af732ab7065761212e8eb8f6aa3c
+Author: Dave Airlie <airlied@redhat.com>
+Date:   Mon Jul 2 12:26:11 2012 +0100
+
+    r128: bump 6.8.3 release
+    
+    Signed-off-by: Dave Airlie <airlied@redhat.com>
+
+commit b027633fcfc0e226b78036e27c66ccd76542e43f
+Author: Dave Airlie <airlied@redhat.com>
+Date:   Wed Jun 6 11:02:27 2012 +0100
+
+    r128: port to new compat API.
+    
+    Signed-off-by: Dave Airlie <airlied@redhat.com>
+
 commit 1ac4cd4b41d0e8232660df78ff136df1214f3907
 Author: Alan Coopersmith <alan.coopersmith@oracle.com>
 Date:   Fri Mar 23 19:23:54 2012 -0700

commit f83ee3144236bcca35eeadee2924e8bc15092447
Author: Connor Behan <connor.behan@gmail.com>
Date:   Tue Jul 17 22:53:17 2012 -0700

    Fix build without EXA
    
    The offscreen area used by EXA needs to be declared even with lazy
    evaluation.
    
    Signed-off-by: Connor Behan <connor.behan@gmail.com>

diff --git a/src/r128_cursor.c b/src/r128_cursor.c
index 974a6d5..b76913c 100644
--- a/src/r128_cursor.c
+++ b/src/r128_cursor.c
@@ -261,6 +261,8 @@ Bool R128CursorInit(ScreenPtr pScreen)
     FBAreaPtr             fbarea  = NULL;
 #ifdef USE_EXA
     ExaOffscreenArea*	  osArea  = NULL;
+#else
+    void*		  osArea  = NULL;
 #endif
     int                   width;
     int                   height;
diff --git a/src/r128_driver.c b/src/r128_driver.c
index f4a5e1b..ae16e97 100644
--- a/src/r128_driver.c
+++ b/src/r128_driver.c
@@ -2244,6 +2244,8 @@ Bool R128ScreenInit(SCREEN_INIT_ARGS_DECL)
     Bool	noAccel;
 #ifdef USE_EXA
     ExaOffscreenArea*     osArea = NULL;
+#else
+    void*		  osArea = NULL;
 #endif
     char *optstr;
 

commit 599c69a9cbf78c8717fb9ec92d9e764d9b358cf3
Author: Connor Behan <connor.behan@gmail.com>
Date:   Tue Jul 17 22:33:43 2012 -0700

    Make debug mode work again
    
    The source should not assume that debugging is turned off. It should
    build even if the user edits r128.h and enables it.
    Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=47785
    
    Signed-off-by: Connor Behan <connor.behan@gmail.com>

diff --git a/src/r128.h b/src/r128.h
index fe42f79..9b2556f 100644
--- a/src/r128.h
+++ b/src/r128.h
@@ -118,6 +118,7 @@
 #define R128_VBIOS_SIZE 0x00010000
 
 #if R128_DEBUG
+#include "r128_version.h"
 
 #define R128TRACE(x)                                          \
     do {                                                      \
diff --git a/src/r128_driver.c b/src/r128_driver.c
index bb03e80..f4a5e1b 100644
--- a/src/r128_driver.c
+++ b/src/r128_driver.c
@@ -3043,11 +3043,11 @@ static void R128RestorePLL2Registers(ScrnInfoPtr pScrn, R128SavePtr restore)
 	       restore->p2pll_ref_div,
 	       restore->p2pll_div_0,
 	       restore->htotal_cntl2,
-	       INPLL(pScrn, RADEON_P2PLL_CNTL)));
+	       INPLL(pScrn, R128_P2PLL_CNTL)));
     R128TRACE(("Wrote: rd=%d, fd=%d, pd=%d\n",
-	       restore->p2pll_ref_div & RADEON_P2PLL_REF_DIV_MASK,
-	       restore->p2pll_div_0 & RADEON_P2PLL_FB3_DIV_MASK,
-	       (restore->p2pll_div_0 & RADEON_P2PLL_POST3_DIV_MASK) >>16));
+	       restore->p2pll_ref_div & R128_P2PLL_REF_DIV_MASK,
+	       restore->p2pll_div_0 & R128_P2PLL_FB0_DIV_MASK,
+	       (restore->p2pll_div_0 & R128_P2PLL_POST0_DIV_MASK) >>16));
 
     usleep(5000); /* Let the clock to lock */
 
@@ -3895,8 +3895,8 @@ static void R128InitPLLRegisters(ScrnInfoPtr pScrn, R128SavePtr save,
 }
 
 /* Define PLL2 registers for requested video mode. */
-static void R128InitPLL2Registers(R128SavePtr save, R128PLLPtr pll,
-				   double dot_clock)
+static void R128InitPLL2Registers(ScrnInfoPtr pScrn, R128SavePtr save,
+				   R128PLLPtr pll, double dot_clock)
 {
     unsigned long freq = dot_clock * 100;
     struct {
@@ -4158,7 +4158,7 @@ static Bool R128Init(ScrnInfoPtr pScrn, DisplayModePtr mode, R128SavePtr save)
         if (!R128InitCrtc2Registers(pScrn, save, 
              pScrn->currentMode,info)) 
             return FALSE;
-        R128InitPLL2Registers(save, &info->pll, dot_clock);
+        R128InitPLL2Registers(pScrn, save, &info->pll, dot_clock);
         if (!R128InitDDA2Registers(pScrn, save, &info->pll, info, mode))
 	    return FALSE;
     }

commit c16d4e8bc068cb8127fa95347d26c7b80258f816
Author: Connor Behan <connor.behan@gmail.com>
Date:   Mon Jul 16 12:56:00 2012 -0700

    Add EXA support
    
    This introduces EXA acceleration which can improve performance and allow
    2D acceleration to be used without XAA. Implemented hooks are Solid,
    Copy and Composite. They appear to pass all rendercheck tests, except
    the gradient test which XAA also fails. Tested on multiple color depths,
    with and without DRI, with and without the composite extension. Hardware
    cursor, Xvideo and page flipping are supported as well.
    Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=47866
    
    [ Michel Dänzer: Drop unrelated addition of #include "r128_version.h" ]
    
    Signed-off-by: Connor Behan <connor.behan@gmail.com>
    Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>

diff --git a/configure.ac b/configure.ac
index e45a402..edb65a3 100644
--- a/configure.ac
+++ b/configure.ac
@@ -63,6 +63,11 @@ AC_ARG_ENABLE(dri, AS_HELP_STRING([--disable-dri],
               [DRI="$enableval"],
               [DRI=auto])
 
+AC_ARG_ENABLE(exa, AS_HELP_STRING([--disable-exa],
+				  [Disable EXA support [[default=enabled]]]),
+              [EXA="$enableval"],
+              [EXA=yes])
+
 # Store the list of server defined optional extensions in REQUIRED_MODULES
 XORG_DRIVER_CHECK_EXT(RANDR, randrproto)
 XORG_DRIVER_CHECK_EXT(RENDER, renderproto)
@@ -112,6 +117,39 @@ fi
 
 SAVE_CPPFLAGS="$CPPFLAGS"
 CPPFLAGS="$CPPFLAGS $XORG_CFLAGS"
+# Properly handle EXA.
+AC_MSG_CHECKING([whether to enable EXA support])
+if test "x$EXA" = xyes; then
+        AC_MSG_RESULT(yes)
+
+        SAVE_CPPFLAGS="$CPPFLAGS"
+        CPPFLAGS="$CPPFLAGS $XORG_CFLAGS"
+        AC_CHECK_HEADER(exa.h,
+                       [have_exa_h="yes"], [have_exa_h="no"])
+        CPPFLAGS="$SAVE_CPPFLAGS"
+else
+        AC_MSG_RESULT(no)
+fi
+
+SAVE_CPPFLAGS="$CPPFLAGS"
+CPPFLAGS="$CPPFLAGS $XORG_CFLAGS"
+if test "x$have_exa_h" = xyes; then
+        AC_MSG_CHECKING([whether EXA version is at least 2.0.0])
+        AC_PREPROC_IFELSE([AC_LANG_PROGRAM([[
+#include "exa.h"
+#if EXA_VERSION_MAJOR < 2
+#error OLD EXA!
+#endif
+                          ]])],
+                          [USE_EXA=yes],
+                          [USE_EXA=no])
+        AC_MSG_RESULT($USE_EXA)
+
+        if test "x$USE_EXA" = xyes; then
+                AC_DEFINE(USE_EXA, 1, [Build support for Exa])
+        fi
+fi
+
 AC_CHECK_DECL(XSERVER_LIBPCIACCESS,
 	      [XSERVER_LIBPCIACCESS=yes],[XSERVER_LIBPCIACCESS=no],
 	      [#include "xorg-server.h"])
@@ -143,6 +181,66 @@ if test "x$XSERVER_LIBPCIACCESS" = xyes; then
 fi
 AM_CONDITIONAL(XSERVER_LIBPCIACCESS, test "x$XSERVER_LIBPCIACCESS" = xyes)
 
+# Checks for headers/macros for byte swapping
+# Known variants:
+#	<byteswap.h> bswap_16, bswap_32, bswap_64  (glibc)
+#	<sys/endian.h> __swap16, __swap32, __swap64 (OpenBSD)
+#	<sys/endian.h> bswap16, bswap32, bswap64 (other BSD's)
+#	and a fallback to local macros if none of the above are found
+
+# if <byteswap.h> is found, assume it's the correct version
+AC_CHECK_HEADERS([byteswap.h])
+
+# if <sys/endian.h> is found, have to check which version
+AC_CHECK_HEADER([sys/endian.h], [HAVE_SYS_ENDIAN_H="yes"], [HAVE_SYS_ENDIAN_H="no"])
+
+if test "x$HAVE_SYS_ENDIAN_H" = "xyes" ; then
+	AC_MSG_CHECKING([for __swap16 variant of <sys/endian.h> byteswapping macros])
+	AC_LINK_IFELSE([AC_LANG_PROGRAM([
+#include <sys/types.h>
+#include <sys/endian.h>
+ ], [
+int a = 1, b;
+b = __swap16(a);
+ ])
+], [SYS_ENDIAN__SWAP='yes'], [SYS_ENDIAN__SWAP='no'])
+	AC_MSG_RESULT([$SYS_ENDIAN__SWAP])
+
+	AC_MSG_CHECKING([for bswap16 variant of <sys/endian.h> byteswapping macros])
+	AC_LINK_IFELSE([AC_LANG_PROGRAM([
+#include <sys/types.h>
+#include <sys/endian.h>
+ ], [
+int a = 1, b;
+b = bswap16(a);
+ ])
+], [SYS_ENDIAN_BSWAP='yes'], [SYS_ENDIAN_BSWAP='no'])
+	AC_MSG_RESULT([$SYS_ENDIAN_BSWAP])
+
+	if test "$SYS_ENDIAN_BSWAP" = "yes" ; then
+		USE_SYS_ENDIAN_H=yes
+		BSWAP=bswap
+	else
+		if test "$SYS_ENDIAN__SWAP" = "yes" ; then
+			USE_SYS_ENDIAN_H=yes
+			BSWAP=__swap
+		else
+			USE_SYS_ENDIAN_H=no
+		fi
+	fi
+
+	if test "$USE_SYS_ENDIAN_H" = "yes" ; then
+	    AC_DEFINE([USE_SYS_ENDIAN_H], 1,
+		[Define to use byteswap macros from <sys/endian.h>])
+	    AC_DEFINE_UNQUOTED([bswap_16], ${BSWAP}16,
+			[Define to 16-bit byteswap macro])
+	    AC_DEFINE_UNQUOTED([bswap_32], ${BSWAP}32,
+			[Define to 32-bit byteswap macro])
+	    AC_DEFINE_UNQUOTED([bswap_64], ${BSWAP}64,
+			[Define to 64-bit byteswap macro])
+	fi
+fi
+
 AC_SUBST([moduledir])
 
 DRIVER_NAME=r128
diff --git a/man/r128.man b/man/r128.man
index 4ba933d..d490f93 100644
--- a/man/r128.man
+++ b/man/r128.man
@@ -57,6 +57,27 @@ Enables or disables all hardware acceleration.  The default is to
 .B enable
 hardware acceleration.
 .TP
+.BI "Option \*qEnablePageFlip\*q \*q" boolean \*q
+Enable page flipping for 3D acceleration. This will increase performance
+but not work correctly in some rare cases, hence the default is
+.B off.
+.TP
+.BI "Option \*qRenderAccel\*q \*q" boolean \*q
+Enables or disables hardware Render acceleration.  It is only supported when
+using EXA acceleration and DRI.  The default is to
+.B enable
+Render acceleration.
+.TP
+.BI "Option \*qAccelMethod\*q \*q" "string" \*q
+Chooses between available acceleration architectures.  Valid options are
+.B XAA
+and
+.B EXA.
+XAA is the traditional acceleration architecture and support for it is very
+stable.  EXA is a newer acceleration architecture with better performance for
+the Render and Composite extensions.  The default is
+.B XAA.
+.TP
 .BI "Option \*qDac6Bit\*q \*q" boolean \*q
 Enables or disables the use of 6 bits per color component when in 8 bpp
 mode (emulates VGA mode).  By default, all 8 bits per color component
diff --git a/src/Makefile.am b/src/Makefile.am
index f8bc8d1..4ee9725 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -30,6 +30,10 @@ if DRI
 R128_DRI_SRCS = r128_dri.c
 endif
 
+if USE_EXA
+R128_EXA_SRCS = r128_exa.c
+endif
+
 AM_CFLAGS = @XORG_CFLAGS@ @DRI_CFLAGS@
 
 r128_drv_la_LTLIBRARIES = r128_drv.la
@@ -37,7 +41,7 @@ r128_drv_la_LDFLAGS = -module -avoid-version
 r128_drv_ladir = @moduledir@/drivers
 r128_drv_la_SOURCES = \
 	r128_accel.c r128_cursor.c r128_dga.c r128_driver.c \
-	r128_video.c r128_misc.c r128_probe.c $(R128_DRI_SRCS)
+	r128_video.c r128_misc.c r128_probe.c $(R128_EXA_SRCS) $(R128_DRI_SRCS)
 
 EXTRA_DIST = \
         compat-api.h \
diff --git a/src/r128.h b/src/r128.h
index bee1562..fe42f79 100644
--- a/src/r128.h
+++ b/src/r128.h
@@ -43,6 +43,11 @@
 				/* PCI support */
 #include "xf86Pci.h"
 
+				/* EXA support */
+#ifdef USE_EXA
+#include "exa.h"
+#endif
+
 				/* XAA and Cursor Support */
 #ifdef HAVE_XAA_H
 #include "xaa.h"
@@ -75,6 +80,36 @@
 
 #include "r128_probe.h"
 
+#if HAVE_BYTESWAP_H
+#include <byteswap.h>
+#elif defined(USE_SYS_ENDIAN_H)
+#include <sys/endian.h>
+#else
+#define bswap_16(value)  \
+        ((((value) & 0xff) << 8) | ((value) >> 8))
+
+#define bswap_32(value) \
+        (((uint32_t)bswap_16((uint16_t)((value) & 0xffff)) << 16) | \
+        (uint32_t)bswap_16((uint16_t)((value) >> 16)))
+
+#define bswap_64(value) \
+        (((uint64_t)bswap_32((uint32_t)((value) & 0xffffffff)) \
+            << 32) | \
+        (uint64_t)bswap_32((uint32_t)((value) >> 32)))
+#endif
+
+#if X_BYTE_ORDER == X_BIG_ENDIAN
+#define le32_to_cpu(x) bswap_32(x)
+#define le16_to_cpu(x) bswap_16(x)
+#define cpu_to_le32(x) bswap_32(x)
+#define cpu_to_le16(x) bswap_16(x)
+#else
+#define le32_to_cpu(x) (x)
+#define le16_to_cpu(x) (x)
+#define cpu_to_le32(x) (x)
+#define cpu_to_le16(x) (x)
+#endif
+
 #define R128_DEBUG          0   /* Turn off debugging output               */
 #define R128_IDLE_RETRY    32   /* Fall out of idle loops after this count */
 #define R128_TIMEOUT  2000000   /* Fall out of wait loops after this count */
@@ -83,6 +118,7 @@
 #define R128_VBIOS_SIZE 0x00010000
 
 #if R128_DEBUG
+
 #define R128TRACE(x)                                          \
     do {                                                      \
 	ErrorF("(**) %s(%d): ", R128_NAME, pScrn->scrnIndex); \
@@ -233,6 +269,36 @@ typedef enum
     MT_STV
 } R128MonitorType;
 


Reply to: