Module Name: xsrc
Committed By: mrg
Date: Sun Mar 29 16:56:31 UTC 2009
Modified Files:
xsrc/external/mit/xf86-video-ati/dist/src: radeon_dri.c radeon_driver.c
Log Message:
use %lx instead of %x for a few varaiables that may be 64 bit.
also match plain old PCI cards. with this, an older PCI radeo 9250
now works with drm.
To generate a diff of this commit:
cvs rdiff -u -r1.1.1.1 -r1.2 \
xsrc/external/mit/xf86-video-ati/dist/src/radeon_dri.c \
xsrc/external/mit/xf86-video-ati/dist/src/radeon_driver.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: xsrc/external/mit/xf86-video-ati/dist/src/radeon_dri.c
diff -u xsrc/external/mit/xf86-video-ati/dist/src/radeon_dri.c:1.1.1.1 xsrc/external/mit/xf86-video-ati/dist/src/radeon_dri.c:1.2
--- xsrc/external/mit/xf86-video-ati/dist/src/radeon_dri.c:1.1.1.1 Sat Aug 2 05:10:33 2008
+++ xsrc/external/mit/xf86-video-ati/dist/src/radeon_dri.c Sun Mar 29 16:56:31 2009
@@ -40,6 +40,8 @@
#include <string.h>
#include <stdio.h>
+#include <sys/types.h>
+#include <sys/mman.h>
/* Driver data structures */
#include "radeon.h"
@@ -973,7 +975,7 @@
return FALSE;
}
xf86DrvMsg(pScreen->myNum, X_INFO,
- "[pci] %d kB allocated with handle 0x%08x\n",
+ "[pci] %d kB allocated with handle 0x%08lx\n",
info->gartSize*1024, info->pciMemHandle);
RADEONDRIInitGARTValues(info);
@@ -985,11 +987,11 @@
return FALSE;
}
xf86DrvMsg(pScreen->myNum, X_INFO,
- "[pci] ring handle = 0x%08x\n", info->ringHandle);
+ "[pci] ring handle = 0x%08lx, size = 0x%08lx\n", info->ringHandle, info->ringMapSize);
- if (drmMap(info->drmFD, info->ringHandle, info->ringMapSize,
- &info->ring) < 0) {
- xf86DrvMsg(pScreen->myNum, X_ERROR, "[pci] Could not map ring\n");
+ if ((ret = drmMap(info->drmFD, info->ringHandle, info->ringMapSize,
+ &info->ring)) < 0) {
+ xf86DrvMsg(pScreen->myNum, X_ERROR, "[pci] Could not map ring: ret %d\n", ret);
return FALSE;
}
xf86DrvMsg(pScreen->myNum, X_INFO,
@@ -1006,7 +1008,7 @@
return FALSE;
}
xf86DrvMsg(pScreen->myNum, X_INFO,
- "[pci] ring read ptr handle = 0x%08x\n",
+ "[pci] ring read ptr handle = 0x%08lx\n",
info->ringReadPtrHandle);
if (drmMap(info->drmFD, info->ringReadPtrHandle, info->ringReadMapSize,
@@ -1029,7 +1031,7 @@
return FALSE;
}
xf86DrvMsg(pScreen->myNum, X_INFO,
- "[pci] vertex/indirect buffers handle = 0x%08x\n",
+ "[pci] vertex/indirect buffers handle = 0x%08lx\n",
info->bufHandle);
if (drmMap(info->drmFD, info->bufHandle, info->bufMapSize,
@@ -1052,7 +1054,7 @@
return FALSE;
}
xf86DrvMsg(pScreen->myNum, X_INFO,
- "[pci] GART texture map handle = 0x%08x\n",
+ "[pci] GART texture map handle = 0x%08lx\n",
info->gartTexHandle);
if (drmMap(info->drmFD, info->gartTexHandle, info->gartTexMapSize,
@@ -1080,7 +1082,7 @@
return FALSE;
}
xf86DrvMsg(pScreen->myNum, X_INFO,
- "[drm] register handle = 0x%08x\n", info->registerHandle);
+ "[drm] register handle = 0x%08lx\n", info->registerHandle);
return TRUE;
}
Index: xsrc/external/mit/xf86-video-ati/dist/src/radeon_driver.c
diff -u xsrc/external/mit/xf86-video-ati/dist/src/radeon_driver.c:1.1.1.1 xsrc/external/mit/xf86-video-ati/dist/src/radeon_driver.c:1.2
--- xsrc/external/mit/xf86-video-ati/dist/src/radeon_driver.c:1.1.1.1 Sat Aug 2 05:10:41 2008
+++ xsrc/external/mit/xf86-video-ati/dist/src/radeon_driver.c Sun Mar 29 16:56:31 2009
@@ -3494,7 +3494,8 @@
/* DRI finalisation */
#ifdef XF86DRI
- if (info->directRenderingEnabled && info->cardType==CARD_PCIE &&
+ if (info->directRenderingEnabled &&
+ (info->cardType==CARD_PCIE || info->cardType==CARD_PCI) &&
info->pKernelDRMVersion->version_minor >= 19)
{
if (RADEONDRISetParam(pScrn, RADEON_SETPARAM_PCIGART_LOCATION, info->pciGartOffset) < 0)