xf86-video-ati: Branch 'master'

Alex Deucher agd5f at kemper.freedesktop.org
Wed Dec 19 22:10:49 PST 2007


 configure.ac       |    5 ++++
 src/radeon_video.c |   66 ++++++++++++++++++++++++++++++++++++-----------------
 2 files changed, 51 insertions(+), 20 deletions(-)

New commits:
commit 8d49ff1da917b7f8240267953ef6ce4ff04daecb
Author: Alex Deucher <alex at botch2.(none)>
Date:   Thu Dec 20 01:09:57 2007 -0500

    RADEON: check for xf86_crtc_clip_video_helper() in configure.ac
    
    use xf86_crtc_clip_video_helper() from the server if available.

diff --git a/configure.ac b/configure.ac
index cc4d490..ae5cb2b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -209,6 +209,11 @@ AC_CHECK_DECL(xf86ModeBandwidth,
 	      [],
 	      [#include "xf86Modes.h"])
 
+AC_CHECK_DECL(xf86_crtc_clip_video_helper,
+	      [AC_DEFINE(HAVE_XF86CRTCCLIPVIDEOHELPER, 1, [Have xf86_crtc_clip_video_helper prototype])],
+	      [],
+	      [#include "xf86Crtc.h"])
+
 AC_CHECK_DECL(XSERVER_LIBPCIACCESS,
 	      [XSERVER_LIBPCIACCESS=yes],[XSERVER_LIBPCIACCESS=no],
 	      [#include "xorg-server.h"])
diff --git a/src/radeon_video.c b/src/radeon_video.c
index 3f0209e..2b5764f 100644
--- a/src/radeon_video.c
+++ b/src/radeon_video.c
@@ -119,6 +119,7 @@ static Atom xvOvAlpha, xvGrAlpha, xvAlphaMode;
 #define GET_PORT_PRIVATE(pScrn) \
    (RADEONPortPrivPtr)((RADEONPTR(pScrn))->adaptor->pPortPrivates[0].ptr)
 
+#ifndef HAVE_XF86CRTCCLIPVIDEOHELPER
 static void
 radeon_box_intersect(BoxPtr dest, BoxPtr a, BoxPtr b)
 {
@@ -185,17 +186,17 @@ radeon_covering_crtc(ScrnInfoPtr pScrn,
 }
 
 static Bool
-radeon_clip_video_helper(ScrnInfoPtr pScrn,
-			 xf86CrtcPtr *crtc_ret,
-			 xf86CrtcPtr desired_crtc,
-			 BoxPtr      dst,
-			 INT32	    *xa,
-			 INT32	    *xb,
-			 INT32	    *ya,
-			 INT32	    *yb,
-			 RegionPtr   reg,
-			 INT32	    width,
-			 INT32	    height)
+radeon_crtc_clip_video_helper(ScrnInfoPtr pScrn,
+			      xf86CrtcPtr *crtc_ret,
+			      xf86CrtcPtr desired_crtc,
+			      BoxPtr      dst,
+			      INT32	  *xa,
+			      INT32	  *xb,
+			      INT32	  *ya,
+			      INT32	  *yb,
+			      RegionPtr   reg,
+			      INT32	  width,
+			      INT32	  height)
 {
     Bool	ret;
     RegionRec	crtc_region_local;
@@ -227,6 +228,31 @@ radeon_clip_video_helper(ScrnInfoPtr pScrn,
 
     return ret;
 }
+#endif
+
+static Bool
+radeon_crtc_clip_video(ScrnInfoPtr pScrn,
+		       xf86CrtcPtr *crtc_ret,
+		       xf86CrtcPtr desired_crtc,
+		       BoxPtr      dst,
+		       INT32       *xa,
+		       INT32       *xb,
+		       INT32       *ya,
+		       INT32       *yb,
+		       RegionPtr   reg,
+		       INT32       width,
+		       INT32       height)
+{
+#ifndef HAVE_XF86CRTCCLIPVIDEOHELPER
+    return radeon_crtc_clip_video_helper(pScrn, crtc_ret, desired_crtc,
+				       dst, xa, xb, ya, yb,
+				       reg, width, height);
+#else
+    return xf86_crtc_clip_video_helper(pScrn, crtc_ret, desired_crtc,
+				       dst, xa, xb, ya, yb,
+				       reg, width, height);
+#endif
+}
 
 #ifdef USE_EXA
 static void
@@ -2899,9 +2925,9 @@ RADEONPutImage(
    dstBox.y1 = drw_y;
    dstBox.y2 = drw_y + drw_h;
 
-   if (!radeon_clip_video_helper(pScrn, &crtc, pPriv->desired_crtc,
-				 &dstBox, &xa, &xb, &ya, &yb,
-				 clipBoxes, width, height))
+   if (!radeon_crtc_clip_video(pScrn, &crtc, pPriv->desired_crtc,
+			       &dstBox, &xa, &xb, &ya, &yb,
+			       clipBoxes, width, height))
        return Success;
 
    if (!crtc) {
@@ -3295,9 +3321,9 @@ RADEONDisplaySurface(
     dstBox.y1 = drw_y;
     dstBox.y2 = drw_y + drw_h;
 
-    if (!radeon_clip_video_helper(pScrn, &crtc, portPriv->desired_crtc,
-				  &dstBox, &xa, &xb, &ya, &yb, clipBoxes,
-				  surface->width, surface->height))
+    if (!radeon_crtc_clip_video(pScrn, &crtc, portPriv->desired_crtc,
+				&dstBox, &xa, &xb, &ya, &yb, clipBoxes,
+				surface->width, surface->height))
         return Success;
 
    if (!crtc) {
@@ -3438,9 +3464,9 @@ RADEONPutVideo(
    else
        vbi_line_width = 2000; /* might need adjustment */
 
-   if (!radeon_clip_video_helper(pScrn, &crtc, pPriv->desired_crtc,
-				 &dstBox, &xa, &xb, &ya, &yb,
-				 clipBoxes, width, height))
+   if (!radeon_crtc_clip_video(pScrn, &crtc, pPriv->desired_crtc,
+			       &dstBox, &xa, &xb, &ya, &yb,
+			       clipBoxes, width, height))
        return Success;
 
    if (!crtc) {


More information about the xorg-commit mailing list