rpms/xorg-x11-drv-ati/F-10 radeon-modeset.patch, 1.36, 1.37 xorg-x11-drv-ati.spec, 1.148, 1.149
Dave Airlie
airlied at fedoraproject.org
Tue Nov 18 02:13:25 UTC 2008
- Previous message (by thread): rpms/gwibber/F-10 .cvsignore, 1.3, 1.4 gwibber.spec, 1.4, 1.5 import.log, 1.3, 1.4 sources, 1.3, 1.4 gwibber-system-simplejson.patch, 1.1, NONE
- Next message (by thread): rpms/kernel/F-10 kernel.spec, 1.1150, 1.1151 linux-2.6-cdrom-door-status.patch, 1.2, 1.3
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Author: airlied
Update of /cvs/pkgs/rpms/xorg-x11-drv-ati/F-10
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv6537
Modified Files:
radeon-modeset.patch xorg-x11-drv-ati.spec
Log Message:
- modeset - fix O(wtf) operation in post_bufmgr_submit
radeon-modeset.patch:
Index: radeon-modeset.patch
===================================================================
RCS file: /cvs/pkgs/rpms/xorg-x11-drv-ati/F-10/radeon-modeset.patch,v
retrieving revision 1.36
retrieving revision 1.37
diff -u -r1.36 -r1.37
--- radeon-modeset.patch 17 Nov 2008 09:37:01 -0000 1.36
+++ radeon-modeset.patch 18 Nov 2008 02:12:54 -0000 1.37
@@ -1,3 +1,9 @@
+commit 4ba990209bb2bd4070dcb160a63ecde05653bbb7
+Author: Dave Airlie <airlied at redhat.com>
+Date: Tue Nov 18 12:06:02 2008 +1000
+
+ radeon: workaround O(wtf) logic in post_submit bufmgr
+
commit ed2ddc61540453dc89b7bbacc8c2e7d1bc002bfe
Author: Dave Airlie <airlied at redhat.com>
Date: Mon Nov 17 19:19:43 2008 +1000
@@ -1913,7 +1919,7 @@
do { \
if (RADEON_VERBOSE) \
diff --git a/src/radeon_accel.c b/src/radeon_accel.c
-index a6e332d..d40da24 100644
+index a6e332d..03b49c1 100644
--- a/src/radeon_accel.c
+++ b/src/radeon_accel.c
@@ -311,6 +311,9 @@ void RADEONEngineRestore(ScrnInfoPtr pScrn)
@@ -2049,7 +2055,7 @@
switch (info->CurrentLayout.pixel_code) {
case 8: datatype = 2; break;
-@@ -550,6 +556,153 @@ int RADEONCPStop(ScrnInfoPtr pScrn, RADEONInfoPtr info)
+@@ -550,6 +556,163 @@ int RADEONCPStop(ScrnInfoPtr pScrn, RADEONInfoPtr info)
}
}
@@ -2060,12 +2066,21 @@
+
+ info->cp->relocs.size = getpagesize();
+ info->cp->relocs.num_reloc = 0;
++ info->cp->relocs.max_bo = info->cp->relocs.size / RADEON_RELOC_SIZE;
+ info->cp->relocs.buf = xcalloc(1, info->cp->relocs.size);
+ if (!info->cp->relocs.buf)
+ return NULL;
++
++ info->cp->relocs.bo_list = xcalloc(info->cp->relocs.max_bo, sizeof(dri_bo *));
++ if (!info->cp->relocs.bo_list) {
++ xfree(info->cp->relocs.buf);
++ return NULL;
++ }
++
+ info->cp->ib_gem_fake.address = xcalloc(1, RADEON_BUFFER_SIZE);
+ if (!info->cp->ib_gem_fake.address) {
+ xfree(info->cp->relocs.buf);
++ xfree(info->cp->relocs.bo_list);
+ return NULL;
+ }
+
@@ -2191,6 +2206,7 @@
+ if (!info->cp->indirectBuffer) return;
+ RADEONCSFlushIndirect(pScrn, 0);
+ xfree(info->cp->relocs.buf);
++ xfree(info->cp->relocs.bo_list);
+ info->cp->relocs.buf = 0;
+ info->cp->relocs.size = 0;
+ info->cp->relocs.num_reloc = 0;
@@ -2203,7 +2219,7 @@
/* Get an indirect buffer for the CP 2D acceleration commands */
drmBufPtr RADEONCPGetBuffer(ScrnInfoPtr pScrn)
{
-@@ -560,6 +713,9 @@ drmBufPtr RADEONCPGetBuffer(ScrnInfoPtr pScrn)
+@@ -560,6 +723,9 @@ drmBufPtr RADEONCPGetBuffer(ScrnInfoPtr pScrn)
int size = 0;
int i = 0;
int ret;
@@ -2213,7 +2229,7 @@
#if 0
/* FIXME: pScrn->pScreen has not been initialized when this is first
-@@ -625,6 +781,11 @@ void RADEONCPFlushIndirect(ScrnInfoPtr pScrn, int discard)
+@@ -625,6 +791,11 @@ void RADEONCPFlushIndirect(ScrnInfoPtr pScrn, int discard)
if (!buffer) return;
if (start == buffer->used && !discard) return;
@@ -2225,7 +2241,7 @@
if (RADEON_VERBOSE) {
xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Flushing buffer %d\n",
buffer->idx);
-@@ -659,10 +820,16 @@ void RADEONCPReleaseIndirect(ScrnInfoPtr pScrn)
+@@ -659,10 +830,16 @@ void RADEONCPReleaseIndirect(ScrnInfoPtr pScrn)
int start = info->cp->indirectStart;
drm_radeon_indirect_t indirect;
@@ -2242,7 +2258,7 @@
if (RADEON_VERBOSE) {
xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Releasing buffer %d\n",
-@@ -789,6 +956,7 @@ RADEONHostDataBlit(
+@@ -789,6 +966,7 @@ RADEONHostDataBlit(
ret = ( uint8_t* )&__head[__count];
__count += dwords;
@@ -2250,7 +2266,7 @@
ADVANCE_RING();
*y += *hpass;
-@@ -926,7 +1094,7 @@ Bool RADEONAccelInit(ScreenPtr pScreen)
+@@ -926,7 +1104,7 @@ Bool RADEONAccelInit(ScreenPtr pScreen)
#ifdef USE_EXA
if (info->useEXA) {
# ifdef XF86DRI
@@ -2259,7 +2275,7 @@
if (!RADEONDrawInitCP(pScreen))
return FALSE;
} else
-@@ -947,7 +1115,7 @@ Bool RADEONAccelInit(ScreenPtr pScreen)
+@@ -947,7 +1125,7 @@ Bool RADEONAccelInit(ScreenPtr pScreen)
}
#ifdef XF86DRI
@@ -2268,7 +2284,7 @@
RADEONAccelInitCP(pScreen, a);
else
#endif /* XF86DRI */
-@@ -969,11 +1137,13 @@ void RADEONInit3DEngine(ScrnInfoPtr pScrn)
+@@ -969,11 +1147,13 @@ void RADEONInit3DEngine(ScrnInfoPtr pScrn)
RADEONInfoPtr info = RADEONPTR (pScrn);
#ifdef XF86DRI
@@ -2286,7 +2302,7 @@
RADEONInit3DEngineCP(pScrn);
} else
#endif
-@@ -981,7 +1151,7 @@ void RADEONInit3DEngine(ScrnInfoPtr pScrn)
+@@ -981,7 +1161,7 @@ void RADEONInit3DEngine(ScrnInfoPtr pScrn)
info->accel_state->XInited3D = TRUE;
}
@@ -2328,10 +2344,10 @@
+#endif
diff --git a/src/radeon_bufmgr_gem.c b/src/radeon_bufmgr_gem.c
new file mode 100644
-index 0000000..92fbaa8
+index 0000000..0591c42
--- /dev/null
+++ b/src/radeon_bufmgr_gem.c
-@@ -0,0 +1,600 @@
+@@ -0,0 +1,597 @@
+/**************************************************************************
+ *
+ * Copyright © 2007-2008 Red Hat Inc.
@@ -2705,12 +2721,15 @@
+ reloc_info->buf = xrealloc(reloc_info->buf, reloc_info->size);
+ if (!reloc_info->buf)
+ FatalError("failed to increase reloc buffer size\n");
++ reloc_info->max_bo = reloc_info->size / RADEON_RELOC_SIZE;
++ reloc_info->bo_list = xrealloc(reloc_info->bo_list, reloc_info->max_bo * (sizeof(dri_bo *)));
+ }
+
+ dri_bo_reference(buf);
+ gem_bo->touched = 1;
+
+ index = reloc_info->num_reloc * 4;
++ reloc_info->bo_list[index/4] = buf;
+ reloc_info->buf[index] = gem_bo->gem_handle;
+ reloc_info->buf[index + 1] = read_domains;
+ reloc_info->buf[index + 2] = write_domain;
@@ -2880,16 +2899,10 @@
+ return;
+
+ for (i = 0; i < reloc_info->num_reloc; i++) {
-+ trav = bufmgr_gem->bo_list;
-+ while (trav) {
-+ prev = trav;
-+ trav = trav->next;
-+
-+ if (prev->gem_handle == reloc_info->buf[i * 4]) {
-+ prev->space_accounted = 0;
-+ dri_bo_unreference(&prev->bo);
-+ }
-+ }
++ trav = (dri_bo_gem *)reloc_info->bo_list[i];
++
++ trav->space_accounted = 0;
++ dri_bo_unreference(&trav->bo);
+ }
+
+ bufmgr_gem->read_used = 0;
@@ -3961,10 +3974,10 @@
+}
diff --git a/src/radeon_dri_bufmgr.h b/src/radeon_dri_bufmgr.h
new file mode 100644
-index 0000000..041671f
+index 0000000..026a751
--- /dev/null
+++ b/src/radeon_dri_bufmgr.h
-@@ -0,0 +1,279 @@
+@@ -0,0 +1,281 @@
+/**************************************************************************
+ *
+ * Copyright © 2007 Intel Corporation
@@ -4012,7 +4025,9 @@
+#define RADEON_RELOC_SIZE 4
+struct radeon_relocs_info {
+ uint32_t *buf;
++ dri_bo **bo_list;
+ int size;
++ int max_bo;
+ int num_reloc;
+};
+
Index: xorg-x11-drv-ati.spec
===================================================================
RCS file: /cvs/pkgs/rpms/xorg-x11-drv-ati/F-10/xorg-x11-drv-ati.spec,v
retrieving revision 1.148
retrieving revision 1.149
diff -u -r1.148 -r1.149
--- xorg-x11-drv-ati.spec 17 Nov 2008 09:37:01 -0000 1.148
+++ xorg-x11-drv-ati.spec 18 Nov 2008 02:12:54 -0000 1.149
@@ -5,7 +5,7 @@
Summary: Xorg X11 ati video driver
Name: xorg-x11-drv-ati
Version: 6.9.0
-Release: 48%{?dist}
+Release: 49%{?dist}
URL: http://www.x.org
License: MIT
Group: User Interface/X Hardware Support
@@ -82,6 +82,9 @@
%{_mandir}/man4/radeon.4*
%changelog
+* Tue Nov 18 2008 Dave Airlie <airlied at redhat.com> 6.9.0-49
+- modeset - fix O(wtf) operation in post_bufmgr_submit
+
* Mon Nov 17 2008 Dave Airlie <airlied at redhat.com> 6.9.0-48
- limit to 90% of VRAM for modeset command submission
- Previous message (by thread): rpms/gwibber/F-10 .cvsignore, 1.3, 1.4 gwibber.spec, 1.4, 1.5 import.log, 1.3, 1.4 sources, 1.3, 1.4 gwibber-system-simplejson.patch, 1.1, NONE
- Next message (by thread): rpms/kernel/F-10 kernel.spec, 1.1150, 1.1151 linux-2.6-cdrom-door-status.patch, 1.2, 1.3
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the fedora-extras-commits
mailing list