diff --git a/radeon-kms-compat.patch b/radeon-kms-compat.patch index 32b387a..647bc8b 100644 --- a/radeon-kms-compat.patch +++ b/radeon-kms-compat.patch @@ -1,7 +1,6 @@ -diff --git a/configure.ac b/configure.ac -index 4ddec1c..3da3f0a 100644 ---- a/configure.ac -+++ b/configure.ac +diff -up xf86-video-ati-6.12.2/configure.ac.dave xf86-video-ati-6.12.2/configure.ac +--- xf86-video-ati-6.12.2/configure.ac.dave 2009-06-25 15:55:13.000000000 +1000 ++++ xf86-video-ati-6.12.2/configure.ac 2009-06-25 15:55:27.000000000 +1000 @@ -117,7 +117,7 @@ if test "$DRI" = yes; then fi @@ -37,11 +36,10 @@ index 4ddec1c..3da3f0a 100644 +echo "" +echo " Run '${MAKE-make}' to build xf86-video-ati" +echo "" -diff --git a/src/radeon_accel.c b/src/radeon_accel.c -index 5577f84..882d4fa 100644 ---- a/src/radeon_accel.c -+++ b/src/radeon_accel.c -@@ -423,6 +423,24 @@ void RADEONEngineRestore(ScrnInfoPtr pScrn) +diff -up xf86-video-ati-6.12.2/src/radeon_accel.c.dave xf86-video-ati-6.12.2/src/radeon_accel.c +--- xf86-video-ati-6.12.2/src/radeon_accel.c.dave 2009-06-25 15:55:13.000000000 +1000 ++++ xf86-video-ati-6.12.2/src/radeon_accel.c 2009-06-25 15:55:27.000000000 +1000 +@@ -425,6 +425,24 @@ void RADEONEngineRestore(ScrnInfoPtr pSc info->accel_state->XInited3D = FALSE; } @@ -66,7 +64,7 @@ index 5577f84..882d4fa 100644 /* Initialize the acceleration hardware */ void RADEONEngineInit(ScrnInfoPtr pScrn) { -@@ -438,15 +456,9 @@ void RADEONEngineInit(ScrnInfoPtr pScrn) +@@ -440,15 +458,9 @@ void RADEONEngineInit(ScrnInfoPtr pScrn) #ifdef XF86DRI if ((info->directRenderingEnabled || info->drm_mode_setting) && (IS_R300_3D || IS_R500_3D)) { @@ -83,11 +81,10 @@ index 5577f84..882d4fa 100644 xf86DrvMsg(pScrn->scrnIndex, X_WARNING, "Failed to determine num pipes from DRM, falling back to " "manual look-up!\n"); -diff --git a/src/radeon_commonfuncs.c b/src/radeon_commonfuncs.c -index 9e23463..219df9e 100644 ---- a/src/radeon_commonfuncs.c -+++ b/src/radeon_commonfuncs.c -@@ -82,6 +82,7 @@ static void FUNC_NAME(RADEONInit3DEngine)(ScrnInfoPtr pScrn) +diff -up xf86-video-ati-6.12.2/src/radeon_commonfuncs.c.dave xf86-video-ati-6.12.2/src/radeon_commonfuncs.c +--- xf86-video-ati-6.12.2/src/radeon_commonfuncs.c.dave 2009-06-25 15:55:13.000000000 +1000 ++++ xf86-video-ati-6.12.2/src/radeon_commonfuncs.c 2009-06-25 15:55:27.000000000 +1000 +@@ -82,6 +82,7 @@ static void FUNC_NAME(RADEONInit3DEngine case 1: gb_tile_config |= R300_PIPE_COUNT_RV350; break; } @@ -95,7 +92,7 @@ index 9e23463..219df9e 100644 size = (info->ChipFamily >= CHIP_FAMILY_R420) ? 5 : 4; BEGIN_ACCEL(size); OUT_ACCEL_REG(R300_GB_TILE_CONFIG, gb_tile_config); -@@ -91,13 +92,20 @@ static void FUNC_NAME(RADEONInit3DEngine)(ScrnInfoPtr pScrn) +@@ -91,13 +92,16 @@ static void FUNC_NAME(RADEONInit3DEngine OUT_ACCEL_REG(R300_GB_SELECT, 0); OUT_ACCEL_REG(R300_GB_ENABLE, 0); FINISH_ACCEL(); @@ -108,15 +105,11 @@ index 9e23463..219df9e 100644 OUT_ACCEL_REG(R500_SU_REG_DEST, su_reg_dest); OUT_ACCEL_REG(R500_VAP_INDEX_OFFSET, 0); FINISH_ACCEL(); -+ } else { -+ BEGIN_ACCEL(1); -+ OUT_ACCEL_REG(R500_VAP_INDEX_OFFSET, 0); -+ FINISH_ACCEL(); + } } BEGIN_ACCEL(3); -@@ -106,10 +114,13 @@ static void FUNC_NAME(RADEONInit3DEngine)(ScrnInfoPtr pScrn) +@@ -106,10 +110,13 @@ static void FUNC_NAME(RADEONInit3DEngine OUT_ACCEL_REG(RADEON_WAIT_UNTIL, RADEON_WAIT_2D_IDLECLEAN | RADEON_WAIT_3D_IDLECLEAN); FINISH_ACCEL(); @@ -131,7 +124,7 @@ index 9e23463..219df9e 100644 OUT_ACCEL_REG(R300_GB_MSPOS0, ((6 << R300_MS_X0_SHIFT) | (6 << R300_MS_Y0_SHIFT) | (6 << R300_MS_X1_SHIFT) | -@@ -125,10 +136,11 @@ static void FUNC_NAME(RADEONInit3DEngine)(ScrnInfoPtr pScrn) +@@ -125,10 +132,11 @@ static void FUNC_NAME(RADEONInit3DEngine (6 << R300_MS_X5_SHIFT) | (6 << R300_MS_Y5_SHIFT) | (6 << R300_MSBD1_SHIFT))); @@ -145,10 +138,9 @@ index 9e23463..219df9e 100644 OUT_ACCEL_REG(R300_GA_POLY_MODE, R300_FRONT_PTYPE_TRIANGE | R300_BACK_PTYPE_TRIANGE); OUT_ACCEL_REG(R300_GA_ROUND_MODE, (R300_GEOMETRY_ROUND_NEAREST | R300_COLOR_ROUND_NEAREST)); -diff --git a/src/radeon_dri2.c b/src/radeon_dri2.c -index eb15ff2..da5d70b 100644 ---- a/src/radeon_dri2.c -+++ b/src/radeon_dri2.c +diff -up xf86-video-ati-6.12.2/src/radeon_dri2.c.dave xf86-video-ati-6.12.2/src/radeon_dri2.c +--- xf86-video-ati-6.12.2/src/radeon_dri2.c.dave 2009-06-25 15:55:13.000000000 +1000 ++++ xf86-video-ati-6.12.2/src/radeon_dri2.c 2009-06-25 15:55:27.000000000 +1000 @@ -36,15 +36,22 @@ #include "radeon.h" @@ -172,7 +164,7 @@ index eb15ff2..da5d70b 100644 static DRI2BufferPtr radeon_dri2_create_buffers(DrawablePtr drawable, unsigned int *attachments, -@@ -103,12 +110,81 @@ radeon_dri2_create_buffers(DrawablePtr drawable, +@@ -103,12 +110,81 @@ radeon_dri2_create_buffers(DrawablePtr d buffers[i].pitch = pixmap->devKind; buffers[i].cpp = pixmap->drawable.bitsPerPixel / 8; buffers[i].driverPrivate = &privates[i]; @@ -255,7 +247,7 @@ index eb15ff2..da5d70b 100644 static void radeon_dri2_destroy_buffers(DrawablePtr drawable, DRI2BufferPtr buffers, -@@ -127,6 +203,23 @@ radeon_dri2_destroy_buffers(DrawablePtr drawable, +@@ -127,6 +203,23 @@ radeon_dri2_destroy_buffers(DrawablePtr xfree(buffers); } } @@ -279,7 +271,7 @@ index eb15ff2..da5d70b 100644 static void radeon_dri2_copy_region(DrawablePtr drawable, -@@ -134,19 +227,29 @@ radeon_dri2_copy_region(DrawablePtr drawable, +@@ -134,19 +227,29 @@ radeon_dri2_copy_region(DrawablePtr draw DRI2BufferPtr dest_buffer, DRI2BufferPtr src_buffer) { @@ -313,7 +305,7 @@ index eb15ff2..da5d70b 100644 0, 0, drawable->width, drawable->height, 0, 0); FreeScratchGC(gc); RADEONCPReleaseIndirect(pScrn); -@@ -207,16 +310,21 @@ radeon_dri2_screen_init(ScreenPtr pScreen) +@@ -207,16 +310,21 @@ radeon_dri2_screen_init(ScreenPtr pScree } dri2_info.fd = info->dri2.drm_fd; dri2_info.deviceName = info->dri2.device_name; @@ -337,11 +329,10 @@ index eb15ff2..da5d70b 100644 { DRI2CloseScreen(pScreen); } -diff --git a/src/radeon_driver.c b/src/radeon_driver.c -index 388ab5f..c174c7c 100644 ---- a/src/radeon_driver.c -+++ b/src/radeon_driver.c -@@ -2826,15 +2826,23 @@ static Bool radeon_kernel_mode_enabled(ScrnInfoPtr pScrn) +diff -up xf86-video-ati-6.12.2/src/radeon_driver.c.dave xf86-video-ati-6.12.2/src/radeon_driver.c +--- xf86-video-ati-6.12.2/src/radeon_driver.c.dave 2009-06-25 15:55:13.000000000 +1000 ++++ xf86-video-ati-6.12.2/src/radeon_driver.c 2009-06-25 15:55:27.000000000 +1000 +@@ -2816,15 +2816,23 @@ static Bool radeon_kernel_mode_enabled(S pEnt = xf86GetEntityInfo(pScrn->entityList[0]); PciInfo = xf86GetPciInfoForEntity(pEnt->index); @@ -367,7 +358,7 @@ index 388ab5f..c174c7c 100644 return TRUE; } #else -@@ -3166,6 +3174,12 @@ Bool RADEONPreInit(ScrnInfoPtr pScrn, int flags) +@@ -3116,6 +3124,12 @@ Bool RADEONPreInit(ScrnInfoPtr pScrn, in info->dri2.drm_fd = info->drmmode.fd; info->dri2.enabled = FALSE; xfree(bus_id); @@ -380,7 +371,7 @@ index 388ab5f..c174c7c 100644 { struct drm_radeon_gem_info mminfo; -@@ -3177,6 +3191,7 @@ Bool RADEONPreInit(ScrnInfoPtr pScrn, int flags) +@@ -3127,6 +3141,7 @@ Bool RADEONPreInit(ScrnInfoPtr pScrn, in ErrorF("initing gart:%llx vram: s:%llx v:%llx\n", mminfo.gart_size, mminfo.vram_size, mminfo.vram_visible); } @@ -388,11 +379,10 @@ index 388ab5f..c174c7c 100644 { struct drm_radeon_getparam gp; int value; -diff --git a/src/radeon_exa_render.c b/src/radeon_exa_render.c -index e5cba8c..4d96ae5 100644 ---- a/src/radeon_exa_render.c -+++ b/src/radeon_exa_render.c -@@ -2158,16 +2163,23 @@ static Bool FUNC_NAME(R300PrepareComposite)(int op, PicturePtr pSrcPicture, +diff -up xf86-video-ati-6.12.2/src/radeon_exa_render.c.dave xf86-video-ati-6.12.2/src/radeon_exa_render.c +--- xf86-video-ati-6.12.2/src/radeon_exa_render.c.dave 2009-06-25 15:55:13.000000000 +1000 ++++ xf86-video-ati-6.12.2/src/radeon_exa_render.c 2009-06-25 15:55:27.000000000 +1000 +@@ -2163,16 +2163,23 @@ static Bool FUNC_NAME(R300PrepareComposi } /* Clear out scissoring */ @@ -424,4 +414,3 @@ index e5cba8c..4d96ae5 100644 qwords = info->new_cs ? 4 : 3; BEGIN_ACCEL(qwords); - diff --git a/radeon-powerpc-fix.patch b/radeon-powerpc-fix.patch new file mode 100644 index 0000000..cbe2f35 --- /dev/null +++ b/radeon-powerpc-fix.patch @@ -0,0 +1,21 @@ +commit e1c50d8fe4c620933ce25f730eb996ddcb767717 +Author: Michel Dänzer +Date: Fri Jun 19 14:31:36 2009 +0200 + + Include radeon_bufmgr_gem.h for radeon_bufmgr_gem_set_limit prototype. + + Without this, the bufmgr GART limit is initialized to 0 on powerpc, and we + fall back to software for most operations. + +diff --git a/src/radeon_driver.c b/src/radeon_driver.c +index c174c7c..537a4b3 100644 +--- a/src/radeon_driver.c ++++ b/src/radeon_driver.c +@@ -80,6 +80,7 @@ + #define _XF86DRI_SERVER_ + #include "radeon_dri.h" + #include "radeon_drm.h" ++#include "radeon_bufmgr_gem.h" + #include "sarea.h" + #endif + diff --git a/xorg-x11-drv-ati.spec b/xorg-x11-drv-ati.spec index 2b54ee4..e2e8d4c 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.12.2 -Release: 18%{?dist} +Release: 19%{?dist} URL: http://www.x.org License: MIT Group: User Interface/X Hardware Support @@ -26,6 +26,7 @@ Patch10: radeon-6.12.2-lvds-default-modes.patch Patch11: radeon-6.12.2-hax.patch Patch12: radeon-kms-compat.patch Patch13: fix-default-modes.patch +Patch14: radeon-powerpc-fix.patch ExcludeArch: s390 s390x @@ -60,6 +61,7 @@ X.Org X11 ati video driver. %patch11 -p1 -b .fixups %patch12 -p1 -b .compat %patch13 -p1 -b .def +%patch14 -p1 -b .ppcfix %build autoreconf -iv @@ -93,6 +95,9 @@ rm -rf $RPM_BUILD_ROOT %{_mandir}/man4/radeon.4* %changelog +* Thu Jun 25 2009 Dave Airlie 6.12.2-19 +- fix kms compat + * Mon Jun 22 2009 Dave Airlie 6.12.2-18 - rebuild against xorg F12 master