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

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



 ChangeLog                           |  232 ++
 configure.ac                        |    7 
 debian/changelog                    |    6 
 man/ati.man                         |    1 
 man/radeon.man                      |   21 
 src/Makefile.am                     |    7 
 src/atombios_crtc.c                 |   24 
 src/atombios_output.c               |    9 
 src/evergreen_accel.c               | 1115 +++++++++
 src/evergreen_exa.c                 | 1950 +++++++++++++++++
 src/evergreen_reg.h                 |  247 ++
 src/evergreen_reg_auto.h            | 4039 ++++++++++++++++++++++++++++++++++++
 src/evergreen_shader.c              | 2794 ++++++++++++++++++++++++
 src/evergreen_shader.h              |  292 ++
 src/evergreen_state.h               |  341 +++
 src/evergreen_textured_videofuncs.c |  560 ++++
 src/r600_exa.c                      |  144 -
 src/r600_state.h                    |   42 
 src/r600_textured_videofuncs.c      |   60 
 src/r6xx_accel.c                    |  122 -
 src/radeon.h                        |   43 
 src/radeon_accel.c                  |    8 
 src/radeon_atombios.c               |    5 
 src/radeon_cursor.c                 |   41 
 src/radeon_dri2.c                   |  256 +-
 src/radeon_driver.c                 |   18 
 src/radeon_exa_shared.c             |   50 
 src/radeon_exa_shared.h             |    4 
 src/radeon_kms.c                    |   35 
 src/radeon_output.c                 |    3 
 src/radeon_reg.h                    |    6 
 src/radeon_textured_video.c         |   31 
 src/radeon_vbo.c                    |   38 
 src/radeon_vbo.h                    |   42 
 src/radeon_video.c                  |    2 
 35 files changed, 12227 insertions(+), 368 deletions(-)

New commits:
commit 22d7aa75ba4e37f8027033b21d277bc9e0b30510
Author: Cyril Brulebois <kibi@debian.org>
Date:   Sun Oct 17 23:01:19 2010 +0200

    Update changelogs.

diff --git a/ChangeLog b/ChangeLog
index 5fcd1dd..3a6a39c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,165 @@
+commit 042037e485396981cf4a420c247104ba5d016ca0
+Author: Alex Deucher <alexdeucher@gmail.com>
+Date:   Thu Oct 14 17:00:51 2010 -0400
+
+    evergreen: requires same cursor fix as avivo chips
+
+commit 0f37458c253aec46d98db6661c4def711df8fc17
+Author: Adam Jackson <ajax@redhat.com>
+Date:   Thu Oct 14 14:37:34 2010 -0400
+
+    Don't allow the config file to override BIOS location
+    
+    Signed-off-by: Adam Jackson <ajax@redhat.com>
+
+commit 2918df3a312fc600e83f84c298b9653d2eb3a8d5
+Author: Alex Deucher <alexdeucher@gmail.com>
+Date:   Wed Oct 13 17:16:04 2010 -0400
+
+    evergreen: increase XV_CRTC Xv attribute range
+    
+    Cover all 6 possible crtcs.
+
+commit 0d1f9fd03d0196dda5c1ce34b2e68b007c1874f2
+Author: Alex Deucher <alexdeucher@gmail.com>
+Date:   Sun Oct 10 12:06:22 2010 -0400
+
+    DCE3+: UMS modesetting fixes
+    
+    - add mising LVTMA case statement for DCE3.0 dig encoder
+    - some DCE4 systems have EN/DISABLE_OUTPUT actions
+
+commit acf4024aa0ef192355b2bd8281507b1c2e6b7de4
+Author: Alex Deucher <alexdeucher@gmail.com>
+Date:   Fri Oct 8 16:30:36 2010 -0400
+
+    ATOM DDC fixes for UMS
+    
+    - Header size was already subtraced from table size
+    - Only hw capable ddc pads are shared with aux
+
+commit 74fd2b91477106a26a2d9fb4b11c885910996041
+Author: Alex Deucher <alexdeucher@gmail.com>
+Date:   Thu Oct 7 17:33:00 2010 -0400
+
+    DCE3.2 UMS: fix duallink
+    
+    Should fix:
+    https://bugs.freedesktop.org/show_bug.cgi?id=30686
+
+commit 8c544272f218fd8bd93a898b96afedc2498b27bb
+Author: Alex Deucher <alexdeucher@gmail.com>
+Date:   Thu Oct 7 17:25:47 2010 -0400
+
+    fix the non-kms build
+    
+    Should fix:
+    https://bugs.freedesktop.org/show_bug.cgi?id=30685
+
+commit 81360adffb2a66b9a95a38671f9227a9718c9841
+Author: Oldřich Jedlička <oldium.pro@seznam.cz>
+Date:   Mon Sep 6 21:14:52 2010 +0200
+
+    radeon: proper DRI2 pending events handling when client gone. (v6)
+    
+    Properly handle asynchronous DRI2 events for disconnected clients.
+    Track client's pending requests and mark them as invalid when the
+    client disconnects.
+    
+    This is based on the version from Alban Browaeys in bug #29065.
+    
+    v1 (Alban Browaeys): Based upon a detailed explanation from Oldřich
+    Jedlička and comments from Christopher James Halse Rogers.
+    on http://lists.x.org/archives/xorg-driver-ati/2010-August/016780.html .
+    
+    v2: Updated version to apply on master. Removed unnecessary
+    client_index field from _DRI2FrameEvent. Added freeing/removing from
+    list to failed paths of radeon_dri2_schedule_wait_msc and
+    radeon_dri2_schedule_swap.
+    
+    v3: Adopt to older xorg-server that doesn't have dixRegisterPrivateKey.
+    
+    v4: Conditional include of list.h, unreachable return removed.
+    
+    v5: Distribute list.h as xorg_list.h, remove xorg-server version check.
+    Use the version from xorg-server when available (checked in
+    configure.ac).
+    
+    v6: Removed xorg_list.h, made DRI2 scheduling features dependent on
+    list.h presence.
+
+commit adee138f007e26307f1aab7f8fe066150c12e55d
+Author: Jesse Adkins <jesserayadkins@gmail.com>
+Date:   Tue Sep 28 13:29:50 2010 -0700
+
+    Purge cvs tags.
+    
+    Signed-off-by: Jesse Adkins <jesserayadkins@gmail.com>
+    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+
+commit f1bf9cbb471d60ee4b0422bc4e896e3b86f4d75f
+Author: Alex Deucher <alexdeucher@gmail.com>
+Date:   Wed Oct 6 11:44:42 2010 -0400
+
+    radeon: man page updates
+    
+    - tv-out is not supported on carding using
+    the rage theatre chip for tv-out
+    - add evergreen cards to the list
+
+commit 0921ecc1c751df0dd56e0b1d0b78ab53d7164904
+Author: Alex Deucher <alexdeucher@gmail.com>
+Date:   Mon Oct 4 12:34:47 2010 -0400
+
+    evergreen: use EXACreatePixmap2 if available
+
+commit 5bdb6434975584eef90eb9e5955b9c2a14b7f327
+Author: Alex Deucher <alexdeucher@gmail.com>
+Date:   Mon Oct 4 12:31:51 2010 -0400
+
+    evergreen: port Karl's UTS/DFS changes to evergreen
+
+commit be8f45cbd313b68ad663f303c64edb4525b8f981
+Merge: e843faf ff5f466
+Author: Alex Deucher <alexdeucher@gmail.com>
+Date:   Mon Oct 4 12:36:56 2010 -0400
+
+    Merge branch 'evergreen_accel' of git+ssh://git.freedesktop.org/git/xorg/driver/xf86-video-ati
+
+commit ff5f466e6ca0ee541a255facff6c9198976dfd52
+Author: Alex Deucher <alexdeucher@gmail.com>
+Date:   Fri Oct 1 15:46:43 2010 -0400
+
+    evergreen/dri2: fix depth allocation for depth+stencil
+    
+    evergreen uses separate allocations for depth and stencil,
+    so to handle that, create a depth buffer large enough to
+    handle both.  This is required for using the stencil
+    buffer in mesa.
+
+commit e843faf355c864beab81e74f0e39f8ad53d4c2bf
+Author: Alex Deucher <alexdeucher@gmail.com>
+Date:   Thu Sep 30 19:30:35 2010 -0400
+
+    radeon: fix fbLocation for >32 bit MC addresses
+    
+    If the fbLocation was at an address >32 bits, we'd fail.
+    Change fbLocation to uint64_t and properly cast when needed.
+
+commit 886febc882053e09294225e85b102f965041b62b
+Author: Alex Deucher <alexdeucher@gmail.com>
+Date:   Thu Sep 30 19:20:17 2010 -0400
+
+    r6xx: fix bad mask when setting up HDP_NONSURFACE_BASE
+    
+    This fails for MC addresses >32 bits
+
+commit 16589b862feb796e15dc6e471d25604a4f5e7c1c
+Author: Alex Deucher <alexdeucher@gmail.com>
+Date:   Mon Sep 27 18:28:43 2010 -0400
+
+    bump version post release
+
 commit cc5005af61f45a3552f7358dc5aa711e42f5af54
 Author: Alex Deucher <alexdeucher@gmail.com>
 Date:   Mon Sep 27 18:20:53 2010 -0400
@@ -96,6 +258,12 @@ Date:   Sat Aug 21 21:44:39 2010 +1200
     radeon_bo_is_busy() may return without setting the domain out-parameter.
     If this happens, then download via a scratch GTT BO to avoid CPU VRAM read.
 
+commit e26a59e9db8067882327f872e3d2d760ce4c66f3
+Author: Mathieu Bérard <mathieu@mberard.eu>
+Date:   Thu Sep 9 19:32:38 2010 -0400
+
+    Fix NULL possible deref in evergreen_cp_wait_vline_sync
+
 commit b90cb61ccb0f4f80e0627141f223354a9371d47d
 Author: Alex Deucher <alexdeucher@gmail.com>
 Date:   Tue Sep 7 11:51:16 2010 -0400
@@ -108,6 +276,28 @@ Date:   Tue Sep 7 11:51:16 2010 -0400
     Should fix:
     https://bugs.freedesktop.org/show_bug.cgi?id=29591
 
+commit 7cc0d3311f23ad569af004e0e4a0e2efbac107e5
+Author: Alex Deucher <alexdeucher@gmail.com>
+Date:   Fri Sep 3 00:32:27 2010 -0400
+
+    evergreen: fix Xv
+    
+    VS const buffer offset was wrong.
+    
+    fixes:
+    https://bugs.freedesktop.org/show_bug.cgi?id=29788
+
+commit 7c6ce4e62693f446d7d3c8a86502ccc03c0e55b0
+Author: Alex Deucher <alexdeucher@gmail.com>
+Date:   Thu Sep 2 20:34:56 2010 -0400
+
+    evergreen: add additional default state
+    
+    Note, you also need a drm patch to fix the GPU hangs:
+    drm/radeon/kms/evergreen: fix gpu hangs in userspace accel code
+    
+    Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
+
 commit 2b98ec1f7e931019a4ab699a56d5dfaa395946fb
 Author: Alex Deucher <alexdeucher@gmail.com>
 Date:   Wed Sep 1 13:24:19 2010 -0400
@@ -214,6 +404,35 @@ Date:   Wed Aug 25 08:56:37 2010 +1000
     
     Signed-off-by: Dave Airlie <airlied@redhat.com>
 
+commit 141cbc283fddeb67c2a6c47a0f0f5c2aa2bfb430
+Author: Alex Deucher <alexdeucher@gmail.com>
+Date:   Tue Aug 24 18:01:05 2010 -0400
+
+    evergreen Xv: remove stray line that caused a segfault
+    
+    fixes:
+    https://bugs.freedesktop.org/show_bug.cgi?id=29788
+
+commit f170dddd3538a587f2363ef5fa10a4b484e762da
+Author: Alex Deucher <alexdeucher@gmail.com>
+Date:   Mon Aug 23 18:58:12 2010 -0400
+
+    evergreen: use vbo pool for constant buffers
+
+commit eede93b057bbdddcde5da3220a3f8c6f73784a7e
+Author: Alex Deucher <alexdeucher@gmail.com>
+Date:   Mon Aug 23 13:16:27 2010 -0400
+
+    radeon: move vbo data to a separate struct
+    
+    this way we can share the vbo code with const buffers
+
+commit d8abf27dbd14f5eb746c5e8b8b1436ad292d8ec6
+Author: Alex Deucher <alexdeucher@gmail.com>
+Date:   Mon Aug 23 01:31:27 2010 -0400
+
+    evergreen: fix dword counts in default state
+
 commit 5a7c9d94733a0db1d3565447acc9f0e751db5950
 Author: Alex Deucher <alexdeucher@gmail.com>
 Date:   Mon Aug 23 00:43:48 2010 -0400
@@ -227,6 +446,19 @@ Date:   Mon Aug 23 00:43:48 2010 -0400
     
     Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
 
+commit 6930d2c981221757b1e11ef194809f085753a611
+Author: Alex Deucher <alexdeucher@gmail.com>
+Date:   Fri Aug 20 16:55:21 2010 -0400
+
+    Add initial EXA and Xv support for evergreen
+    
+    Based on the r6xx/r7xx code updated for evergreen.
+    Still causes GPU hangs in some cases.  We haven't
+    tracked down why yet.  Might be related to constant
+    buffer persistence.
+    
+    Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
+
 commit bdd41fecdb19c83c6c7b793016b61d38065dcd13
 Author: Alex Deucher <alexdeucher@gmail.com>
 Date:   Fri Aug 20 01:17:13 2010 -0400
diff --git a/debian/changelog b/debian/changelog
index 853394d..e23e14a 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+xserver-xorg-video-ati (1:6.13.2+git20101017.042037e4-1) UNRELEASED; urgency=low
+
+  * New upstream snapshot.
+
+ -- Cyril Brulebois <kibi@debian.org>  Sun, 17 Oct 2010 22:58:37 +0200
+
 xserver-xorg-video-ati (1:6.13.2-1) UNRELEASED; urgency=low
 
   * New upstream release:

commit 042037e485396981cf4a420c247104ba5d016ca0
Author: Alex Deucher <alexdeucher@gmail.com>
Date:   Thu Oct 14 17:00:51 2010 -0400

    evergreen: requires same cursor fix as avivo chips

diff --git a/src/radeon_cursor.c b/src/radeon_cursor.c
index 9fa2d80..6c2b9e8 100644
--- a/src/radeon_cursor.c
+++ b/src/radeon_cursor.c
@@ -260,29 +260,14 @@ radeon_crtc_set_cursor_position (xf86CrtcPtr crtc, int x, int y)
     int xorigin = 0, yorigin = 0;
     int stride = 256;
     DisplayModePtr mode = &crtc->mode;
+    int w = CURSOR_WIDTH;
 
     if (x < 0)                        xorigin = -x+1;
     if (y < 0)                        yorigin = -y+1;
     if (xorigin >= CURSOR_WIDTH)  xorigin = CURSOR_WIDTH - 1;
     if (yorigin >= CURSOR_HEIGHT) yorigin = CURSOR_HEIGHT - 1;
 
-    if (IS_DCE4_VARIANT) {
-	/* avivo cursor spans the full fb width */
-	if (crtc->rotatedData == NULL) {
-	    x += crtc->x;
-	    y += crtc->y;
-	}
-
-	evergreen_lock_cursor(crtc, TRUE);
-	OUTREG(EVERGREEN_CUR_POSITION + radeon_crtc->crtc_offset, ((xorigin ? 0 : x) << 16)
-	       | (yorigin ? 0 : y));
-	OUTREG(EVERGREEN_CUR_HOT_SPOT + radeon_crtc->crtc_offset, (xorigin << 16) | yorigin);
-	OUTREG(EVERGREEN_CUR_SIZE + radeon_crtc->crtc_offset,
-	       ((CURSOR_WIDTH - 1) << 16) | (CURSOR_HEIGHT - 1));
-	evergreen_lock_cursor(crtc, FALSE);
-    } else if (IS_AVIVO_VARIANT) {
-	int w = CURSOR_WIDTH;
-
+    if (IS_AVIVO_VARIANT) {
 	/* avivo cursor spans the full fb width */
 	if (crtc->rotatedData == NULL) {
 	    x += crtc->x;
@@ -307,7 +292,17 @@ radeon_crtc_set_cursor_position (xf86CrtcPtr crtc, int x, int y)
 	    if (w <= 0)
 		w = 1;
 	}
+    }
 
+    if (IS_DCE4_VARIANT) {
+	evergreen_lock_cursor(crtc, TRUE);
+	OUTREG(EVERGREEN_CUR_POSITION + radeon_crtc->crtc_offset, ((xorigin ? 0 : x) << 16)
+	       | (yorigin ? 0 : y));
+	OUTREG(EVERGREEN_CUR_HOT_SPOT + radeon_crtc->crtc_offset, (xorigin << 16) | yorigin);
+	OUTREG(EVERGREEN_CUR_SIZE + radeon_crtc->crtc_offset,
+	       ((w - 1) << 16) | (CURSOR_HEIGHT - 1));
+	evergreen_lock_cursor(crtc, FALSE);
+    } else if (IS_AVIVO_VARIANT) {
 	avivo_lock_cursor(crtc, TRUE);
 	OUTREG(AVIVO_D1CUR_POSITION + radeon_crtc->crtc_offset, ((xorigin ? 0 : x) << 16)
 	       | (yorigin ? 0 : y));

commit 0f37458c253aec46d98db6661c4def711df8fc17
Author: Adam Jackson <ajax@redhat.com>
Date:   Thu Oct 14 14:37:34 2010 -0400

    Don't allow the config file to override BIOS location
    
    Signed-off-by: Adam Jackson <ajax@redhat.com>

diff --git a/src/radeon_driver.c b/src/radeon_driver.c
index 6efb172..9e72c2d 100644
--- a/src/radeon_driver.c
+++ b/src/radeon_driver.c
@@ -1948,14 +1948,6 @@ static Bool RADEONPreInitChipType(ScrnInfoPtr pScrn)
 				/* BIOS */
     from              = X_PROBED;
     info->BIOSAddr    = info->PciInfo->biosBase & 0xfffe0000;
-    if (dev->BiosBase) {
-	xf86DrvMsg(pScrn->scrnIndex, X_INFO,
-		   "BIOS address override, using 0x%08lx instead of 0x%08lx\n",
-		   (unsigned long)dev->BiosBase,
-		   (unsigned long)info->BIOSAddr);
-	info->BIOSAddr = dev->BiosBase;
-	from           = X_CONFIG;
-    }
     if (info->BIOSAddr) {
 	xf86DrvMsg(pScrn->scrnIndex, from,
 		   "BIOS at 0x%08lx\n", (unsigned long)info->BIOSAddr);

commit 2918df3a312fc600e83f84c298b9653d2eb3a8d5
Author: Alex Deucher <alexdeucher@gmail.com>
Date:   Wed Oct 13 17:16:04 2010 -0400

    evergreen: increase XV_CRTC Xv attribute range
    
    Cover all 6 possible crtcs.

diff --git a/src/radeon_textured_video.c b/src/radeon_textured_video.c
index 0d8d2aa..36bcb56 100644
--- a/src/radeon_textured_video.c
+++ b/src/radeon_textured_video.c
@@ -614,6 +614,18 @@ static XF86AttributeRec Attributes_r600[NUM_ATTRIBUTES_R600+1] =
     {0, 0, 0, NULL}
 };
 
+static XF86AttributeRec Attributes_eg[NUM_ATTRIBUTES_R600+1] =
+{
+    {XvSettable | XvGettable, 0, 1, "XV_VSYNC"},
+    {XvSettable | XvGettable, -1000, 1000, "XV_BRIGHTNESS"},
+    {XvSettable | XvGettable, -1000, 1000, "XV_CONTRAST"},
+    {XvSettable | XvGettable, -1000, 1000, "XV_SATURATION"},
+    {XvSettable | XvGettable, -1000, 1000, "XV_HUE"},
+    {XvSettable | XvGettable, 0, 1, "XV_COLORSPACE"},
+    {XvSettable | XvGettable, -1, 5, "XV_CRTC"},
+    {0, 0, 0, NULL}
+};
+
 static Atom xvBicubic;
 static Atom xvVSync;
 static Atom xvBrightness, xvContrast, xvSaturation, xvHue;
@@ -811,7 +823,11 @@ RADEONSetupImageTexturedVideo(ScreenPtr pScreen)
     pPortPriv =
 	(RADEONPortPrivPtr)(&adapt->pPortPrivates[num_texture_ports]);
 
-    if (IS_R600_3D) {
+    if (IS_EVERGREEN_3D) {
+	adapt->pAttributes = Attributes_eg;
+	adapt->nAttributes = NUM_ATTRIBUTES_R600;
+    }
+    else if (IS_R600_3D) {
 	adapt->pAttributes = Attributes_r600;
 	adapt->nAttributes = NUM_ATTRIBUTES_R600;
     }

commit 0d1f9fd03d0196dda5c1ce34b2e68b007c1874f2
Author: Alex Deucher <alexdeucher@gmail.com>
Date:   Sun Oct 10 12:06:22 2010 -0400

    DCE3+: UMS modesetting fixes
    
    - add mising LVTMA case statement for DCE3.0 dig encoder
    - some DCE4 systems have EN/DISABLE_OUTPUT actions

diff --git a/src/atombios_output.c b/src/atombios_output.c
index e1340fe..a028be0 100644
--- a/src/atombios_output.c
+++ b/src/atombios_output.c
@@ -641,6 +641,7 @@ atombios_output_dig_encoder_setup(xf86OutputPtr output, int action)
 	    disp_data.v1.ucConfig = ATOM_ENCODER_CONFIG_V2_TRANSMITTER1;
 	    break;
 	case ENCODER_OBJECT_ID_INTERNAL_UNIPHY1:
+	case ENCODER_OBJECT_ID_INTERNAL_KLDSCP_LVTMA:
 	    disp_data.v1.ucConfig = ATOM_ENCODER_CONFIG_V2_TRANSMITTER2;
 	    break;
 	case ENCODER_OBJECT_ID_INTERNAL_UNIPHY2:
@@ -1358,8 +1359,7 @@ atombios_output_dpms(xf86OutputPtr output, int mode)
     case DPMSModeOn:
 	radeon_encoder->devices |= radeon_output->active_device;
 	if (is_dig) {
-	    if (!IS_DCE4_VARIANT)
-		atombios_output_dig_transmitter_setup(output, ATOM_TRANSMITTER_ACTION_ENABLE_OUTPUT, 0, 0);
+	    atombios_output_dig_transmitter_setup(output, ATOM_TRANSMITTER_ACTION_ENABLE_OUTPUT, 0, 0);
 	    if (((radeon_output->ConnectorType == CONNECTOR_DISPLAY_PORT) ||
 		 (radeon_output->ConnectorType == CONNECTOR_EDP)) &&
 		(radeon_output->MonType == MT_DP)) {
@@ -1391,8 +1391,7 @@ atombios_output_dpms(xf86OutputPtr output, int mode)
 	radeon_encoder->devices &= ~(radeon_output->active_device);
 	if (!radeon_encoder->devices) {
 	    if (is_dig) {
-		if (!IS_DCE4_VARIANT)
-		    atombios_output_dig_transmitter_setup(output, ATOM_TRANSMITTER_ACTION_DISABLE_OUTPUT, 0, 0);
+		atombios_output_dig_transmitter_setup(output, ATOM_TRANSMITTER_ACTION_DISABLE_OUTPUT, 0, 0);
 		if (((radeon_output->ConnectorType == CONNECTOR_DISPLAY_PORT) ||
 		     (radeon_output->ConnectorType == CONNECTOR_EDP)) &&
 		    (radeon_output->MonType == MT_DP)) {

commit acf4024aa0ef192355b2bd8281507b1c2e6b7de4
Author: Alex Deucher <alexdeucher@gmail.com>
Date:   Fri Oct 8 16:30:36 2010 -0400

    ATOM DDC fixes for UMS
    
    - Header size was already subtraced from table size
    - Only hw capable ddc pads are shared with aux

diff --git a/src/radeon_atombios.c b/src/radeon_atombios.c
index 27231cd..3da6068 100644
--- a/src/radeon_atombios.c
+++ b/src/radeon_atombios.c
@@ -1533,8 +1533,7 @@ RADEONLookupGPIOLineForDDC(ScrnInfoPtr pScrn, uint8_t id)
 	return i2c;
     }
 
-    num_indices = (size - sizeof(ATOM_COMMON_TABLE_HEADER)) /
-	    sizeof(ATOM_GPIO_I2C_ASSIGMENT);
+    num_indices = size / sizeof(ATOM_GPIO_I2C_ASSIGMENT);
 
     for (i = 0; i < num_indices; i++) {
 	    gpio = &atomDataPtr->GPIO_I2C_Info->asGPIO_Info[i];
@@ -1635,7 +1634,7 @@ radeon_lookup_hpd_id(ScrnInfoPtr pScrn, ATOM_HPD_INT_RECORD *record)
 	return hpd;
     }
 
-    num_indices = (size - sizeof(ATOM_COMMON_TABLE_HEADER)) / sizeof(ATOM_GPIO_PIN_ASSIGNMENT);
+    num_indices = size / sizeof(ATOM_GPIO_PIN_ASSIGNMENT);
 
     if (IS_DCE4_VARIANT)
 	reg = EVERGREEN_DC_GPIO_HPD_A;
diff --git a/src/radeon_output.c b/src/radeon_output.c
index 283d32f..689a592 100644
--- a/src/radeon_output.c
+++ b/src/radeon_output.c
@@ -1875,7 +1875,8 @@ RADEONI2CDoLock(xf86OutputPtr output, I2CBusPtr b, int lock_state)
 	}
 
 	/* set the pad in ddc mode */
-	if (IS_DCE3_VARIANT) {
+	if (IS_DCE3_VARIANT &&
+	    pRADEONI2CBus->hw_capable) {
 	    temp = INREG(pRADEONI2CBus->mask_clk_reg);
 	    temp &= ~(1 << 16);
 	    OUTREG(pRADEONI2CBus->mask_clk_reg, temp);

commit 74fd2b91477106a26a2d9fb4b11c885910996041
Author: Alex Deucher <alexdeucher@gmail.com>
Date:   Thu Oct 7 17:33:00 2010 -0400

    DCE3.2 UMS: fix duallink
    
    Should fix:
    https://bugs.freedesktop.org/show_bug.cgi?id=30686

diff --git a/src/atombios_output.c b/src/atombios_output.c
index 0d92bfa..e1340fe 100644
--- a/src/atombios_output.c
+++ b/src/atombios_output.c
@@ -791,6 +791,8 @@ atombios_output_dig_transmitter_setup(xf86OutputPtr output, int action, uint8_t
 	else if (radeon_output->active_device & (ATOM_DEVICE_DFP_SUPPORT)) {
 	    if (radeon_output->coherent_mode)
 		disp_data.v2.acConfig.fCoherentMode = 1;
+	    if (clock > 165000)
+		disp_data.v2.acConfig.fDualLinkConnector = 1;
 	}
     } else {
 	disp_data.v1.ucConfig = ATOM_TRANSMITTER_CONFIG_CLKSRC_PPLL;

commit 8c544272f218fd8bd93a898b96afedc2498b27bb
Author: Alex Deucher <alexdeucher@gmail.com>
Date:   Thu Oct 7 17:25:47 2010 -0400

    fix the non-kms build
    
    Should fix:
    https://bugs.freedesktop.org/show_bug.cgi?id=30685

diff --git a/src/Makefile.am b/src/Makefile.am
index e05722c..855d99c 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -132,7 +132,6 @@ EXTRA_DIST = \
 	r600_state.h \
 	evergreen_reg.h \
 	evergreen_reg_auto.h \
-	evergreen_reg_r7xx.h \
 	evergreen_shader.h \
 	evergreen_state.h \
 	ati.h \
diff --git a/src/evergreen_accel.c b/src/evergreen_accel.c
index 38666ee..92d7fa1 100644
--- a/src/evergreen_accel.c
+++ b/src/evergreen_accel.c
@@ -27,6 +27,8 @@
 #include "config.h"
 #endif
 
+#ifdef XF86DRM_MODE
+
 #include "xf86.h"
 
 #include <errno.h>
@@ -1110,3 +1112,4 @@ void evergreen_finish_op(ScrnInfoPtr pScrn, int vtx_size)
 
 }
 
+#endif
diff --git a/src/evergreen_exa.c b/src/evergreen_exa.c
index f9d3b48..19cc5bd 100644
--- a/src/evergreen_exa.c
+++ b/src/evergreen_exa.c
@@ -28,6 +28,8 @@
 #include "config.h"
 #endif
 
+#ifdef XF86DRM_MODE
+
 #include "xf86.h"
 
 #include "exa.h"
@@ -1945,3 +1947,4 @@ EVERGREENDrawInit(ScreenPtr pScreen)
 
 }
 
+#endif
diff --git a/src/evergreen_shader.c b/src/evergreen_shader.c
index 64e96d8..42cea7a 100644
--- a/src/evergreen_shader.c
+++ b/src/evergreen_shader.c
@@ -28,6 +28,8 @@
 #include "config.h"
 #endif
 
+#ifdef XF86DRM_MODE
+
 #include "xf86.h"
 
 #include "evergreen_shader.h"
@@ -2788,3 +2790,5 @@ int evergreen_comp_ps(RADEONChipFamily ChipSet, uint32_t* shader)
 
     return i;
 }
+
+#endif
diff --git a/src/evergreen_textured_videofuncs.c b/src/evergreen_textured_videofuncs.c
index a674680..428876f 100644
--- a/src/evergreen_textured_videofuncs.c
+++ b/src/evergreen_textured_videofuncs.c
@@ -28,6 +28,8 @@
 #include "config.h"
 #endif
 
+#ifdef XF86DRM_MODE
+
 #include "xf86.h"
 
 #include "exa.h"
@@ -554,3 +556,5 @@ EVERGREENDisplayTexturedVideo(ScrnInfoPtr pScrn, RADEONPortPrivPtr pPriv)
 
     DamageDamageRegion(pPriv->pDraw, &pPriv->clip);
 }
+
+#endif
diff --git a/src/radeon.h b/src/radeon.h
index 6d5a282..21c6d1c 100644
--- a/src/radeon.h
+++ b/src/radeon.h
@@ -1293,9 +1293,11 @@ extern void RADEONDoPrepareCopyMMIO(ScrnInfoPtr pScrn,
 				    Pixel planemask);
 extern Bool R600DrawInit(ScreenPtr pScreen);
 extern Bool R600LoadShaders(ScrnInfoPtr pScrn);
+#ifdef XF86DRM_MODE
 extern Bool EVERGREENDrawInit(ScreenPtr pScreen);
 extern Bool EVERGREENLoadShaders(ScrnInfoPtr pScrn);
 #endif
+#endif
 
 #if defined(XF86DRI) && defined(USE_EXA)
 /* radeon_exa.c */
diff --git a/src/radeon_accel.c b/src/radeon_accel.c
index 8fc515d..1e20e56 100644
--- a/src/radeon_accel.c
+++ b/src/radeon_accel.c
@@ -1072,10 +1072,13 @@ Bool RADEONAccelInit(ScreenPtr pScreen)
     if (info->useEXA) {
 # ifdef XF86DRI
 	if (info->directRenderingEnabled) {
+#ifdef XF86DRM_MODE
 	    if (info->ChipFamily >= CHIP_FAMILY_CEDAR) {
 		if (!EVERGREENDrawInit(pScreen))
 		    return FALSE;
-	    } else if (info->ChipFamily >= CHIP_FAMILY_R600) {
+	    } else
+#endif
+	      if (info->ChipFamily >= CHIP_FAMILY_R600) {
 		if (!R600DrawInit(pScreen))
 		    return FALSE;
 	    } else {
diff --git a/src/radeon_textured_video.c b/src/radeon_textured_video.c
index f682811..0d8d2aa 100644
--- a/src/radeon_textured_video.c
+++ b/src/radeon_textured_video.c
@@ -46,8 +46,10 @@
 extern void
 R600DisplayTexturedVideo(ScrnInfoPtr pScrn, RADEONPortPrivPtr pPriv);
 
+#ifdef XF86DRM_MODE
 extern void
 EVERGREENDisplayTexturedVideo(ScrnInfoPtr pScrn, RADEONPortPrivPtr pPriv);
+#endif
 
 extern Bool
 R600CopyToVRAM(ScrnInfoPtr pScrn,
@@ -475,9 +477,12 @@ RADEONPutImageTextured(ScrnInfoPtr pScrn,
 #endif
 #ifdef XF86DRI
     if (info->directRenderingEnabled) {
+#ifdef XF86DRM_MODE
 	if (IS_EVERGREEN_3D)
 	    EVERGREENDisplayTexturedVideo(pScrn, pPriv);
-	else if (IS_R600_3D)
+	else
+#endif
+	  if (IS_R600_3D)
 	    R600DisplayTexturedVideo(pScrn, pPriv);
 	else if (IS_R500_3D)
 	    R500DisplayTexturedVideoCP(pScrn, pPriv);
diff --git a/src/radeon_vbo.h b/src/radeon_vbo.h
index 21533c2..f64930e 100644
--- a/src/radeon_vbo.h
+++ b/src/radeon_vbo.h
@@ -24,7 +24,9 @@ radeon_vbo_space(ScrnInfoPtr pScrn,
 		 struct radeon_vbo_object *vbo,
 		 int vert_size)
 {
+#if defined(XF86DRM_MODE)
     RADEONInfoPtr info = RADEONPTR(pScrn);
+#endif
     void *vb;
 
     /* we've ran out of space in the vertex buffer - need to get a

commit 81360adffb2a66b9a95a38671f9227a9718c9841
Author: Oldřich Jedlička <oldium.pro@seznam.cz>
Date:   Mon Sep 6 21:14:52 2010 +0200

    radeon: proper DRI2 pending events handling when client gone. (v6)
    
    Properly handle asynchronous DRI2 events for disconnected clients.
    Track client's pending requests and mark them as invalid when the
    client disconnects.
    
    This is based on the version from Alban Browaeys in bug #29065.
    
    v1 (Alban Browaeys): Based upon a detailed explanation from Oldřich
    Jedlička and comments from Christopher James Halse Rogers.
    on http://lists.x.org/archives/xorg-driver-ati/2010-August/016780.html .
    
    v2: Updated version to apply on master. Removed unnecessary
    client_index field from _DRI2FrameEvent. Added freeing/removing from
    list to failed paths of radeon_dri2_schedule_wait_msc and
    radeon_dri2_schedule_swap.
    
    v3: Adopt to older xorg-server that doesn't have dixRegisterPrivateKey.
    
    v4: Conditional include of list.h, unreachable return removed.
    
    v5: Distribute list.h as xorg_list.h, remove xorg-server version check.
    Use the version from xorg-server when available (checked in
    configure.ac).
    
    v6: Removed xorg_list.h, made DRI2 scheduling features dependent on
    list.h presence.

diff --git a/configure.ac b/configure.ac
index decc46f..5dbf65a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -233,6 +233,11 @@ AC_CHECK_DECL(XSERVER_LIBPCIACCESS,
 	      [XSERVER_LIBPCIACCESS=yes],[XSERVER_LIBPCIACCESS=no],
 	      [#include "xorg-server.h"])
 
+AC_CHECK_HEADERS([list.h],
+		 [], [],
+		 [#include <X11/Xdefs.h>
+		  #include "xorg-server.h"])
+
 CPPFLAGS="$SAVE_CPPFLAGS"
 
 AM_CONDITIONAL(USE_EXA, test "x$USE_EXA" = xyes)
diff --git a/src/radeon_dri2.c b/src/radeon_dri2.c
index 3a315a4..2668812 100644
--- a/src/radeon_dri2.c
+++ b/src/radeon_dri2.c
@@ -38,6 +38,10 @@
 #include "radeon_dri2.h"
 #include "radeon_version.h"
 
+#if HAVE_LIST_H
+#include "list.h"
+#endif
+
 #ifdef RADEON_DRI2
 
 #include "radeon_bo_gem.h"
@@ -46,6 +50,10 @@
 #define USE_DRI2_1_1_0
 #endif
 
+#if DRI2INFOREC_VERSION >= 4 && HAVE_LIST_H
+#define USE_DRI2_SCHEDULING
+#endif
+
 #if XORG_VERSION_CURRENT >= XORG_VERSION_NUMERIC(1,6,99,0, 0)
 typedef DRI2BufferPtr BufferPtr;
 #else
@@ -426,7 +434,7 @@ radeon_dri2_copy_region(DrawablePtr drawable,
 }
 
 
-#if DRI2INFOREC_VERSION >= 4
+#ifdef USE_DRI2_SCHEDULING
 
 enum DRI2FrameEventType {
     DRI2_SWAP,
@@ -437,7 +445,6 @@ enum DRI2FrameEventType {
 typedef struct _DRI2FrameEvent {
     XID drawable_id;
     ClientPtr client;
-    int client_index;
     enum DRI2FrameEventType type;
     int frame;
 
@@ -446,8 +453,86 @@ typedef struct _DRI2FrameEvent {
     void *event_data;
     DRI2BufferPtr front;
     DRI2BufferPtr back;
+
+    Bool valid;
+
+    struct list link;
 } DRI2FrameEventRec, *DRI2FrameEventPtr;
 
+typedef struct _DRI2ClientEvents {
+    struct list   reference_list;
+} DRI2ClientEventsRec, *DRI2ClientEventsPtr;
+
+#if HAS_DEVPRIVATEKEYREC
+
+static DevPrivateKeyRec DRI2ClientEventsPrivateKeyRec;
+#define DRI2ClientEventsPrivateKey (&DRI2ClientEventsPrivateKeyRec)
+
+#else
+
+static int DRI2ClientEventsPrivateKeyIndex;
+DevPrivateKey DRI2ClientEventsPrivateKey = &DRI2ClientEventsPrivateKeyIndex;
+
+#endif /* HAS_DEVPRIVATEKEYREC */
+
+#define GetDRI2ClientEvents(pClient)	((DRI2ClientEventsPtr) \
+    dixLookupPrivate(&(pClient)->devPrivates, DRI2ClientEventsPrivateKey))
+
+static int
+ListAddDRI2ClientEvents(ClientPtr client, struct list *entry)
+{
+    DRI2ClientEventsPtr pClientPriv;
+    pClientPriv = GetDRI2ClientEvents(client);
+
+    if (!pClientPriv) {
+        return BadAlloc;
+    }
+
+    list_add(entry, &pClientPriv->reference_list);
+    return 0;
+}
+
+static void
+ListDelDRI2ClientEvents(ClientPtr client, struct list *entry)
+{
+    DRI2ClientEventsPtr pClientPriv;
+    pClientPriv = GetDRI2ClientEvents(client);
+
+    if (!pClientPriv) {
+        return;
+    }
+    list_del(entry);
+}
+
+static void
+radeon_dri2_client_state_changed(CallbackListPtr *ClientStateCallback, pointer data, pointer calldata)
+{
+    DRI2ClientEventsPtr pClientEventsPriv;
+    DRI2FrameEventPtr ref;
+    NewClientInfoRec *clientinfo = calldata;
+    ClientPtr pClient = clientinfo->client;
+    pClientEventsPriv = GetDRI2ClientEvents(pClient);
+
+    switch (pClient->clientState) {
+    case ClientStateInitial:
+        list_init(&pClientEventsPriv->reference_list);
+        break;
+    case ClientStateRunning:
+        break;
+
+    case ClientStateRetained:
+    case ClientStateGone:
+        if (pClientEventsPriv) {
+            list_for_each_entry(ref, &pClientEventsPriv->reference_list, link) {
+                ref->valid = FALSE;
+            }
+        }
+        break;
+    default:
+        break;
+    }
+}
+
 static void
 radeon_dri2_ref_buffer(BufferPtr buffer)
 {
@@ -477,28 +562,17 @@ void radeon_dri2_frame_event_handler(unsigned int frame, unsigned int tv_sec,
     BoxRec box;
     RegionRec region;
 
+    if (!event->valid)
+        goto cleanup;
+
     status = dixLookupDrawable(&drawable, event->drawable_id, serverClient,
                                M_ANY, DixWriteAccess);
-    if (status != Success) {
-        radeon_dri2_unref_buffer(event->front);
-        radeon_dri2_unref_buffer(event->back);
-        free(event);
-        return;
-    }
+    if (status != Success)
+        goto cleanup;
 
     screen = drawable->pScreen;
     scrn = xf86Screens[screen->myNum];
-
-    /* event->client may have quit between submitting a request
-     * and this callback being triggered.
-     *
-     * Check our saved client pointer against the client in the saved client
-     * slot.  This will catch almost all cases where the client that requested
-     * SwapBuffers has gone away, and will guarantee that there is at least a 
-     * valid client to write the BufferSwapComplete event to.
-     */
-    client = event->client == clients[event->client_index] ? 
-            event->client : NULL;
+    client = event->client;
 
     switch (event->type) {
     case DRI2_FLIP:
@@ -514,8 +588,6 @@ void radeon_dri2_frame_event_handler(unsigned int frame, unsigned int tv_sec,
         DRI2SwapComplete(client, drawable, frame, tv_sec, tv_usec,
                 swap_type, event->event_complete, event->event_data);
 
-        radeon_dri2_unref_buffer(event->front);
-        radeon_dri2_unref_buffer(event->back);
         break;
     case DRI2_WAITMSC:
         DRI2WaitMSCComplete(client, drawable, frame, tv_sec, tv_usec);
@@ -527,6 +599,11 @@ void radeon_dri2_frame_event_handler(unsigned int frame, unsigned int tv_sec,
         break;
     }
 
+cleanup:
+    radeon_dri2_unref_buffer(event->front);
+    radeon_dri2_unref_buffer(event->back);
+    if (event->valid)
+        ListDelDRI2ClientEvents(event->client, &event->link);
     free(event);
 }
 
@@ -600,7 +677,7 @@ static int radeon_dri2_schedule_wait_msc(ClientPtr client, DrawablePtr draw,
     ScreenPtr screen = draw->pScreen;
     ScrnInfoPtr scrn = xf86Screens[screen->myNum];
     RADEONInfoPtr info = RADEONPTR(scrn);
-    DRI2FrameEventPtr wait_info;
+    DRI2FrameEventPtr wait_info = NULL;
     drmVBlank vbl;
     int ret, crtc = radeon_dri2_drawable_crtc(draw);
     CARD64 current_msc;
@@ -621,8 +698,14 @@ static int radeon_dri2_schedule_wait_msc(ClientPtr client, DrawablePtr draw,
 
     wait_info->drawable_id = draw->id;
     wait_info->client = client;
-    wait_info->client_index = client->index;
     wait_info->type = DRI2_WAITMSC;
+    wait_info->valid = TRUE;
+
+    if (ListAddDRI2ClientEvents(client, &wait_info->link)) {
+        xf86DrvMsg(scrn->scrnIndex, X_WARNING,


Reply to: