Mailinglist Archive: radeonhd (290 mails)
| < Previous | Next > |
Re: [radeonhd] Compile error in git head
- From: "Alex Deucher" <alexdeucher@xxxxxxxxx>
- Date: Wed, 6 Aug 2008 14:38:47 -0400
- Message-id: <a728f9f90808061138l6d29e60aq40505a31cf02d6e4@xxxxxxxxxxxxxx>
On Wed, Aug 6, 2008 at 11:33 AM, Randall Nortman
<rnradeonhd@xxxxxxxxxxxxxxx> wrote:
I don't recall exactly when exaMoveInPixmap() was added to to the API,
but assuming it was exa 2.1, this patch should do the trick. Let me
know if it works.
Alex
diff --git a/src/radeon_textured_video.c b/src/radeon_textured_video.c
index 1ce695a..ad2002c 100644
--- a/src/radeon_textured_video.c
+++ b/src/radeon_textured_video.c
@@ -230,10 +230,21 @@ RADEONPutImageTextured(ScrnInfoPtr pScrn,
pPriv->pPixmap = (PixmapPtr)pDraw;
#ifdef USE_EXA
+# if EXA_VERSION_MAJOR > 2 || (EXA_VERSION_MAJOR == 2 && EXA_VERSION_MINOR >=
1)
if (info->exa) {
/* Force the pixmap into framebuffer so we can draw to it. */
exaMoveInPixmap(pPriv->pPixmap);
}
+# else
+ if (info->exa &&
+ (((char *)pPriv->pPixmap->devPrivate.ptr < ((char *)info->FbBase +
info->FbScanoutStart)) ||
+ ((char *)pPriv->pPixmap->devPrivate.ptr >= ((char *)info->FbBase +
info->FbMapSize)))) {
+ /* If the pixmap wasn't in framebuffer, then we have no way in XAA to
+ * force it there. So, we simply refuse to draw and fail.
+ */
+ return BadAlloc;
+ }
+# endif
#endif
#ifdef USE_XAA
if (info->xaa &&
<rnradeonhd@xxxxxxxxxxxxxxx> wrote:
I'm getting a compile error in recent versions from git; I haven't
tracked down exactly which revision introduced the problem yet. I
suspect I'm seeing it because I have an older version of the xorg
headers installed than most people pulling radeonhd from git; I've got
Debian's xorg-dev-7.1.0-19 package installed on etch. This is the
error:
radeon_textured_video.c -fPIC -DPIC -o
.libs/radeonhd_drv_la-radeon_textured_video.o
radeon_textured_video.c: In function 'RADEONPutImageTextured':
radeon_textured_video.c:236: error: implicit declaration of function
'exaMoveInPixmap'
radeon_textured_video.c:236: warning: nested extern declaration of
'exaMoveInPixmap'
Am I right that my headers are just too old? If so, we probably ought
to determine the minimum xorg version required and put that in the
readme.
I don't recall exactly when exaMoveInPixmap() was added to to the API,
but assuming it was exa 2.1, this patch should do the trick. Let me
know if it works.
Alex
diff --git a/src/radeon_textured_video.c b/src/radeon_textured_video.c
index 1ce695a..ad2002c 100644
--- a/src/radeon_textured_video.c
+++ b/src/radeon_textured_video.c
@@ -230,10 +230,21 @@ RADEONPutImageTextured(ScrnInfoPtr pScrn,
pPriv->pPixmap = (PixmapPtr)pDraw;
#ifdef USE_EXA
+# if EXA_VERSION_MAJOR > 2 || (EXA_VERSION_MAJOR == 2 && EXA_VERSION_MINOR >=
1)
if (info->exa) {
/* Force the pixmap into framebuffer so we can draw to it. */
exaMoveInPixmap(pPriv->pPixmap);
}
+# else
+ if (info->exa &&
+ (((char *)pPriv->pPixmap->devPrivate.ptr < ((char *)info->FbBase +
info->FbScanoutStart)) ||
+ ((char *)pPriv->pPixmap->devPrivate.ptr >= ((char *)info->FbBase +
info->FbMapSize)))) {
+ /* If the pixmap wasn't in framebuffer, then we have no way in XAA to
+ * force it there. So, we simply refuse to draw and fail.
+ */
+ return BadAlloc;
+ }
+# endif
#endif
#ifdef USE_XAA
if (info->xaa &&
| < Previous | Next > |