rpms/xorg-x11-drv-ati/devel radeon-modeset.patch, 1.5, 1.6 xorg-x11-drv-ati.spec, 1.94, 1.95
Dave Airlie (airlied)
fedora-extras-commits at redhat.com
Wed Aug 6 03:39:18 UTC 2008
Author: airlied
Update of /cvs/pkgs/rpms/xorg-x11-drv-ati/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv7903
Modified Files:
radeon-modeset.patch xorg-x11-drv-ati.spec
Log Message:
* Wed Aug 06 2008 Dave Airlie <airlied at redhat.com> 6.8.0-21
- bunch of fixes to modesetting code + remove debugging.
radeon-modeset.patch:
Index: radeon-modeset.patch
===================================================================
RCS file: /cvs/pkgs/rpms/xorg-x11-drv-ati/devel/radeon-modeset.patch,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- radeon-modeset.patch 5 Aug 2008 06:50:13 -0000 1.5
+++ radeon-modeset.patch 6 Aug 2008 03:38:48 -0000 1.6
@@ -46,10 +46,10 @@
+ drmmode_display.h
diff --git a/src/drmmode_display.c b/src/drmmode_display.c
new file mode 100644
-index 0000000..b329090
+index 0000000..c51c51c
--- /dev/null
+++ b/src/drmmode_display.c
-@@ -0,0 +1,695 @@
+@@ -0,0 +1,680 @@
+/*
+ * Copyright © 2007 Red Hat, Inc.
+ *
@@ -260,9 +260,6 @@
+drmmode_load_cursor_argb (xf86CrtcPtr crtc, CARD32 *image)
+{
+ drmmode_crtc_private_ptr drmmode_crtc = crtc->driver_private;
-+ drmmode_ptr drmmode = drmmode_crtc->drmmode;
-+
-+ int ret;
+ void *ptr;
+
+ /* cursor should be mapped already */
@@ -298,7 +295,6 @@
+{
+ drmmode_crtc_private_ptr drmmode_crtc = crtc->driver_private;
+ drmmode_ptr drmmode = drmmode_crtc->drmmode;
-+ int ret;
+ int size;
+ unsigned long rotate_pitch;
+
@@ -361,7 +357,6 @@
+drmmode_crtc_shadow_destroy(xf86CrtcPtr crtc, PixmapPtr rotate_pixmap, void *data)
+{
+ drmmode_crtc_private_ptr drmmode_crtc = crtc->driver_private;
-+ drmmode_ptr drmmode = drmmode_crtc->drmmode;
+
+ if (rotate_pixmap)
+ FreeScratchPixmapHeader(rotate_pixmap);
@@ -406,9 +401,6 @@
+{
+ xf86CrtcPtr crtc;
+ drmmode_crtc_private_ptr drmmode_crtc;
-+ int cursor_size = 64 * 64 * 4;
-+ uint32_t mask;
-+ int ret;
+
+ crtc = xf86CrtcCreate(pScrn, &drmmode_crtc_funcs);
+ if (crtc == NULL)
@@ -419,13 +411,6 @@
+ drmmode_crtc->drmmode = drmmode;
+ crtc->driver_private = drmmode_crtc;
+
-+#if 0
-+ drmmode_crtc->cursor_handle = drmmode->alloc_cursor(pScrn, num, 64, 64, &drmmode_crtc->cursor_map);
-+ if (!drmmode_crtc->cursor_handle) {
-+ ErrorF("failed to allocate cursor for crtc\n");
-+ return;
-+ }
-+#endif
+ return;
+}
+
@@ -822,7 +807,7 @@
+#endif
+#endif
diff --git a/src/radeon.h b/src/radeon.h
-index 8f25fdf..4f05610 100644
+index 8f25fdf..c766d79 100644
--- a/src/radeon.h
+++ b/src/radeon.h
@@ -46,6 +46,8 @@
@@ -938,7 +923,7 @@
} RADEONInfoRec, *RADEONInfoPtr;
#define RADEONWaitForFifo(pScrn, entries) \
-@@ -1033,6 +1095,11 @@ extern void RADEONUpdateHVPosition(xf86OutputPtr output, DisplayModePtr mode);
+@@ -1033,6 +1095,21 @@ extern void RADEONUpdateHVPosition(xf86OutputPtr output, DisplayModePtr mode);
extern void RADEONInitVideo(ScreenPtr pScreen);
extern void RADEONResetVideo(ScrnInfoPtr pScrn);
@@ -946,11 +931,21 @@
+extern Bool radeon_bind_all_memory(ScrnInfoPtr pScrn);
+extern Bool radeon_unbind_all_memory(ScrnInfoPtr pScrn);
+extern struct radeon_memory *radeon_allocate_memory(ScrnInfoPtr pScrn, int pool, int size, int alignment, Bool no_backing_store, char *name);
++uint32_t radeon_create_new_fb(ScrnInfoPtr pScrn, int width, int height, int *pitch);
++int radeon_map_memory(ScrnInfoPtr pScrn, struct radeon_memory *mem);
++void radeon_unmap_memory(ScrnInfoPtr pScrn, struct radeon_memory *mem);
++void radeon_free_memory(ScrnInfoPtr pScrn, struct radeon_memory *mem);
++Bool radeon_bind_memory(ScrnInfoPtr pScrn, struct radeon_memory *mem);
++Bool radeon_free_all_memory(ScrnInfoPtr pScrn);
++Bool radeon_setup_kernel_mem(ScreenPtr pScreen);
++Bool RADEONDRIDoMappings(ScreenPtr pScreen);
++Bool radeon_update_dri_buffers(ScrnInfoPtr pScrn);
++Bool radeon_setup_gart_mem(ScreenPtr pScreen);
+
#ifdef XF86DRI
# ifdef USE_XAA
/* radeon_accelfuncs.c */
-@@ -1051,7 +1118,9 @@ do { \
+@@ -1051,7 +1128,9 @@ do { \
#define RADEONCP_RELEASE(pScrn, info) \
do { \
@@ -961,7 +956,7 @@
RADEON_PURGE_CACHE(); \
RADEON_WAIT_UNTIL_IDLE(); \
RADEONCPReleaseIndirect(pScrn); \
-@@ -1085,7 +1154,7 @@ do { \
+@@ -1085,7 +1164,7 @@ do { \
#define RADEONCP_REFRESH(pScrn, info) \
do { \
@@ -970,7 +965,7 @@
if (info->needCacheFlush) { \
RADEON_PURGE_CACHE(); \
RADEON_PURGE_ZCACHE(); \
-@@ -1124,6 +1193,13 @@ do { \
+@@ -1124,6 +1203,13 @@ do { \
#define RING_LOCALS uint32_t *__head = NULL; int __expected; int __count = 0
#define BEGIN_RING(n) do { \
@@ -984,7 +979,7 @@
if (RADEON_VERBOSE) { \
xf86DrvMsg(pScrn->scrnIndex, X_INFO, \
"BEGIN_RING(%d) in %s\n", (unsigned int)n, __FUNCTION__);\
-@@ -1136,13 +1212,6 @@ do { \
+@@ -1136,13 +1222,6 @@ do { \
} \
info->dma_debug_func = __FILE__; \
info->dma_debug_lineno = __LINE__; \
@@ -998,7 +993,7 @@
__expected = n; \
__head = (pointer)((char *)info->indirectBuffer->address + \
info->indirectBuffer->used); \
-@@ -1185,6 +1254,17 @@ do { \
+@@ -1185,6 +1264,17 @@ do { \
OUT_RING(val); \
} while (0)
@@ -1016,17 +1011,6 @@
#define FLUSH_RING() \
do { \
if (RADEON_VERBOSE) \
-@@ -1297,4 +1377,10 @@ static __inline__ int radeon_timedout(const struct timeval *endtime)
- now.tv_usec > endtime->tv_usec : now.tv_sec > endtime->tv_sec;
- }
-
-+uint32_t radeon_create_new_fb(ScrnInfoPtr pScrn, int width, int height, int *pitch);
-+int radeon_map_memory(ScrnInfoPtr pScrn, struct radeon_memory *mem);
-+void radeon_unmap_memory(ScrnInfoPtr pScrn, struct radeon_memory *mem);
-+void radeon_free_memory(ScrnInfoPtr pScrn, struct radeon_memory *mem);
-+Bool radeon_bind_memory(ScrnInfoPtr pScrn, struct radeon_memory *mem);
-+Bool radeon_free_all_memory(ScrnInfoPtr pScrn);
- #endif /* _RADEON_H_ */
diff --git a/src/radeon_accel.c b/src/radeon_accel.c
index 91f463a..ad539f0 100644
--- a/src/radeon_accel.c
@@ -1544,7 +1528,7 @@
FBAreaPtr fbarea;
diff --git a/src/radeon_dri.c b/src/radeon_dri.c
-index a192811..8d1caa3 100644
+index a192811..c834280 100644
--- a/src/radeon_dri.c
+++ b/src/radeon_dri.c
@@ -40,6 +40,8 @@
@@ -2076,7 +2060,7 @@
- return FALSE;
- }
+ /* Now, nuke dri.c's dummy frontbuffer map setup if we did that. */
-+ if (pDRIInfo->frameBufferSize != 0) {
++ if (pDRIInfo->frameBufferSize != 0 && info->drm_mm) {
+ int tmp;
+ drm_handle_t fb_handle;
+ void *ptmp;
@@ -2264,7 +2248,7 @@
+
+}
diff --git a/src/radeon_driver.c b/src/radeon_driver.c
-index 010f1b9..7dc7432 100644
+index 010f1b9..fa0befa 100644
--- a/src/radeon_driver.c
+++ b/src/radeon_driver.c
@@ -1621,7 +1621,10 @@ static Bool RADEONPreInitVRAM(ScrnInfoPtr pScrn)
@@ -2785,14 +2769,14 @@
+ xf86CrtcSetSizeRange (pScrn, 320, 200, crtc_max_X, crtc_max_Y);
+
+ RADEONPreInitDDC(pScrn);
-+
-+ if (!RADEONPreInitControllers(pScrn))
-+ goto fail;
- RADEONPreInitDDC(pScrn);
++ if (!RADEONPreInitControllers(pScrn))
++ goto fail;
- if (!RADEONPreInitControllers(pScrn))
- goto fail;
+
+ ErrorF("before xf86InitialConfiguration\n");
+
+ if (!xf86InitialConfiguration (pScrn, FALSE))
@@ -2802,7 +2786,8 @@
+ }
+
+ ErrorF("after xf86InitialConfiguration\n");
-+
+
+- ErrorF("before xf86InitialConfiguration\n");
+ } else {
+#ifdef XF86DRM_MODE
+ char *bus_id;
@@ -2813,9 +2798,14 @@
+ goto fail;
+ }
+- if (!xf86InitialConfiguration (pScrn, FALSE))
+- {
+- xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "No valid modes.\n");
+- goto fail;
+- }
+ info->drmmode.create_new_fb = radeon_create_new_fb;
-- ErrorF("before xf86InitialConfiguration\n");
+- ErrorF("after xf86InitialConfiguration\n");
+ info->drmFD = info->drmmode.fd;
+ xfree(bus_id);
+
@@ -2834,17 +2824,11 @@
+ {
+ drmRadeonGetParam gp;
+ int value;
-
-- if (!xf86InitialConfiguration (pScrn, FALSE))
-- {
-- xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "No valid modes.\n");
-- goto fail;
-- }
++
+ memset(&gp, 0, sizeof(gp));
+ gp.param = RADEON_PARAM_FB_LOCATION;
+ gp.value = &value;
-
-- ErrorF("after xf86InitialConfiguration\n");
++
+ if (drmCommandWriteRead(info->drmFD, DRM_RADEON_GETPARAM, &gp,
+ sizeof(gp)) < 0) {
+ goto fail;
@@ -3041,7 +3025,7 @@
xf86DrvMsg(scrnIndex, X_ERROR,
"Static buffer allocation failed. Disabling DRI.\n");
xf86DrvMsg(scrnIndex, X_ERROR,
-@@ -3421,15 +3540,28 @@ Bool RADEONScreenInit(int scrnIndex, ScreenPtr pScreen,
+@@ -3421,15 +3540,36 @@ Bool RADEONScreenInit(int scrnIndex, ScreenPtr pScreen,
}
}
@@ -3050,6 +3034,14 @@
- if (RADEONDRISetParam(pScrn, RADEON_SETPARAM_NEW_MEMMAP, 1) < 0) {
+ front_ptr = info->FB;
+ if (info->drm_mm) {
++ if (info->directRenderingEnabled && info->newMemoryMap) {
++ if (RADEONDRISetParam(pScrn, RADEON_SETPARAM_NEW_MEMMAP, 1) < 0) {
+ xf86DrvMsg(pScrn->scrnIndex, X_WARNING,
+ "[drm] failed to enable new memory map\n");
+ RADEONDRICloseScreen(pScreen);
+ info->directRenderingEnabled = FALSE;
++ }
++ }
+ radeon_setup_kernel_mem(pScreen);
+ front_ptr = info->mm.front_buffer->map;
+ pScrn->fbOffset = info->mm.front_buffer->offset;
@@ -3058,12 +3050,12 @@
+ } else {
+
+ /* Tell DRI about new memory map */
-+ if (info->directRenderingEnabled && info->newMemoryMap && info->drm_mm) {
++ if (info->directRenderingEnabled && info->newMemoryMap) {
+ if (RADEONDRISetParam(pScrn, RADEON_SETPARAM_NEW_MEMMAP, 1) < 0) {
- xf86DrvMsg(pScrn->scrnIndex, X_WARNING,
- "[drm] failed to enable new memory map\n");
- RADEONDRICloseScreen(pScreen);
- info->directRenderingEnabled = FALSE;
++ xf86DrvMsg(pScrn->scrnIndex, X_WARNING,
++ "[drm] failed to enable new memory map\n");
++ RADEONDRICloseScreen(pScreen);
++ info->directRenderingEnabled = FALSE;
+ }
}
}
@@ -3073,7 +3065,7 @@
#endif
xf86DrvMsgVerb(pScrn->scrnIndex, X_INFO, RADEON_LOGLEVEL_DEBUG,
"Initializing fb layer\n");
-@@ -3453,7 +3585,7 @@ Bool RADEONScreenInit(int scrnIndex, ScreenPtr pScreen,
+@@ -3453,7 +3593,7 @@ Bool RADEONScreenInit(int scrnIndex, ScreenPtr pScreen,
if (info->r600_shadow_fb == FALSE) {
/* Init fb layer */
@@ -3082,7 +3074,7 @@
pScrn->virtualX, pScrn->virtualY,
pScrn->xDpi, pScrn->yDpi, pScrn->displayWidth,
pScrn->bitsPerPixel))
-@@ -3508,7 +3640,7 @@ Bool RADEONScreenInit(int scrnIndex, ScreenPtr pScreen,
+@@ -3508,7 +3648,7 @@ Bool RADEONScreenInit(int scrnIndex, ScreenPtr pScreen,
/* DRI finalisation */
#ifdef XF86DRI
@@ -3091,12 +3083,13 @@
info->pKernelDRMVersion->version_minor >= 19)
{
if (RADEONDRISetParam(pScrn, RADEON_SETPARAM_PCIGART_LOCATION, info->pciGartOffset) < 0)
-@@ -3527,15 +3659,20 @@ Bool RADEONScreenInit(int scrnIndex, ScreenPtr pScreen,
+@@ -3527,15 +3667,21 @@ Bool RADEONScreenInit(int scrnIndex, ScreenPtr pScreen,
info->directRenderingEnabled = RADEONDRIFinishScreenInit(pScreen);
}
if (info->directRenderingEnabled) {
+
-+ radeon_update_dri_buffers(pScrn);
++ if (info->drm_mm)
++ radeon_update_dri_buffers(pScrn);
+
/* DRI final init might have changed the memory map, we need to adjust
* our local image to make sure we restore them properly on mode
@@ -3116,7 +3109,7 @@
}
xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Direct rendering enabled\n");
-@@ -5392,73 +5529,83 @@ Bool RADEONEnterVT(int scrnIndex, int flags)
+@@ -5392,73 +5538,83 @@ Bool RADEONEnterVT(int scrnIndex, int flags)
xf86DrvMsgVerb(pScrn->scrnIndex, X_INFO, RADEON_LOGLEVEL_DEBUG,
"RADEONEnterVT\n");
@@ -3164,12 +3157,12 @@
}
}
- }
--
-- /* Makes sure the engine is idle before doing anything */
-- RADEONWaitForIdleMMIO(pScrn);
+ /* Makes sure the engine is idle before doing anything */
+ RADEONWaitForIdleMMIO(pScrn);
+- /* Makes sure the engine is idle before doing anything */
+- RADEONWaitForIdleMMIO(pScrn);
+-
- if (info->IsMobility && !IS_AVIVO_VARIANT) {
- if (xf86ReturnOptValBool(info->Options, OPTION_DYNAMIC_CLOCKS, FALSE)) {
- RADEONSetDynamicClock(pScrn, 1);
@@ -3252,7 +3245,7 @@
}
#endif
/* this will get XVideo going again, but only if XVideo was initialised
-@@ -5470,7 +5617,7 @@ Bool RADEONEnterVT(int scrnIndex, int flags)
+@@ -5470,7 +5626,7 @@ Bool RADEONEnterVT(int scrnIndex, int flags)
RADEONEngineRestore(pScrn);
#ifdef XF86DRI
@@ -3261,7 +3254,7 @@
RADEONCP_START(pScrn, info);
DRIUnlock(pScrn->pScreen);
}
-@@ -5493,24 +5640,26 @@ void RADEONLeaveVT(int scrnIndex, int flags)
+@@ -5493,24 +5649,26 @@ void RADEONLeaveVT(int scrnIndex, int flags)
"RADEONLeaveVT\n");
#ifdef XF86DRI
if (RADEONPTR(pScrn)->directRenderingInited) {
@@ -3301,7 +3294,7 @@
i = 0;
-@@ -5539,10 +5688,15 @@ void RADEONLeaveVT(int scrnIndex, int flags)
+@@ -5539,10 +5697,15 @@ void RADEONLeaveVT(int scrnIndex, int flags)
xf86_hide_cursors (pScrn);
@@ -3320,7 +3313,7 @@
xf86DrvMsgVerb(pScrn->scrnIndex, X_INFO, RADEON_LOGLEVEL_DEBUG,
"Ok, leaving now...\n");
-@@ -5587,7 +5741,8 @@ static Bool RADEONCloseScreen(int scrnIndex, ScreenPtr pScreen)
+@@ -5587,7 +5750,8 @@ static Bool RADEONCloseScreen(int scrnIndex, ScreenPtr pScreen)
#endif /* USE_XAA */
if (pScrn->vtSema) {
@@ -3330,7 +3323,7 @@
}
xf86DrvMsgVerb(pScrn->scrnIndex, X_INFO, RADEON_LOGLEVEL_DEBUG,
-@@ -5622,6 +5777,12 @@ static Bool RADEONCloseScreen(int scrnIndex, ScreenPtr pScreen)
+@@ -5622,6 +5786,12 @@ static Bool RADEONCloseScreen(int scrnIndex, ScreenPtr pScreen)
info->DGAModes = NULL;
xf86DrvMsgVerb(pScrn->scrnIndex, X_INFO, RADEON_LOGLEVEL_DEBUG,
"Unmapping memory\n");
@@ -3344,19 +3337,17 @@
pScrn->vtSema = FALSE;
diff --git a/src/radeon_exa.c b/src/radeon_exa.c
-index 02fd4fc..7a6ad5b 100644
+index 02fd4fc..76388f3 100644
--- a/src/radeon_exa.c
+++ b/src/radeon_exa.c
-@@ -189,12 +189,31 @@ Bool RADEONGetPixmapOffsetPitch(PixmapPtr pPix, uint32_t *pitch_offset)
+@@ -189,12 +189,29 @@ Bool RADEONGetPixmapOffsetPitch(PixmapPtr pPix, uint32_t *pitch_offset)
if (bpp == 24)
bpp = 8;
- offset = exaGetPixmapOffset(pPix) + info->fbLocation + pScrn->fbOffset;
+ offset = exaGetPixmapOffset(pPix);
+
-+ ErrorF("offset is %x %x %x\n", offset, info->fbLocation, pScrn->fbOffset);
+ offset += info->fbLocation + pScrn->fbOffset;
-+ ErrorF("offset is %x\n", offset);
pitch = exaGetPixmapPitch(pPix);
return RADEONGetOffsetPitch(pPix, bpp, pitch_offset, offset, pitch);
@@ -3380,7 +3371,7 @@
#if X_BYTE_ORDER == X_BIG_ENDIAN
static unsigned long swapper_surfaces[3];
-@@ -300,7 +319,7 @@ static void RADEONFinishAccess(PixmapPtr pPix, int index)
+@@ -300,7 +317,7 @@ static void RADEONFinishAccess(PixmapPtr pPix, int index)
#define RADEON_SWITCH_TO_2D() \
do { \
@@ -3389,7 +3380,7 @@
BEGIN_ACCEL(1); \
switch (info->engineMode) { \
case EXA_ENGINEMODE_UNKNOWN: \
-@@ -317,7 +336,7 @@ do { \
+@@ -317,7 +334,7 @@ do { \
#define RADEON_SWITCH_TO_3D() \
do { \
@@ -3398,7 +3389,7 @@
BEGIN_ACCEL(1); \
switch (info->engineMode) { \
case EXA_ENGINEMODE_UNKNOWN: \
-@@ -341,6 +360,7 @@ do { \
+@@ -341,6 +358,7 @@ do { \
#define BEGIN_ACCEL(n) RADEONWaitForFifo(pScrn, (n))
#define OUT_ACCEL_REG(reg, val) OUTREG(reg, val)
#define OUT_ACCEL_REG_F(reg, val) OUTREG(reg, F_TO_DW(val))
@@ -3406,7 +3397,7 @@
#define FINISH_ACCEL()
#ifdef RENDER
-@@ -353,6 +373,7 @@ do { \
+@@ -353,6 +371,7 @@ do { \
#undef BEGIN_ACCEL
#undef OUT_ACCEL_REG
#undef FINISH_ACCEL
@@ -3414,7 +3405,7 @@
#ifdef XF86DRI
-@@ -363,6 +384,7 @@ do { \
+@@ -363,6 +382,7 @@ do { \
#define BEGIN_ACCEL(n) BEGIN_RING(2*(n))
#define OUT_ACCEL_REG(reg, val) OUT_RING_REG(reg, val)
#define FINISH_ACCEL() ADVANCE_RING()
@@ -3422,7 +3413,7 @@
#define OUT_RING_F(x) OUT_RING(F_TO_DW(x))
-@@ -394,125 +416,124 @@ Bool RADEONSetupMemEXA (ScreenPtr pScreen)
+@@ -394,125 +414,124 @@ Bool RADEONSetupMemEXA (ScreenPtr pScreen)
if (info->exa == NULL)
return FALSE;
@@ -3655,19 +3646,8 @@
return TRUE;
}
-@@ -532,3 +553,10 @@ RADEONTexOffsetStart(PixmapPtr pPix)
- exaGetPixmapOffset(pPix);
- }
- #endif
-+
-+Bool RADEONSetupMemEXAKernel(ScreenPtr pScreen)
-+{
-+
-+
-+}
-+
diff --git a/src/radeon_exa_funcs.c b/src/radeon_exa_funcs.c
-index 56de23e..96ce0ef 100644
+index 56de23e..75c8f46 100644
--- a/src/radeon_exa_funcs.c
+++ b/src/radeon_exa_funcs.c
@@ -77,13 +77,65 @@ FUNC_NAME(RADEONSync)(ScreenPtr pScreen, int marker)
@@ -3789,7 +3769,7 @@
return TRUE;
}
-@@ -148,35 +210,42 @@ FUNC_NAME(RADEONDoneSolid)(PixmapPtr pPix)
+@@ -148,8 +210,10 @@ FUNC_NAME(RADEONDoneSolid)(PixmapPtr pPix)
OUT_ACCEL_REG(RADEON_WAIT_UNTIL,
RADEON_WAIT_2D_IDLECLEAN | RADEON_WAIT_DMA_GUI_IDLE);
FINISH_ACCEL();
@@ -3800,11 +3780,7 @@
void
FUNC_NAME(RADEONDoPrepareCopy)(ScrnInfoPtr pScrn, uint32_t src_pitch_offset,
uint32_t dst_pitch_offset, uint32_t datatype, int rop,
- Pixel planemask)
- {
- RADEONInfoPtr info = RADEONPTR(pScrn);
-+ uint32_t qwords;
- ACCEL_PREAMBLE();
+@@ -160,23 +224,27 @@ FUNC_NAME(RADEONDoPrepareCopy)(ScrnInfoPtr pScrn, uint32_t src_pitch_offset,
RADEON_SWITCH_TO_2D();
@@ -3849,7 +3825,7 @@
}
static Bool
-@@ -197,10 +266,19 @@ FUNC_NAME(RADEONPrepareCopy)(PixmapPtr pSrc, PixmapPtr pDst,
+@@ -197,10 +265,19 @@ FUNC_NAME(RADEONPrepareCopy)(PixmapPtr pSrc, PixmapPtr pDst,
RADEON_FALLBACK(("24bpp unsupported"));
if (!RADEONGetDatatypeBpp(pDst->drawable.bitsPerPixel, &datatype))
RADEON_FALLBACK(("RADEONGetDatatypeBpp failed\n"));
@@ -3873,7 +3849,7 @@
FUNC_NAME(RADEONDoPrepareCopy)(pScrn, src_pitch_offset, dst_pitch_offset,
datatype, rop, planemask);
-@@ -250,6 +328,8 @@ FUNC_NAME(RADEONDoneCopy)(PixmapPtr pDst)
+@@ -250,6 +327,8 @@ FUNC_NAME(RADEONDoneCopy)(PixmapPtr pDst)
OUT_ACCEL_REG(RADEON_WAIT_UNTIL,
RADEON_WAIT_2D_IDLECLEAN | RADEON_WAIT_DMA_GUI_IDLE);
FINISH_ACCEL();
@@ -3882,7 +3858,7 @@
}
static Bool
-@@ -276,10 +356,23 @@ FUNC_NAME(RADEONUploadToScreen)(PixmapPtr pDst, int x, int y, int w, int h,
+@@ -276,10 +355,23 @@ FUNC_NAME(RADEONUploadToScreen)(PixmapPtr pDst, int x, int y, int w, int h,
if (bpp < 8)
return FALSE;
@@ -3909,15 +3885,18 @@
int cpp = bpp / 8;
ACCEL_PREAMBLE();
-@@ -297,6 +390,7 @@ FUNC_NAME(RADEONUploadToScreen)(PixmapPtr pDst, int x, int y, int w, int h,
+@@ -295,8 +387,9 @@ FUNC_NAME(RADEONUploadToScreen)(PixmapPtr pDst, int x, int y, int w, int h,
+ exaMarkSync(pDst->drawable.pScreen);
+ return TRUE;
}
- #endif
+-#endif
+ fallback:
++#endif
/* Do we need that sync here ? probably not .... */
exaWaitSync(pDst->drawable.pScreen);
-@@ -388,6 +482,9 @@ FUNC_NAME(RADEONDownloadFromScreen)(PixmapPtr pSrc, int x, int y, int w, int h,
+@@ -388,13 +481,17 @@ FUNC_NAME(RADEONDownloadFromScreen)(PixmapPtr pSrc, int x, int y, int w, int h,
TRACE;
@@ -3927,15 +3906,15 @@
#ifdef ACCEL_CP
/*
* Try to accelerate download. Use an indirect buffer as scratch space,
-@@ -541,7 +638,7 @@ Bool FUNC_NAME(RADEONDrawInit)(ScreenPtr pScreen)
- info->exa->MarkSync = FUNC_NAME(RADEONMarkSync);
- info->exa->WaitMarker = FUNC_NAME(RADEONSync);
- info->exa->UploadToScreen = FUNC_NAME(RADEONUploadToScreen);
-- info->exa->DownloadFromScreen = FUNC_NAME(RADEONDownloadFromScreen);
-+ // info->exa->DownloadFromScreen = FUNC_NAME(RADEONDownloadFromScreen);
-
- #if X_BYTE_ORDER == X_BIG_ENDIAN
- info->exa->PrepareAccess = RADEONPrepareAccess;
+ * blitting the bits to one half while copying them out of the other one and
+ * then swapping the halves.
+ */
+- if (info->accelDFS && bpp != 24 && RADEONGetDatatypeBpp(bpp, &datatype) &&
++ if (!info->drm_mm && info->accelDFS && bpp != 24 &&
++ RADEONGetDatatypeBpp(bpp, &datatype) &&
+ RADEONGetPixmapOffsetPitch(pSrc, &src_pitch_offset) &&
+ (scratch = RADEONCPGetBuffer(pScrn)))
+ {
@@ -560,7 +657,7 @@ Bool FUNC_NAME(RADEONDrawInit)(ScreenPtr pScreen)
else if (IS_R300_3D || IS_R500_3D) {
if ((info->ChipFamily < CHIP_FAMILY_RS400)
@@ -4068,7 +4047,7 @@
blendcntl = RADEONGetBlendCntl(op, pMaskPicture, pDstPicture->format);
diff --git a/src/radeon_memory.c b/src/radeon_memory.c
new file mode 100644
-index 0000000..73b865d
+index 0000000..b30a68d
--- /dev/null
+++ b/src/radeon_memory.c
@@ -0,0 +1,404 @@
@@ -4183,7 +4162,7 @@
+{
+ RADEONInfoPtr info = RADEONPTR(pScrn);
+ struct drm_radeon_gem_create args;
-+ struct radeon_memory *mem, *scan;
++ struct radeon_memory *mem;
+ int ret;
+
+ mem = xcalloc(1, sizeof(*mem));
@@ -4289,7 +4268,7 @@
+
+ if (!ret)
+ mem->map = (void *)(unsigned long)args.addr_ptr;
-+ ErrorF("Mapped %s size %d at %d %p\n", mem->name, mem->size, mem->offset, mem->map);
++ ErrorF("Mapped %s size %ld at %ld %p\n", mem->name, mem->size, mem->offset, mem->map);
+ return ret;
+}
+
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.94
retrieving revision 1.95
diff -u -r1.94 -r1.95
--- xorg-x11-drv-ati.spec 5 Aug 2008 06:50:13 -0000 1.94
+++ xorg-x11-drv-ati.spec 6 Aug 2008 03:38:48 -0000 1.95
@@ -94,6 +94,9 @@
%{_mandir}/man4/radeon.4*
%changelog
+* Wed Aug 06 2008 Dave Airlie <airlied at redhat.com> 6.8.0-21
+- bunch of fixes to modesetting code + remove debugging.
+
* Fri Aug 01 2008 Dave Airlie <airlied at redhat.com> 6.8.0-20
- DDX modesetting code
More information about the fedora-extras-commits
mailing list