From 0662a696706ae52a2f7b2e7256f5d91d163630bb Mon Sep 17 00:00:00 2001 From: Thomas Hellstrom Date: Thu, 16 Jun 2005 21:32:21 +0000 Subject: Fix and enable Unichrome XvMC for AMD64. --- src/via_xvmc.c | 22 ++++++++-------------- src/via_xvmc.h | 2 +- 2 files changed, 9 insertions(+), 15 deletions(-) diff --git a/src/via_xvmc.c b/src/via_xvmc.c index e1e3f20..f46885d 100644 --- a/src/via_xvmc.c +++ b/src/via_xvmc.c @@ -102,13 +102,13 @@ typedef struct{ static int ViaXvMCCreateContext (ScrnInfoPtr pScrn, XvMCContextPtr pContext, - int *num_priv, long **priv ); + int *num_priv, INT32 **priv ); static void ViaXvMCDestroyContext (ScrnInfoPtr pScrn, XvMCContextPtr pContext); static int ViaXvMCCreateSurface (ScrnInfoPtr pScrn, XvMCSurfacePtr pSurf, - int *num_priv, long **priv ); + int *num_priv, INT32 **priv ); static void ViaXvMCDestroySurface (ScrnInfoPtr pScrn, XvMCSurfacePtr pSurf); static int ViaXvMCCreateSubpicture (ScrnInfoPtr pScrn, XvMCSubpicturePtr pSurf, - int *num_priv, long **priv ); + int *num_priv, INT32 **priv ); static void ViaXvMCDestroySubpicture (ScrnInfoPtr pScrn, XvMCSubpicturePtr pSubp); static int viaXvMCInterceptXvAttribute(ScrnInfoPtr pScrn, Atom attribute, INT32 value,pointer data); @@ -335,12 +335,6 @@ ViaInitXVMC(ScreenPtr pScreen) return; } - if (sizeof(unsigned long) == 8) { - xf86DrvMsg(pScrn->scrnIndex, X_WARNING, - "[XvMC] XvMC libs are not 64 bit clean. Disabling XvMC.\n"); - return; - } - if (!pVia->directRenderingEnabled) { xf86DrvMsg(pScrn->scrnIndex, X_WARNING, "[XvMC] Cannot use XvMC without DRI!\n"); @@ -446,7 +440,7 @@ void ViaCleanupXVMC(ScrnInfoPtr pScrn, XF86VideoAdaptorPtr *XvAdaptors, static int ViaXvMCCreateContext (ScrnInfoPtr pScrn, XvMCContextPtr pContext, - int *num_priv, long **priv ) + int *num_priv, INT32 **priv ) { VIAPtr pVia = VIAPTR(pScrn); ViaXvMCPtr vXvMC = &(pVia->xvmc); @@ -545,7 +539,7 @@ ViaXvMCCreateContext (ScrnInfoPtr pScrn, XvMCContextPtr pContext, static int ViaXvMCCreateSurface (ScrnInfoPtr pScrn, XvMCSurfacePtr pSurf, - int *num_priv, long **priv ) + int *num_priv, INT32 **priv ) { VIAPtr pVia = VIAPTR(pScrn); ViaXvMCPtr vXvMC = &(pVia->xvmc); @@ -594,7 +588,7 @@ ViaXvMCCreateSurface (ScrnInfoPtr pScrn, XvMCSurfacePtr pSurf, #endif *num_priv = numBuffers + 2; - *priv = (long *)xcalloc(*num_priv,sizeof(long)); + *priv = (INT32 *)xcalloc(*num_priv,sizeof(INT32)); if(!*priv) { xf86DrvMsg(pScrn->scrnIndex, X_ERROR, @@ -642,7 +636,7 @@ ViaXvMCCreateSurface (ScrnInfoPtr pScrn, XvMCSurfacePtr pSurf, static int ViaXvMCCreateSubpicture (ScrnInfoPtr pScrn, XvMCSubpicturePtr pSubp, - int *num_priv, long **priv ) + int *num_priv, INT32 **priv ) { VIAPtr pVia = VIAPTR(pScrn); ViaXvMCPtr vXvMC = &(pVia->xvmc); @@ -666,7 +660,7 @@ ViaXvMCCreateSubpicture (ScrnInfoPtr pScrn, XvMCSubpicturePtr pSubp, return BadAlloc; } - *priv = (long *)xcalloc(3,sizeof(long)); + *priv = (INT32 *)xcalloc(3,sizeof(INT32)); if(!*priv) { xf86DrvMsg(pScrn->scrnIndex, X_ERROR, diff --git a/src/via_xvmc.h b/src/via_xvmc.h index 6a475dc..458fa63 100644 --- a/src/via_xvmc.h +++ b/src/via_xvmc.h @@ -53,7 +53,7 @@ typedef drm_via_sarea_t ViaXvMCSAreaPriv; typedef struct{ - Atom attribute; + INT32 attribute; INT32 value; }ViaAttrPair; -- cgit v1.2.3