Ok, new version is up here: http://homepage.hispeed.ch/rscheidegger/dri_experimental/radeon_tiling_drm9.diff http://homepage.hispeed.ch/rscheidegger/dri_experimental/radeon_tiling_ddx9.diff http://homepage.hispeed.ch/rscheidegger/dri_experimental/radeon_tiling_dri9.diff
This one now uses the new surface ioctl from Stephane (included in the tiling drm patch for both core and old drm). Other than that, not much has changed. I hope this is the final version now...
Mergedfb + pageflip fix is now separate (attached), you need to apply this before the tiling ddx patch. It is untested however.
Roland
Index: radeon_dri.c =================================================================== RCS file: /cvs/xorg/xc/programs/Xserver/hw/xfree86/drivers/ati/radeon_dri.c,v retrieving revision 1.11 diff -u -r1.11 radeon_dri.c --- radeon_dri.c 17 Dec 2004 16:50:36 -0000 1.11 +++ radeon_dri.c 21 Jan 2005 19:02:17 -0000 @@ -1328,6 +1282,9 @@ < RADEON_MAX_DRAWABLES ? SAREA_MAX_DRAWABLES : RADEON_MAX_DRAWABLES); + /* kill DRIAdjustFrame. We adjust sarea frame info ourselves to work + correctly with pageflip + mergedfb/color tiling */ + pDRIInfo->wrap.AdjustFrame = NULL; #ifdef PER_CONTEXT_SAREA /* This is only here for testing per-context SAREAs. When used, the Index: radeon_driver.c =================================================================== RCS file: /cvs/xorg/xc/programs/Xserver/hw/xfree86/drivers/ati/radeon_driver.c,v retrieving revision 1.36 diff -u -r1.36 radeon_driver.c --- radeon_driver.c 13 Jan 2005 17:35:49 -0000 1.36 +++ radeon_driver.c 21 Jan 2005 19:02:25 -0000 @@ -74,6 +74,7 @@ #define _XF86DRI_SERVER_ #include "radeon_dri.h" #include "radeon_sarea.h" +#include "sarea.h" #endif #include "fb.h" @@ -7510,6 +7855,7 @@ int reg, Base; #ifdef XF86DRI RADEONSAREAPrivPtr pSAREAPriv; + XF86DRISAREAPtr pSAREA; #endif if (info->showCache && y) { @@ -7543,12 +7919,21 @@ #ifdef XF86DRI if (info->directRenderingEnabled) { - pSAREAPriv = DRIGetSAREAPrivate(pScrn->pScreen); + /* can't get at sarea in a semi-sane way? */ + pSAREA = (void *)((char*)pSAREAPriv - sizeof(XF86DRISAREARec)); if (clone || info->IsSecondary) { pSAREAPriv->crtc2_base = Base; } + else { + pSAREA->frame.x = (Base / info->CurrentLayout.pixel_bytes) + % info->CurrentLayout.displayWidth; + pSAREA->frame.y = (Base / info->CurrentLayout.pixel_bytes) + / info->CurrentLayout.displayWidth; + pSAREA->frame.width = pScrn->frameX1 - x + 1; + pSAREA->frame.height = pScrn->frameY1 - y + 1; + } if (pSAREAPriv->pfCurrentPage == 1) { Base += info->backOffset;