diff --git a/radeon-modeset.patch b/radeon-modeset.patch index be103f8..ea830a4 100644 --- a/radeon-modeset.patch +++ b/radeon-modeset.patch @@ -1,3 +1,33 @@ +commit 0e9f5f28a24d297d3fcd59dcebd4a6a74e4110dd +Author: Dave Airlie +Date: Sun Nov 23 18:10:41 2008 +1000 + + radeon: switch to 3D slightly earlier + +commit 4f1dc1fc2a025d103263fdf55d4429583c302f5f +Author: Dave Airlie +Date: Sun Nov 23 17:56:02 2008 +1000 + + radeon: wait for rendering before doing UTS + +commit 97f13799475a0583be1ffc318aaf3b840a7cfa63 +Author: Dave Airlie +Date: Sun Nov 23 17:54:27 2008 +1000 + + radeon: stop this_op_read from going negative + +commit 71915dae562835a397490311f01fdc1005243f01 +Author: Dave Airlie +Date: Sun Nov 23 17:52:42 2008 +1000 + + radeon: return flush for conflicting domains + +commit dc1d2bbac69d4ef8fa7d570a5775ed8e6af0e3c4 +Author: Dave Airlie +Date: Sun Nov 23 17:50:47 2008 +1000 + + radeon: only reset state2d before emitting cache flush + commit 2697016d4ae42e457e9552d42b1d3a609472a7c4 Author: Dave Airlie Date: Thu Nov 20 16:48:33 2008 +1000 @@ -2406,10 +2436,10 @@ index 0000000..481c5cf +#endif diff --git a/src/radeon_bufmgr_gem.c b/src/radeon_bufmgr_gem.c new file mode 100644 -index 0000000..e1c2006 +index 0000000..30f439f --- /dev/null +++ b/src/radeon_bufmgr_gem.c -@@ -0,0 +1,645 @@ +@@ -0,0 +1,649 @@ +/************************************************************************** + * + * Copyright © 2007-2008 Red Hat Inc. @@ -2922,10 +2952,14 @@ index 0000000..e1c2006 + ErrorF("WRITE DOMAIN RELOC FAILURE 0x%x %d %d\n", gem_bo->gem_handle, write_domain, old_write); + if (read_domains != old_read) + ErrorF("READ DOMAIN RELOC FAILURE 0x%x %d %d\n", gem_bo->gem_handle, read_domains, old_read); ++ return BUFMGR_SPACE_FLUSH; + } + } + } + ++ if (this_op_read < 0) ++ this_op_read = 0; ++ + /* check sizes - operation first */ + if ((this_op_read + this_op_gart_write > bufmgr_gem->gart_limit) || + (this_op_vram_write > bufmgr_gem->vram_limit)) { @@ -6504,7 +6538,7 @@ index 0f86fdd..f0d1f48 100644 } #endif diff --git a/src/radeon_exa_funcs.c b/src/radeon_exa_funcs.c -index 62224d0..8fc3839 100644 +index 62224d0..eba325e 100644 --- a/src/radeon_exa_funcs.c +++ b/src/radeon_exa_funcs.c @@ -74,21 +74,73 @@ FUNC_NAME(RADEONSync)(ScreenPtr pScreen, int marker) @@ -6656,11 +6690,16 @@ index 62224d0..8fc3839 100644 return TRUE; } -@@ -148,8 +233,10 @@ FUNC_NAME(RADEONDoneSolid)(PixmapPtr pPix) +@@ -143,6 +228,7 @@ FUNC_NAME(RADEONDoneSolid)(PixmapPtr pPix) + + TRACE; + ++ info->state_2d.op = 0; + BEGIN_ACCEL(2); + OUT_ACCEL_REG(RADEON_DSTCACHE_CTLSTAT, RADEON_RB2D_DC_FLUSH_ALL); OUT_ACCEL_REG(RADEON_WAIT_UNTIL, - RADEON_WAIT_2D_IDLECLEAN | RADEON_WAIT_DMA_GUI_IDLE); +@@ -150,6 +236,7 @@ FUNC_NAME(RADEONDoneSolid)(PixmapPtr pPix) FINISH_ACCEL(); -+ info->state_2d.op = 0; } + @@ -6775,16 +6814,15 @@ index 62224d0..8fc3839 100644 FUNC_NAME(RADEONDoPrepareCopy)(pScrn, src_pitch_offset, dst_pitch_offset, datatype, rop, planemask); -@@ -250,6 +380,8 @@ FUNC_NAME(RADEONDoneCopy)(PixmapPtr pDst) - OUT_ACCEL_REG(RADEON_WAIT_UNTIL, - RADEON_WAIT_2D_IDLECLEAN | RADEON_WAIT_DMA_GUI_IDLE); - FINISH_ACCEL(); -+ -+ info->state_2d.op = 0; - } +@@ -245,6 +375,7 @@ FUNC_NAME(RADEONDoneCopy)(PixmapPtr pDst) - static Bool -@@ -260,6 +392,8 @@ FUNC_NAME(RADEONUploadToScreen)(PixmapPtr pDst, int x, int y, int w, int h, + TRACE; + ++ info->state_2d.op = 0; + BEGIN_ACCEL(2); + OUT_ACCEL_REG(RADEON_DSTCACHE_CTLSTAT, RADEON_RB2D_DC_FLUSH_ALL); + OUT_ACCEL_REG(RADEON_WAIT_UNTIL, +@@ -260,6 +391,8 @@ FUNC_NAME(RADEONUploadToScreen)(PixmapPtr pDst, int x, int y, int w, int h, uint8_t *dst = info->FB + exaGetPixmapOffset(pDst); unsigned int dst_pitch = exaGetPixmapPitch(pDst); unsigned int bpp = pDst->drawable.bitsPerPixel; @@ -6793,7 +6831,7 @@ index 62224d0..8fc3839 100644 #ifdef ACCEL_CP unsigned int hpass; uint32_t buf_pitch, dst_pitch_off; -@@ -276,10 +410,48 @@ FUNC_NAME(RADEONUploadToScreen)(PixmapPtr pDst, int x, int y, int w, int h, +@@ -276,10 +409,50 @@ FUNC_NAME(RADEONUploadToScreen)(PixmapPtr pDst, int x, int y, int w, int h, if (bpp < 8) return FALSE; @@ -6818,6 +6856,8 @@ index 62224d0..8fc3839 100644 + if (radeon_bufmgr_gem_has_references(driver_priv->bo)) + RADEONCPFlushIndirect(pScrn, 0); + ++ radeon_bufmgr_gem_wait_rendering(driver_priv->bo); ++ + /* use pwrites - maybe require some sort of fallback */ + bo_width = w * (bpp / 8); + offset = (x * bpp / 8) + (y * dst_pitch); @@ -6845,7 +6885,7 @@ index 62224d0..8fc3839 100644 int cpp = bpp / 8; ACCEL_PREAMBLE(); -@@ -294,9 +466,10 @@ FUNC_NAME(RADEONUploadToScreen)(PixmapPtr pDst, int x, int y, int w, int h, +@@ -294,9 +467,10 @@ FUNC_NAME(RADEONUploadToScreen)(PixmapPtr pDst, int x, int y, int w, int h, exaMarkSync(pDst->drawable.pScreen); return TRUE; @@ -6858,7 +6898,7 @@ index 62224d0..8fc3839 100644 /* Do we need that sync here ? probably not .... */ exaWaitSync(pDst->drawable.pScreen); -@@ -335,14 +508,20 @@ FUNC_NAME(RADEONUploadToScreen)(PixmapPtr pDst, int x, int y, int w, int h, +@@ -335,14 +509,20 @@ FUNC_NAME(RADEONUploadToScreen)(PixmapPtr pDst, int x, int y, int w, int h, #ifdef ACCEL_CP /* Emit blit with arbitrary source and destination offsets and pitches */ static void @@ -6881,7 +6921,7 @@ index 62224d0..8fc3839 100644 OUT_ACCEL_REG(RADEON_DP_GUI_MASTER_CNTL, RADEON_GMC_DST_PITCH_OFFSET_CNTL | RADEON_GMC_SRC_PITCH_OFFSET_CNTL | -@@ -353,8 +532,14 @@ RADEONBlitChunk(ScrnInfoPtr pScrn, uint32_t datatype, uint32_t src_pitch_offset, +@@ -353,8 +533,14 @@ RADEONBlitChunk(ScrnInfoPtr pScrn, uint32_t datatype, uint32_t src_pitch_offset, RADEON_DP_SRC_SOURCE_MEMORY | RADEON_GMC_CLR_CMP_CNTL_DIS | RADEON_GMC_WR_MSK_DIS); @@ -6896,7 +6936,7 @@ index 62224d0..8fc3839 100644 OUT_ACCEL_REG(RADEON_SRC_Y_X, (srcY << 16) | srcX); OUT_ACCEL_REG(RADEON_DST_Y_X, (dstY << 16) | dstX); OUT_ACCEL_REG(RADEON_DST_HEIGHT_WIDTH, (h << 16) | w); -@@ -365,6 +550,174 @@ RADEONBlitChunk(ScrnInfoPtr pScrn, uint32_t datatype, uint32_t src_pitch_offset, +@@ -365,6 +551,174 @@ RADEONBlitChunk(ScrnInfoPtr pScrn, uint32_t datatype, uint32_t src_pitch_offset, RADEON_WAIT_2D_IDLECLEAN | RADEON_WAIT_DMA_GUI_IDLE); FINISH_ACCEL(); } @@ -7071,7 +7111,7 @@ index 62224d0..8fc3839 100644 #endif static Bool -@@ -389,12 +742,18 @@ FUNC_NAME(RADEONDownloadFromScreen)(PixmapPtr pSrc, int x, int y, int w, int h, +@@ -389,12 +743,18 @@ FUNC_NAME(RADEONDownloadFromScreen)(PixmapPtr pSrc, int x, int y, int w, int h, TRACE; #ifdef ACCEL_CP @@ -7091,7 +7131,7 @@ index 62224d0..8fc3839 100644 RADEONGetPixmapOffsetPitch(pSrc, &src_pitch_offset) && (scratch = RADEONCPGetBuffer(pScrn))) { -@@ -409,7 +768,8 @@ FUNC_NAME(RADEONDownloadFromScreen)(PixmapPtr pSrc, int x, int y, int w, int h, +@@ -409,7 +769,8 @@ FUNC_NAME(RADEONDownloadFromScreen)(PixmapPtr pSrc, int x, int y, int w, int h, RADEON_SWITCH_TO_2D(); /* Kick the first blit as early as possible */ @@ -7101,7 +7141,7 @@ index 62224d0..8fc3839 100644 x, y, 0, 0, w, hpass); FLUSH_RING(); -@@ -436,7 +796,8 @@ FUNC_NAME(RADEONDownloadFromScreen)(PixmapPtr pSrc, int x, int y, int w, int h, +@@ -436,7 +797,8 @@ FUNC_NAME(RADEONDownloadFromScreen)(PixmapPtr pSrc, int x, int y, int w, int h, /* Prepare next blit if anything's left */ if (hpass) { scratch_off = scratch->total/2 - scratch_off; @@ -7111,7 +7151,7 @@ index 62224d0..8fc3839 100644 x, y, 0, 0, w, hpass); } -@@ -543,14 +904,17 @@ Bool FUNC_NAME(RADEONDrawInit)(ScreenPtr pScreen) +@@ -543,14 +905,17 @@ Bool FUNC_NAME(RADEONDrawInit)(ScreenPtr pScreen) info->accel_state->exa->UploadToScreen = FUNC_NAME(RADEONUploadToScreen); info->accel_state->exa->DownloadFromScreen = FUNC_NAME(RADEONDownloadFromScreen); @@ -7132,7 +7172,7 @@ index 62224d0..8fc3839 100644 #ifdef RENDER if (info->RenderAccel) { -@@ -560,7 +924,7 @@ Bool FUNC_NAME(RADEONDrawInit)(ScreenPtr pScreen) +@@ -560,7 +925,7 @@ Bool FUNC_NAME(RADEONDrawInit)(ScreenPtr pScreen) else if (IS_R300_3D || IS_R500_3D) { if ((info->ChipFamily < CHIP_FAMILY_RS400) #ifdef XF86DRI @@ -7141,7 +7181,7 @@ index 62224d0..8fc3839 100644 #endif ) { xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Render acceleration " -@@ -595,6 +959,16 @@ Bool FUNC_NAME(RADEONDrawInit)(ScreenPtr pScreen) +@@ -595,6 +960,16 @@ Bool FUNC_NAME(RADEONDrawInit)(ScreenPtr pScreen) } #endif @@ -7159,7 +7199,7 @@ index 62224d0..8fc3839 100644 xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Setting EXA maxPitchBytes\n"); diff --git a/src/radeon_exa_render.c b/src/radeon_exa_render.c -index 97199ae..820f3c5 100644 +index 97199ae..ed82878 100644 --- a/src/radeon_exa_render.c +++ b/src/radeon_exa_render.c @@ -355,12 +355,14 @@ static Bool FUNC_NAME(R100TextureSetup)(PicturePtr pPict, PixmapPtr pPix, @@ -7643,7 +7683,24 @@ index 97199ae..820f3c5 100644 RADEON_FALLBACK(("Bad destination offset 0x%x\n", (int)dst_offset)); if (((dst_pitch >> pixel_shift) & 0x7) != 0) RADEON_FALLBACK(("Bad destination pitch 0x%x\n", (int)dst_pitch)); -@@ -1829,9 +2048,18 @@ static Bool FUNC_NAME(R300PrepareComposite)(int op, PicturePtr pSrcPicture, +@@ -1218,6 +1437,8 @@ static Bool FUNC_NAME(R300PrepareComposite)(int op, PicturePtr pSrcPicture, + if (!RADEONSetupSourceTile(pSrcPicture, pSrc, TRUE, FALSE)) + return FALSE; + ++ RADEON_SWITCH_TO_3D(); ++ + if (!FUNC_NAME(R300TextureSetup)(pSrcPicture, pSrc, 0)) + return FALSE; + txenable = R300_TEX_0_ENABLE; +@@ -1230,7 +1451,6 @@ static Bool FUNC_NAME(R300PrepareComposite)(int op, PicturePtr pSrcPicture, + info->accel_state->is_transform[1] = FALSE; + } + +- RADEON_SWITCH_TO_3D(); + + /* setup the VAP */ + if (info->accel_state->has_tcl) { +@@ -1829,9 +2049,18 @@ static Bool FUNC_NAME(R300PrepareComposite)(int op, PicturePtr pSrcPicture, FINISH_ACCEL(); } diff --git a/xorg-x11-drv-ati.spec b/xorg-x11-drv-ati.spec index 46ad03d..abaf836 100644 --- a/xorg-x11-drv-ati.spec +++ b/xorg-x11-drv-ati.spec @@ -5,7 +5,7 @@ Summary: Xorg X11 ati video driver Name: xorg-x11-drv-ati Version: 6.9.0 -Release: 55%{?dist} +Release: 56%{?dist} URL: http://www.x.org License: MIT Group: User Interface/X Hardware Support @@ -82,6 +82,9 @@ rm -rf $RPM_BUILD_ROOT %{_mandir}/man4/radeon.4* %changelog +* Sun Nov 23 2008 Dave Airlie 6.9.0-56 +- fix some issues with UTS and 2d state flush + * Tue Nov 18 2008 Dave Airlie 6.9.0-55 - attempt to resolve DFS with a worse idea.