[Openchrome-devel] xf86-video-openchrome: 4 commits - configure.ac src/via_driver.h src/via_exa_h2.c src/via_exa_h6.c src/via_i2c.c src/via_sii164.c src/via_vt1632.c

Kevin Brace kevinbrace at kemper.freedesktop.org
Sat Aug 27 06:54:46 UTC 2016


 configure.ac     |    2 +-
 src/via_driver.h |    2 ++
 src/via_exa_h2.c |    4 ----
 src/via_exa_h6.c |    4 ----
 src/via_i2c.c    |   22 ++++++++++++++++++++++
 src/via_sii164.c |   16 ----------------
 src/via_vt1632.c |   16 ----------------
 7 files changed, 25 insertions(+), 41 deletions(-)

New commits:
commit 2437513c359b1f6a29fe7b2742f2e1aa17bf4f90
Author: Kevin Brace <kevinbrace at gmx.com>
Date:   Fri Aug 26 23:54:06 2016 -0700

    Version bumped to 0.5.146
    
    Signed-off-by: Kevin Brace <kevinbrace at gmx.com>

diff --git a/configure.ac b/configure.ac
index 1911135..4926afb 100644
--- a/configure.ac
+++ b/configure.ac
@@ -23,7 +23,7 @@
 # Initialize Autoconf
 AC_PREREQ(2.57)
 AC_INIT([xf86-video-openchrome],
-        [0.5.145],
+        [0.5.146],
         [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg&component=Driver/openchrome],
         [xf86-video-openchrome])
 
commit 9340d6cb8b67e35d38d98410407de0c10e5966fe
Author: Kevin Brace <kevinbrace at gmx.com>
Date:   Fri Aug 26 23:49:51 2016 -0700

    Removed unused variable warnings from via_exa_h6.c
    
    Signed-off-by: Kevin Brace <kevinbrace at gmx.com>

diff --git a/src/via_exa_h6.c b/src/via_exa_h6.c
index fa44f89..3e593a9 100644
--- a/src/via_exa_h6.c
+++ b/src/via_exa_h6.c
@@ -171,8 +171,6 @@ viaExaPrepareSolid_H6(PixmapPtr pPixmap, int alu, Pixel planeMask, Pixel fg)
     VIAPtr pVia = VIAPTR(pScrn);
     ViaTwodContext *tdc = &pVia->td;
 
-    RING_VARS;
-
     if (exaGetPixmapPitch(pPixmap) & 7)
         return FALSE;
 
@@ -228,8 +226,6 @@ viaExaPrepareCopy_H6(PixmapPtr pSrcPixmap, PixmapPtr pDstPixmap, int xdir,
     VIAPtr pVia = VIAPTR(pScrn);
     ViaTwodContext *tdc = &pVia->td;
 
-    RING_VARS;
-
     if (pSrcPixmap->drawable.bitsPerPixel != pDstPixmap->drawable.bitsPerPixel)
         return FALSE;
 
commit d0ef79cf8867fd7f0e72c8569c3be87cfd7279f1
Author: Kevin Brace <kevinbrace at gmx.com>
Date:   Fri Aug 26 23:42:36 2016 -0700

    Removed unused variable warnings from via_exa_h2.c
    
    Signed-off-by: Kevin Brace <kevinbrace at gmx.com>

diff --git a/src/via_exa_h2.c b/src/via_exa_h2.c
index c1fa51e..8ecde2b 100644
--- a/src/via_exa_h2.c
+++ b/src/via_exa_h2.c
@@ -170,8 +170,6 @@ viaExaPrepareSolid_H2(PixmapPtr pPixmap, int alu, Pixel planeMask, Pixel fg)
     VIAPtr pVia = VIAPTR(pScrn);
     ViaTwodContext *tdc = &pVia->td;
 
-    RING_VARS;
-
     if (exaGetPixmapPitch(pPixmap) & 7)
         return FALSE;
 
@@ -227,8 +225,6 @@ viaExaPrepareCopy_H2(PixmapPtr pSrcPixmap, PixmapPtr pDstPixmap, int xdir,
     VIAPtr pVia = VIAPTR(pScrn);
     ViaTwodContext *tdc = &pVia->td;
 
-    RING_VARS;
-
     if (pSrcPixmap->drawable.bitsPerPixel != pDstPixmap->drawable.bitsPerPixel)
         return FALSE;
 
commit 03b8601af8df02ab9f67462b508bf9f177cc6078
Author: Kevin Brace <kevinbrace at gmx.com>
Date:   Fri Aug 26 23:35:53 2016 -0700

    Moved xf86I2CMaskByte inside via_i2c.c
    
    The idea was borrowed from Luc Verhaegen's xf86-video-unichrome DDX.
    
    Signed-off-by: Kevin Brace <kevinbrace at gmx.com>

diff --git a/src/via_driver.h b/src/via_driver.h
index 5a2054c..ccb45e3 100644
--- a/src/via_driver.h
+++ b/src/via_driver.h
@@ -507,6 +507,8 @@ unsigned long viaXvMCPutImageSize(ScrnInfoPtr pScrn);
 
 /* via_i2c.c */
 void ViaI2CInit(ScrnInfoPtr pScrn);
+Bool xf86I2CMaskByte(I2CDevPtr d, I2CByte subaddr,
+                        I2CByte value, I2CByte mask);
 
 #ifdef HAVE_DRI
 Bool VIADRI1ScreenInit(ScreenPtr pScreen);
diff --git a/src/via_i2c.c b/src/via_i2c.c
index 7d75b29..c985dc2 100644
--- a/src/via_i2c.c
+++ b/src/via_i2c.c
@@ -1,4 +1,5 @@
 /*
+ * Copyright 2009 Luc Verhaegen.
  * Copyright 2004 The Unichrome Project  [unichrome.sf.net]
  * Copyright 1998-2003 VIA Technologies, Inc. All Rights Reserved.
  * Copyright 2001-2003 S3 Graphics, Inc. All Rights Reserved.
@@ -478,3 +479,24 @@ ViaI2CInit(ScrnInfoPtr pScrn)
     DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO,
                         "Exiting ViaI2CInit.\n"));
 }
+
+/*
+ * The code originated from Luc Verhaegen's xf86-video-unichrome DDX.
+ *
+ * Sure, it is polluting namespace, but this one is quite useful.
+ */
+Bool
+xf86I2CMaskByte(I2CDevPtr d, I2CByte subaddr, I2CByte value, I2CByte mask)
+{
+    I2CByte tmp;
+    Bool ret;
+
+    ret = xf86I2CReadByte(d, subaddr, &tmp);
+    if (!ret)
+        return FALSE;
+
+    tmp &= ~mask;
+    tmp |= (value & mask);
+
+    return xf86I2CWriteByte(d, subaddr, tmp);
+}
diff --git a/src/via_sii164.c b/src/via_sii164.c
index afc8baa..6bea7f0 100644
--- a/src/via_sii164.c
+++ b/src/via_sii164.c
@@ -32,22 +32,6 @@
 #include "via_driver.h"
 #include "via_sii164.h"
 
-static Bool
-xf86I2CMaskByte(I2CDevPtr d, I2CByte subaddr, I2CByte value, I2CByte mask)
-{
-    I2CByte tmp;
-    Bool ret;
-
-    ret = xf86I2CReadByte(d, subaddr, &tmp);
-    if (!ret)
-        return FALSE;
-
-    tmp &= ~mask;
-    tmp |= (value & mask);
-
-    return xf86I2CWriteByte(d, subaddr, tmp);
-}
-
 static void
 via_sii164_dump_registers(ScrnInfoPtr pScrn, I2CDevPtr pDev)
 {
diff --git a/src/via_vt1632.c b/src/via_vt1632.c
index 086163f..244875d 100644
--- a/src/via_vt1632.c
+++ b/src/via_vt1632.c
@@ -32,22 +32,6 @@
 #include "via_driver.h"
 #include "via_vt1632.h"
 
-static Bool
-xf86I2CMaskByte(I2CDevPtr d, I2CByte subaddr, I2CByte value, I2CByte mask)
-{
-    I2CByte tmp;
-    Bool ret;
-
-    ret = xf86I2CReadByte(d, subaddr, &tmp);
-    if (!ret)
-        return FALSE;
-
-    tmp &= ~mask;
-    tmp |= (value & mask);
-
-    return xf86I2CWriteByte(d, subaddr, tmp);
-}
-
 static void
 via_vt1632_dump_registers(ScrnInfoPtr pScrn, I2CDevPtr pDev)
 {


More information about the Openchrome-devel mailing list