xf86-video-r128: Branch 'master' - 4 commits

Kevin Brace kevinbrace at kemper.freedesktop.org
Thu Jul 19 22:19:16 UTC 2018


 configure.ac          |   30 ++++++++++++++++-------
 src/Makefile.am       |   23 ++++++++++++-----
 src/r128.h            |   24 ++++++++++++++++++
 src/r128_accel.c      |   22 -----------------
 src/r128_exa.c        |   33 +++----------------------
 src/r128_exa_render.c |   20 ++++++++++-----
 src/r128_rop.h        |   64 ++++++++++++++++++++++++++++++++++++++++++++++++++
 7 files changed, 144 insertions(+), 72 deletions(-)

New commits:
commit 321b8997ef72507ac70b5531789ff08ca9d40ce8
Author: Kevin Brace <kevinbrace at gmx.com>
Date:   Thu Jul 19 12:02:44 2018 -0700

    Version bumped to 6.11.0
    
    Added a temporary fix for some RAGE 128 Pro models misidentifying
    VGA as DVI and not able to automatically select the proper screen
    resolution via the use of EDID (Extended Display Identification).
    
    Signed-off-by: Kevin Brace <kevinbrace at gmx.com>

diff --git a/configure.ac b/configure.ac
index 961d974..c1738bf 100644
--- a/configure.ac
+++ b/configure.ac
@@ -23,7 +23,7 @@
 # Initialize Autoconf
 AC_PREREQ([2.60])
 AC_INIT([xf86-video-r128],
-        [6.10.2],
+        [6.11.0],
         [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg],
         [xf86-video-r128])
 AC_CONFIG_SRCDIR([Makefile.am])
commit 1f424303840091a3b96e0a3830a966316c5e4e7f
Author: Kevin Brace <kevinbrace at gmx.com>
Date:   Thu Jul 19 09:46:23 2018 -0700

    Reorganize r128_exa.c
    
    Stop the use of #include to include r128_exa_render.c inside
    r128_exa.c.
    
    Signed-off-by: Kevin Brace <kevinbrace at gmx.com>

diff --git a/src/Makefile.am b/src/Makefile.am
index 05fbe6c..45aafb5 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -31,7 +31,9 @@ R128_DRI_SRCS = r128_dri.c
 endif
 
 if USE_EXA
-R128_EXA_SRCS = r128_exa.c
+R128_EXA_SRCS = \
+	r128_exa.c \
+	r128_exa_render.c
 endif
 
 AM_CFLAGS = @XORG_CFLAGS@ @DRI_CFLAGS@
@@ -40,19 +42,26 @@ r128_drv_la_LTLIBRARIES = r128_drv.la
 r128_drv_la_LDFLAGS = -module -avoid-version
 r128_drv_ladir = @moduledir@/drivers
 r128_drv_la_SOURCES = \
-	r128_accel.c r128_cursor.c r128_driver.c \
-	r128_video.c r128_misc.c r128_crtc.c r128_output.c r128_probe.c \
-	$(R128_EXA_SRCS) $(R128_DRI_SRCS)
+	r128_accel.c \
+	r128_crtc.c \
+	r128_cursor.c \
+	r128_driver.c \
+	r128_misc.c \
+	r128_output.c \
+	r128_probe.c \
+	r128_video.c \
+	$(R128_EXA_SRCS) \
+	$(R128_DRI_SRCS)
 
 EXTRA_DIST = \
-        compat-api.h \
+	compat-api.h \
+	r128.h \
 	r128_common.h \
 	r128_dri.h \
 	r128_dripriv.h \
-	r128.h \
 	r128_probe.h \
 	r128_reg.h \
+	r128_rop.h \
 	r128_sarea.h \
 	r128_version.h \
-	r128_exa_render.c \
 	atipcirename.h
diff --git a/src/r128.h b/src/r128.h
index d09429b..e88e8ec 100644
--- a/src/r128.h
+++ b/src/r128.h
@@ -606,6 +606,30 @@ extern Bool	   R128GetDatatypeBpp(int bpp, uint32_t *type);
 extern Bool	   R128GetPixmapOffsetPitch(PixmapPtr pPix, uint32_t *pitch_offset);
 extern void	   R128DoPrepareCopy(ScrnInfoPtr pScrn, uint32_t src_pitch_offset,
 				    uint32_t dst_pitch_offset, uint32_t datatype, int alu, Pixel planemask);
+extern void R128Done(PixmapPtr pPixmap);
+
+#ifdef R128DRI
+extern void EmitCCE2DState(ScrnInfoPtr pScrn);
+#endif
+
+#ifdef RENDER
+extern Bool R128CCECheckComposite(int op,
+                                    PicturePtr pSrcPicture,
+                                    PicturePtr pMaskPicture,
+                                    PicturePtr pDstPicture);
+extern Bool R128CCEPrepareComposite(int op,                                    PicturePtr pSrcPicture,
+                                    PicturePtr pMaskPicture,
+                                    PicturePtr pDstPicture,
+                                    PixmapPtr pSrc,
+                                    PixmapPtr pMask,
+                                    PixmapPtr pDst);
+extern void R128CCEComposite(PixmapPtr pDst,
+                                int srcX, int srcY,
+                                int maskX, int maskY,
+                                int dstX, int dstY,
+                                int w, int h);
+#define R128CCEDoneComposite R128Done
+#endif
 #endif
 
 
diff --git a/src/r128_accel.c b/src/r128_accel.c
index 0ad4edc..72cc443 100644
--- a/src/r128_accel.c
+++ b/src/r128_accel.c
@@ -102,27 +102,7 @@
 #include "xf86.h"
 
 #ifdef HAVE_XAA_H
-static struct {
-    int rop;
-    int pattern;
-} R128_ROP[] = {
-    { R128_ROP3_ZERO, R128_ROP3_ZERO }, /* GXclear        */
-    { R128_ROP3_DSa,  R128_ROP3_DPa  }, /* Gxand          */
-    { R128_ROP3_SDna, R128_ROP3_PDna }, /* GXandReverse   */
-    { R128_ROP3_S,    R128_ROP3_P    }, /* GXcopy         */
-    { R128_ROP3_DSna, R128_ROP3_DPna }, /* GXandInverted  */
-    { R128_ROP3_D,    R128_ROP3_D    }, /* GXnoop         */
-    { R128_ROP3_DSx,  R128_ROP3_DPx  }, /* GXxor          */
-    { R128_ROP3_DSo,  R128_ROP3_DPo  }, /* GXor           */
-    { R128_ROP3_DSon, R128_ROP3_DPon }, /* GXnor          */
-    { R128_ROP3_DSxn, R128_ROP3_PDxn }, /* GXequiv        */
-    { R128_ROP3_Dn,   R128_ROP3_Dn   }, /* GXinvert       */
-    { R128_ROP3_SDno, R128_ROP3_PDno }, /* GXorReverse    */
-    { R128_ROP3_Sn,   R128_ROP3_Pn   }, /* GXcopyInverted */
-    { R128_ROP3_DSno, R128_ROP3_DPno }, /* GXorInverted   */
-    { R128_ROP3_DSan, R128_ROP3_DPan }, /* GXnand         */
-    { R128_ROP3_ONE,  R128_ROP3_ONE  }  /* GXset          */
-};
+#include "r128_rop.h"
 #endif
 
 extern int getR128EntityIndex(void);
diff --git a/src/r128_exa.c b/src/r128_exa.c
index 5099915..b7501ac 100644
--- a/src/r128_exa.c
+++ b/src/r128_exa.c
@@ -36,31 +36,10 @@
 #include "exa.h"
 
 #include "r128_reg.h"
+#include "r128_rop.h"
 
 #include "xf86.h"
 
-static struct {
-    int rop;
-    int pattern;
-} R128_ROP[] = {
-    { R128_ROP3_ZERO, R128_ROP3_ZERO }, /* GXclear        */
-    { R128_ROP3_DSa,  R128_ROP3_DPa  }, /* Gxand          */
-    { R128_ROP3_SDna, R128_ROP3_PDna }, /* GXandReverse   */
-    { R128_ROP3_S,    R128_ROP3_P    }, /* GXcopy         */
-    { R128_ROP3_DSna, R128_ROP3_DPna }, /* GXandInverted  */
-    { R128_ROP3_D,    R128_ROP3_D    }, /* GXnoop         */
-    { R128_ROP3_DSx,  R128_ROP3_DPx  }, /* GXxor          */
-    { R128_ROP3_DSo,  R128_ROP3_DPo  }, /* GXor           */
-    { R128_ROP3_DSon, R128_ROP3_DPon }, /* GXnor          */
-    { R128_ROP3_DSxn, R128_ROP3_PDxn }, /* GXequiv        */
-    { R128_ROP3_Dn,   R128_ROP3_Dn   }, /* GXinvert       */
-    { R128_ROP3_SDno, R128_ROP3_PDno }, /* GXorReverse    */
-    { R128_ROP3_Sn,   R128_ROP3_Pn   }, /* GXcopyInverted */
-    { R128_ROP3_DSno, R128_ROP3_DPno }, /* GXorInverted   */
-    { R128_ROP3_DSan, R128_ROP3_DPan }, /* GXnand         */
-    { R128_ROP3_ONE,  R128_ROP3_ONE  }  /* GXset          */
-};
-
 /* Assumes that depth 15 and 16 can be used as depth 16, which is okay since we
  * require src and dest datatypes to be equal.
  */
@@ -145,7 +124,7 @@ static void Emit2DState(ScrnInfoPtr pScrn)
 }
 
 #ifdef R128DRI
-static void EmitCCE2DState(ScrnInfoPtr pScrn)
+void EmitCCE2DState(ScrnInfoPtr pScrn)
 {
     R128InfoPtr   info      = R128PTR(pScrn);
     int has_src		    = info->state_2d.src_pitch_offset;
@@ -335,7 +314,7 @@ R128Sync(ScreenPtr pScreen, int marker)
     R128WaitForIdle(xf86ScreenToScrn(pScreen));
 }
 
-static void
+void
 R128Done(PixmapPtr pPixmap)
 {
     ScreenPtr     pScreen   = pPixmap->drawable.pScreen;
@@ -412,10 +391,6 @@ R128CCESync(ScreenPtr pScreen, int marker)
     R128CCEWaitForIdle(xf86ScreenToScrn(pScreen));
 }
 
-#ifdef RENDER
-#include "r128_exa_render.c"
-#endif
-
 #endif
 
 Bool
diff --git a/src/r128_exa_render.c b/src/r128_exa_render.c
index 06de074..5f265e3 100644
--- a/src/r128_exa_render.c
+++ b/src/r128_exa_render.c
@@ -34,8 +34,17 @@
 
 /* The following is based on the kdrive ATI driver. */
 
-#include <stdio.h>
-#include <string.h>
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include "xf86.h"
+#include "exa.h"
+
+#include "r128.h"
+#include "r128_reg.h"
+#include "r128_rop.h"
+
 
 static struct {
     Bool dst_alpha;
@@ -203,7 +212,7 @@ R128CheckCompositeTexture(PicturePtr pPict, PicturePtr pDstPict, int op)
     return TRUE;
 }
 
-static Bool
+Bool
 R128CCECheckComposite(int op, PicturePtr pSrcPicture, PicturePtr pMaskPicture, PicturePtr pDstPicture)
 {
 #if R128_DEBUG
@@ -405,7 +414,7 @@ do {							\
     ADVANCE_RING();					\
 } while(0)
 
-static Bool
+Bool
 R128CCEPrepareComposite(int op, PicturePtr pSrcPicture, PicturePtr pMaskPicture,
     PicturePtr pDstPicture, PixmapPtr pSrc, PixmapPtr pMask, PixmapPtr pDst)
 {
@@ -650,7 +659,7 @@ do {								       			\
     OUT_RING(R128FloatAsInt((((float)(_srcY)) + 0.5) / (info->state_2d.heights[0])));	\
 } while (0)
 
-static void
+void
 R128CCEComposite(PixmapPtr pDst, int srcX, int srcY, int maskX, int maskY, int dstX, int dstY, int w, int h)
 {
     ScreenPtr     pScreen   = pDst->drawable.pScreen;
@@ -733,4 +742,3 @@ R128CCEComposite(PixmapPtr pDst, int srcX, int srcY, int maskX, int maskY, int d
     ADVANCE_RING();
 }
 
-#define R128CCEDoneComposite R128Done
diff --git a/src/r128_rop.h b/src/r128_rop.h
new file mode 100644
index 0000000..6b98868
--- /dev/null
+++ b/src/r128_rop.h
@@ -0,0 +1,64 @@
+/*
+ * Copyright 1999, 2000 ATI Technologies Inc., Markham, Ontario,
+ *                      Precision Insight, Inc., Cedar Park, Texas, and
+ *                      VA Linux Systems Inc., Fremont, California.
+ *
+ * All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining
+ * a copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation on the rights to use, copy, modify, merge,
+ * publish, distribute, sublicense, and/or sell copies of the Software,
+ * and to permit persons to whom the Software is furnished to do so,
+ * subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial
+ * portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NON-INFRINGEMENT.  IN NO EVENT SHALL ATI, PRECISION INSIGHT, VA LINUX
+ * SYSTEMS AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+/*
+ * Authors:
+ *   Rickard E. Faith <faith at valinux.com>
+ *   Kevin E. Martin <martin at valinux.com>
+ *
+ */
+
+#ifndef _R128_ROP_H_
+#define _R128_ROP_H_
+
+#include "r128_reg.h"
+
+static struct {
+    int rop;
+    int pattern;
+} R128_ROP[] = {
+    { R128_ROP3_ZERO, R128_ROP3_ZERO }, /* GXclear        */
+    { R128_ROP3_DSa,  R128_ROP3_DPa  }, /* Gxand          */
+    { R128_ROP3_SDna, R128_ROP3_PDna }, /* GXandReverse   */
+    { R128_ROP3_S,    R128_ROP3_P    }, /* GXcopy         */
+    { R128_ROP3_DSna, R128_ROP3_DPna }, /* GXandInverted  */
+    { R128_ROP3_D,    R128_ROP3_D    }, /* GXnoop         */
+    { R128_ROP3_DSx,  R128_ROP3_DPx  }, /* GXxor          */
+    { R128_ROP3_DSo,  R128_ROP3_DPo  }, /* GXor           */
+    { R128_ROP3_DSon, R128_ROP3_DPon }, /* GXnor          */
+    { R128_ROP3_DSxn, R128_ROP3_PDxn }, /* GXequiv        */
+    { R128_ROP3_Dn,   R128_ROP3_Dn   }, /* GXinvert       */
+    { R128_ROP3_SDno, R128_ROP3_PDno }, /* GXorReverse    */
+    { R128_ROP3_Sn,   R128_ROP3_Pn   }, /* GXcopyInverted */
+    { R128_ROP3_DSno, R128_ROP3_DPno }, /* GXorInverted   */
+    { R128_ROP3_DSan, R128_ROP3_DPan }, /* GXnand         */
+    { R128_ROP3_ONE,  R128_ROP3_ONE  }  /* GXset          */
+};
+#endif
+
commit 3acc004c6bfc17aca397ff2cc8c0b1a0e2d4ee63
Author: Dylan Aïssi <bob.dybian at gmail.com>
Date:   Wed Jul 18 07:25:45 2018 -0700

    Fix typo: Initalizing --> Initializing
    
    Signed-off-by: Dylan Aïssi <bob.dybian at gmail.com>

diff --git a/src/r128_exa.c b/src/r128_exa.c
index 1bbf470..5099915 100644
--- a/src/r128_exa.c
+++ b/src/r128_exa.c
@@ -484,7 +484,7 @@ R128EXAInit(ScreenPtr pScreen)
     }
 
     xf86DrvMsg(pScrn->scrnIndex, X_INFO,
-	       "Initalizing 2D acceleration engine...\n");
+	       "Initializing 2D acceleration engine...\n");
 
     R128EngineInit(pScrn);
 
commit 11b230ba61c00c69b23c5be592cf88492113355e
Author: Helmut Grohne <helmut at subdivi.de>
Date:   Wed Jul 18 07:04:27 2018 -0700

    Fix for cross build failure
    
    configure.ac fails to cross build from source, because it abuses
    AC_CHECK_FILE for finding headers. AC_CHECK_FILE is supposed to find
    files on the host system. You cannot usually expect the host system
    to have headers, so this use is incorrect. It happens to also break
    cross compilation.
    
    Signed-off-by: Helmut Grohne <helmut at subdivi.de>

diff --git a/configure.ac b/configure.ac
index 2abaf52..961d974 100644
--- a/configure.ac
+++ b/configure.ac
@@ -84,14 +84,26 @@ sdkdir=`$PKG_CONFIG --variable=sdkdir xorg-server`
 # Checks for libraries.
 
 if test "$DRI" != no; then
-	AC_CHECK_FILE([${sdkdir}/dri.h],
-                      [have_dri_h="yes"], [have_dri_h="no"])
-	AC_CHECK_FILE([${sdkdir}/sarea.h],
-                      [have_sarea_h="yes"], [have_sarea_h="no"])
-	AC_CHECK_FILE([${sdkdir}/dristruct.h],
-                      [have_dristruct_h="yes"], [have_dristruct_h="no"])
-	AC_CHECK_FILE([${sdkdir}/damage.h],
-                      [have_damage_h="yes"], [have_damage_h="no"])
+	if test -f "${sdkdir}/dri.h"; then
+		have_dri_h="yes"
+	else
+		have_dri_h="no"
+	fi
+	if test -f "${sdkdir}/sarea.h"; then
+		have_sarea_h="yes"
+	else
+		have_sarea_h="no"
+	fi
+	if test -f "${sdkdir}/dristruct.h"; then
+		have_dristruct_h="yes"
+	else
+		have_dristruct_h="no"
+	fi
+	if test -f "${sdkdir}/damage.h"; then
+		have_damage_h="yes"
+	else
+		have_damage_h="no"
+	fi
 fi
 
 AC_MSG_CHECKING([whether to include DRI support])


More information about the xorg-commit mailing list