rpms/xorg-x11-drv-ati/devel radeon-modeset.patch, 1.22, 1.23 xorg-x11-drv-ati.spec, 1.129, 1.130

Dave Airlie airlied at fedoraproject.org
Thu Oct 23 00:46:27 UTC 2008


Author: airlied

Update of /cvs/pkgs/rpms/xorg-x11-drv-ati/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv8005

Modified Files:
	radeon-modeset.patch xorg-x11-drv-ati.spec 
Log Message:
- fix some bad memory allocations


radeon-modeset.patch:

Index: radeon-modeset.patch
===================================================================
RCS file: /cvs/pkgs/rpms/xorg-x11-drv-ati/devel/radeon-modeset.patch,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -r1.22 -r1.23
--- radeon-modeset.patch	21 Oct 2008 05:53:31 -0000	1.22
+++ radeon-modeset.patch	23 Oct 2008 00:46:26 -0000	1.23
@@ -1,3 +1,11 @@
+commit fe706004af67894eb7cf661ebd42305a754f3381
+Author: Dave Airlie <airlied at redhat.com>
+Date:   Thu Oct 23 10:43:09 2008 +1000
+
+    radeon: fixup some memory allocation issues
+    
+    hopefully since the alignment got fixed this doesn't break anything
+
 commit 4e24123007f8dd8bb2aee5398778bf36d920521e
 Author: Dave Airlie <airlied at redhat.com>
 Date:   Tue Oct 21 15:50:31 2008 +1000
@@ -7027,10 +7035,10 @@
  	ExaOffscreenArea *area = mem_struct;
 diff --git a/src/radeon_memory.c b/src/radeon_memory.c
 new file mode 100644
-index 0000000..bf4c53e
+index 0000000..c2915b6
 --- /dev/null
 +++ b/src/radeon_memory.c
-@@ -0,0 +1,428 @@
+@@ -0,0 +1,405 @@
 +
 +#include <errno.h>
 +#include <sys/ioctl.h>
@@ -7291,9 +7299,10 @@
 +    int cpp = info->CurrentLayout.pixel_bytes;
 +    int screen_size;
 +    int stride = pScrn->displayWidth * cpp;
-+    int total_size_bytes = (20*1024*1024)+32*1024, remain_size_bytes;
++    int total_size_bytes = (16*1024*1024)+32*1024, remain_size_bytes;
 +    int fb_size_bytes;
 +
++    
 +    screen_size = RADEON_ALIGN(pScrn->virtualY, 16) * stride;
 +
 +    ErrorF("%d x %d x %d = %dK\n", pScrn->displayWidth, pScrn->virtualY, cpp, screen_size / 1024);
@@ -7326,18 +7335,6 @@
 +	}
 +    }
 +
-+#if 0
-+    info->mm.front_buffer = radeon_allocate_memory(pScrn, RADEON_POOL_VRAM, screen_size, 0, 1, "Front Buffer");
-+    if (!info->mm.front_buffer) {
-+	return FALSE;
-+    }
-+
-+    radeon_bind_memory(pScrn, info->mm.front_buffer);
-+
-+    if (radeon_map_memory(pScrn, info->mm.front_buffer)) {
-+	ErrorF("Failed to map front buffer memory\n");
-+    }
-+#endif
 +    /* keep area front front buffer - but don't allocate it yet */
 +    total_size_bytes += screen_size;
 +
@@ -7362,6 +7359,7 @@
 +	    total_size_bytes += depth_size;
 +	}
 +    }
++
 +    /* work out from the mm size what the exa / tex sizes need to be */
 +    remain_size_bytes = info->mm.vram_size - total_size_bytes;
 +
@@ -7369,8 +7367,6 @@
 +
 +    ErrorF("texture size is %dK, exa is %dK\n", info->dri->textureSize / 1024, (remain_size_bytes - info->dri->textureSize)/1024);
 +
-+    /* allocate an object for all the EXA bits */
-+    /* shove EXA + frontbuffer together until we have EXA pixmap hooks */
 +    fb_size_bytes = screen_size + (remain_size_bytes - info->dri->textureSize);
 +
 +    if (info->new_cs)
@@ -7387,16 +7383,6 @@
 +	ErrorF("Failed to map front buffer memory\n");
 +    }
 +    info->dri->frontPitch = pScrn->displayWidth;
-+#if 0
-+    info->mm.exa_buffer = radeon_allocate_memory(pScrn, RADEON_POOL_VRAM, remain_size_bytes - info->dri->textureSize, 0, 1, "EXA Memory Buffer");
-+    if (!info->mm.exa_buffer) {
-+	return FALSE;
-+    }
-+    radeon_bind_memory(pScrn, info->mm.exa_buffer);
-+    if (radeon_map_memory(pScrn, info->mm.exa_buffer)) {
-+	ErrorF("Failed to map front buffer memory\n");
-+    }
-+#endif
 +
 +    if (!info->new_cs) {
 +        info->accel_state->exa->memoryBase = info->mm.front_buffer->map;
@@ -7409,7 +7395,6 @@
 +    }
 +
 +    if (info->directRenderingEnabled) {
-+	info->dri->textureSize /= 2;
 +	info->mm.texture_buffer = radeon_allocate_memory(pScrn, RADEON_POOL_VRAM, info->dri->textureSize, 0, 1, "Texture Buffer", 1);
 +	if (!info->mm.texture_buffer) {
 +	    return FALSE;
@@ -7455,7 +7440,7 @@
 +
 +	bo = dri_bo_alloc(info->bufmgr, "rotate", size, 0, 0);
 +
-+	radeon_bufmgr_pin(bo);
++	dri_bo_pin(bo, RADEON_GEM_DOMAIN_VRAM);
 +	return bo;
 +}
 +


Index: xorg-x11-drv-ati.spec
===================================================================
RCS file: /cvs/pkgs/rpms/xorg-x11-drv-ati/devel/xorg-x11-drv-ati.spec,v
retrieving revision 1.129
retrieving revision 1.130
diff -u -r1.129 -r1.130
--- xorg-x11-drv-ati.spec	21 Oct 2008 05:53:31 -0000	1.129
+++ xorg-x11-drv-ati.spec	23 Oct 2008 00:46:26 -0000	1.130
@@ -5,7 +5,7 @@
 Summary:   Xorg X11 ati video driver
 Name:      xorg-x11-drv-ati
 Version:   6.9.0
-Release:   29%{?dist}
+Release:   30%{?dist}
 URL:       http://www.x.org
 License:   MIT
 Group:     User Interface/X Hardware Support
@@ -72,6 +72,9 @@
 %{_mandir}/man4/radeon.4*
 
 %changelog
+* Thu Oct 23 2008 Dave Airlie <airlied at redhat.com> 6.9.0-30
+- fix some bad memory allocations
+
 * Tue Oct 21 2008 Dave Airlie <airlied at redhat.com> 6.9.0-29
 - fix most obvious glyph corruption issues in modesetting mode
 




More information about the scm-commits mailing list