Bug #3066: Promote frameBufferPhysicalAddress to pointer from CARD32; bump

DRIINFO version to match. Fix various pointer printfs in libdri to be
    64-bit aware. Silence a warning about redefining noXFree86DRIExtension.
    (Jesse Barnes)
This commit is contained in:
Adam Jackson 2005-05-18 19:44:35 +00:00
parent b87a32fb0e
commit 07d1e9ae5f
2 changed files with 10 additions and 11 deletions

View File

@ -71,8 +71,6 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
extern Bool noPanoramiXExtension;
#endif
extern Bool noXFree86DRIExtension;
static int DRIScreenPrivIndex = -1;
static int DRIWindowPrivIndex = -1;
static unsigned long DRIGeneration = 0;
@ -284,7 +282,7 @@ DRIScreenInit(ScreenPtr pScreen, DRIInfoPtr pDRIInfo, int *pDRMFD)
return FALSE;
}
DRIDrvMsg(pScreen->myNum, X_INFO,
"[drm] added %d byte SAREA at 0x%08lx\n",
"[drm] added %d byte SAREA at %p\n",
pDRIPriv->pDriverInfo->SAREASize, pDRIPriv->hSAREA);
if (drmMap( pDRIPriv->drmFD,
@ -300,7 +298,7 @@ DRIScreenInit(ScreenPtr pScreen, DRIInfoPtr pDRIInfo, int *pDRMFD)
return FALSE;
}
memset(pDRIPriv->pSAREA, 0, pDRIPriv->pDriverInfo->SAREASize);
DRIDrvMsg(pScreen->myNum, X_INFO, "[drm] mapped SAREA 0x%08lx to %p\n",
DRIDrvMsg(pScreen->myNum, X_INFO, "[drm] mapped SAREA %p to %p\n",
pDRIPriv->hSAREA, pDRIPriv->pSAREA);
if (drmAddMap( pDRIPriv->drmFD,
@ -318,7 +316,7 @@ DRIScreenInit(ScreenPtr pScreen, DRIInfoPtr pDRIInfo, int *pDRMFD)
"[drm] drmAddMap failed\n");
return FALSE;
}
DRIDrvMsg(pScreen->myNum, X_INFO, "[drm] framebuffer handle = 0x%08lx\n",
DRIDrvMsg(pScreen->myNum, X_INFO, "[drm] framebuffer handle = %p\n",
pDRIPriv->hFrameBuffer);
/* Add tags for reserved contexts */
@ -381,7 +379,7 @@ DRIFinishScreenInit(ScreenPtr pScreen)
pDRIPriv->myContextPriv = pDRIContextPriv;
DRIDrvMsg(pScreen->myNum, X_INFO,
"X context handle = 0x%08lx\n", pDRIPriv->myContext);
"X context handle = %p\n", pDRIPriv->myContext);
/* Now that we have created the X server's context, we can grab the
* hardware lock for the X server.
@ -565,14 +563,14 @@ DRICloseScreen(ScreenPtr pScreen)
drmUnlock(pDRIPriv->drmFD, pDRIPriv->myContext);
lockRefCount=0;
DRIDrvMsg(pScreen->myNum, X_INFO,
"[drm] unmapping %d bytes of SAREA 0x%08lx at %p\n",
"[drm] unmapping %d bytes of SAREA %p at %p\n",
pDRIInfo->SAREASize,
pDRIPriv->hSAREA,
pDRIPriv->pSAREA);
if (drmUnmap(pDRIPriv->pSAREA, pDRIInfo->SAREASize)) {
DRIDrvMsg(pScreen->myNum, X_ERROR,
"[drm] unable to unmap %d bytes"
" of SAREA 0x%08lx at %p\n",
" of SAREA %p at %p\n",
pDRIInfo->SAREASize,
pDRIPriv->hSAREA,
pDRIPriv->pSAREA);

View File

@ -104,10 +104,11 @@ typedef struct {
* Revision history:
* 4.1.0 and earlier: DRIQueryVersion returns XF86DRI_*_VERSION.
* 4.2.0: DRIQueryVersion begins returning DRIINFO_*_VERSION.
* 5.0.0: frameBufferPhysicalAddress changed from CARD32 to pointer.
*/
#define DRIINFO_MAJOR_VERSION 4
#define DRIINFO_MINOR_VERSION 2
#define DRIINFO_MAJOR_VERSION 5
#define DRIINFO_MINOR_VERSION 0
#define DRIINFO_PATCH_VERSION 0
typedef struct {
@ -156,7 +157,7 @@ typedef struct {
int ddxDriverMajorVersion;
int ddxDriverMinorVersion;
int ddxDriverPatchVersion;
CARD32 frameBufferPhysicalAddress;
pointer frameBufferPhysicalAddress;
long frameBufferSize;
long frameBufferStride;
long SAREASize;