diff -up xf86-video-ati-6.9.0/src/drmmode_display.c.keep-fb xf86-video-ati-6.9.0/src/drmmode_display.c
--- xf86-video-ati-6.9.0/src/drmmode_display.c.keep-fb	2008-09-12 09:43:20.000000000 -0400
+++ xf86-video-ati-6.9.0/src/drmmode_display.c	2008-09-12 16:16:41.000000000 -0400
@@ -31,8 +31,11 @@
 
 #ifdef XF86DRM_MODE
 #include "radeon.h"
+#include "radeon_reg.h"
 #include "sarea.h"
 
+#include "dri_bufmgr.h"
+
 static Bool drmmode_resize_fb(ScrnInfoPtr scrn, drmmode_ptr drmmode, int width, int height);
 
 static Bool
@@ -119,6 +122,129 @@ drmmode_crtc_dpms(xf86CrtcPtr drmmode_cr
 
 }
 
+static void
+copy_fb_contents (drmmode_ptr drmmode,
+		  ScrnInfoPtr pScrn,
+		  unsigned int dest_id, int x, int y, unsigned int src_id)
+{
+	RADEONInfoPtr info = RADEONPTR(pScrn);
+	drmModeFBPtr dest_fb, src_fb;
+	uint32_t datatype;
+	dri_bo *dest_bo, *src_bo;
+	PixmapPtr src_pixmap, dest_pixmap;
+
+	dest_fb = drmModeGetFB(drmmode->fd, dest_id);
+	src_fb = drmModeGetFB(drmmode->fd, src_id);
+	if (src_fb == NULL) {
+		ErrorF("failed to get old fb, id %d\n", src_id);
+		return;
+	}
+        int dest_name = radeon_name_buffer(pScrn, info->mm.front_buffer);
+	ErrorF("dest id is %d\n", dest_id);
+//	dest_bo = radeon_bo_gem_create_from_name(drmmode->bufmgr,
+//						"dest", dest_name);
+        dest_bo = radeon_bufmgr_exa_create_bo(drmmode->bufmgr, info->mm.front_buffer);
+	ErrorF("src id is %d\n", src_id);
+	src_bo = radeon_bo_gem_create_from_name(drmmode->bufmgr,
+						"src", -src_fb->handle);
+
+	
+	ErrorF("mapping\n");
+	dri_bo_map(src_bo, 1);
+	dri_bo_map(dest_bo, 1);
+
+#if 0
+	src_pixmap = GetScratchPixmapHeader(pScrn->pScreen,
+					    src_fb->width, src_fb->height,
+					    src_fb->depth,
+					    pScrn->bitsPerPixel,
+					    src_fb->pitch,
+					    src_bo->virtual);
+
+	dest_pixmap = GetScratchPixmapHeader(pScrn->pScreen,
+					     dest_fb->width, dest_fb->height,
+					     dest_fb->depth,
+					     pScrn->bitsPerPixel,
+					     dest_fb->pitch,
+					     dest_bo->virtual);
+
+	RADEONGetDatatypeBpp (pScrn->bitsPerPixel, &datatype);
+
+	ErrorF("preparing\n");
+	info->exa->PrepareCopy (src_pixmap, dest_pixmap,
+				0, 0, GXcopy, 0xffffff);
+	ErrorF("copying\n");
+	info->exa->Copy (dest_pixmap, 0, 0, x, y, src_fb->width, src_fb->height);
+	ErrorF("done copying\n");
+	info->exa->DoneCopy (dest_pixmap);
+	ErrorF("after\n");
+#else
+
+	RING_LOCALS;
+	int src_pitch_offset = 0;
+	int dst_pitch_offset = 0;
+	uint32_t copy_flags;
+	uint32_t origin;
+	uint32_t fg_color;
+	uint32_t bg_color;
+	uint32_t write_mask;
+	RADEON_WAIT_UNTIL_IDLE();
+
+
+	RADEONGetDatatypeBpp (pScrn->bitsPerPixel, &datatype);
+
+	copy_flags = (RADEON_GMC_DST_PITCH_OFFSET_CNTL |
+		      RADEON_GMC_SRC_PITCH_OFFSET_CNTL |
+		      RADEON_GMC_BRUSH_NONE |
+		      (datatype << 8) |
+		      RADEON_GMC_SRC_DATATYPE_COLOR |
+		      RADEON_ROP3_S |
+		      RADEON_DP_SRC_SOURCE_MEMORY |
+		      RADEON_GMC_CLR_CMP_CNTL_DIS);
+	origin = RADEON_DST_X_LEFT_TO_RIGHT |
+		 RADEON_DST_Y_TOP_TO_BOTTOM;
+
+	fg_color = 0xffffffff;
+	bg_color = 0x00000000;
+	write_mask = 0xffffffff;
+
+	BEGIN_RING (2 * 17);
+	OUT_RING_REG (RADEON_DEFAULT_SC_BOTTOM_RIGHT,
+		      RADEON_DEFAULT_SC_RIGHT_MAX |
+		      RADEON_DEFAULT_SC_BOTTOM_MAX);
+	OUT_RING_REG (RADEON_DP_GUI_MASTER_CNTL, copy_flags);
+	OUT_RING_REG (RADEON_DP_BRUSH_FRGD_CLR, fg_color);
+	OUT_RING_REG (RADEON_DP_BRUSH_BKGD_CLR, bg_color);
+	OUT_RING_REG (RADEON_DP_SRC_FRGD_CLR, fg_color);
+	OUT_RING_REG (RADEON_DP_SRC_BKGD_CLR, bg_color);
+	OUT_RING_REG (RADEON_DP_WRITE_MASK, write_mask);
+	OUT_RING_REG (RADEON_DP_CNTL, origin);
+
+	OUT_RING_REG (RADEON_DST_PITCH_OFFSET, dst_pitch_offset);
+	OUT_RING_RELOC (dest_bo, 0, RADEON_GEM_DOMAIN_VRAM);
+
+	OUT_RING_REG (RADEON_SRC_PITCH_OFFSET, src_pitch_offset);
+	OUT_RING_RELOC (src_bo, RADEON_GEM_DOMAIN_GTT |
+		                RADEON_GEM_DOMAIN_VRAM, 0);
+	OUT_RING_REG (RADEON_SRC_Y_X, 0 | 0);
+	OUT_RING_REG (RADEON_DST_Y_X, (y << 16) | x);
+	OUT_RING_REG (RADEON_DST_HEIGHT_WIDTH, (dest_fb->height  << 16) | dest_fb->width);
+	ADVANCE_RING();
+
+	RADEON_PURGE_CACHE ();
+	RADEON_WAIT_UNTIL_IDLE();
+
+	FLUSH_RING ();
+#endif
+
+#if 0
+	dri_bo_unreference (dest_bo);
+	dri_bo_unreference (src_bo);
+#endif
+	drmFree(dest_fb);
+	drmFree(src_fb);
+}
+
 static Bool
 drmmode_set_mode_major(xf86CrtcPtr crtc, DisplayModePtr mode,
 		     Rotation rotation, int x, int y)
@@ -170,14 +296,18 @@ drmmode_set_mode_major(xf86CrtcPtr crtc,
 
 	drmmode_ConvertToKMode(crtc->scrn, &kmode, mode);
 
-
 	fb_id = drmmode->fb_id;
+
 	if (drmmode_crtc->rotate_fb_id)
 		fb_id = drmmode_crtc->rotate_fb_id;
-	ErrorF("fb id is %d\n", fb_id);
+	ErrorF("setting fb id is %d for crtc %d, was %d\n",
+		fb_id, drmmode_crtc->mode_crtc->crtc_id,
+		drmmode_crtc->mode_crtc->buffer_id);
 	drmModeSetCrtc(drmmode->fd, drmmode_crtc->mode_crtc->crtc_id,
 		       fb_id, x, y, output_ids, output_count, &kmode);
 
+	copy_fb_contents (drmmode, crtc->scrn, fb_id, x, y, drmmode_crtc->mode_crtc->buffer_id);
+
 
 done:
 	if (!ret) {
