[openchrome-devel] xf86-video-openchrome: 2 commits - configure.ac src/via_exa_h2.c src/via_exa_h6.c

Kevin Brace kevinbrace at kemper.freedesktop.org
Sat Dec 21 18:10:24 UTC 2019


 configure.ac     |    2 +-
 src/via_exa_h2.c |   13 ++++++++++---
 src/via_exa_h6.c |   13 ++++++++++---
 3 files changed, 21 insertions(+), 7 deletions(-)

New commits:
commit a2b6da27aeeb49cbfc2521dc5c3d9a318dad6981
Author: Kevin Brace <kevinbrace at gmx.com>
Date:   Sat Dec 21 11:15:17 2019 -0600

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

diff --git a/configure.ac b/configure.ac
index 52cf664..ad241a9 100644
--- a/configure.ac
+++ b/configure.ac
@@ -23,7 +23,7 @@
 # Initialize Autoconf
 AC_PREREQ([2.60])
 AC_INIT([xf86-video-openchrome],
-        [0.6.196],
+        [0.6.197],
         [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg&component=Driver/openchrome],
         [xf86-video-openchrome])
 
commit 54a19f65f89ee7c70b1fa327ad3e6246267f6929
Author: Kevin Brace <kevinbrace at gmx.com>
Date:   Sat Dec 21 09:29:50 2019 -0600

    Removing pointer arithmetic and comparison compilation warnings
    
    Within viaExaIsOffscreen() inside via_exa_h2.c and via_exa_h6.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 0fd6498..b1a3270 100644
--- a/src/via_exa_h2.c
+++ b/src/via_exa_h2.c
@@ -361,9 +361,16 @@ viaExaIsOffscreen(PixmapPtr pPix)
 {
     ScrnInfoPtr pScrn = xf86ScreenToScrn(pPix->drawable.pScreen);
     VIAPtr pVia = VIAPTR(pScrn);
-
-    return ((unsigned long)pPix->devPrivate.ptr -
-            (unsigned long) drm_bo_map(pScrn, pVia->drmmode.front_bo)) < pVia->drmmode.front_bo->size;
+    uint8_t* addr_size;
+    uint8_t* front_bo;
+    Bool ret;
+
+    front_bo = drm_bo_map(pScrn, pVia->drmmode.front_bo);
+    addr_size = (uint8_t*)pPix->devPrivate.ptr -
+                                            (unsigned long)front_bo;
+    ret = (addr_size < (uint8_t*)pVia->drmmode.front_bo->size) ?
+                                                        TRUE : FALSE;
+    return ret;
 }
 
 Bool
diff --git a/src/via_exa_h6.c b/src/via_exa_h6.c
index 1f0f91a..8029184 100644
--- a/src/via_exa_h6.c
+++ b/src/via_exa_h6.c
@@ -374,9 +374,16 @@ viaExaIsOffscreen(PixmapPtr pPix)
 {
     ScrnInfoPtr pScrn = xf86ScreenToScrn(pPix->drawable.pScreen);
     VIAPtr pVia = VIAPTR(pScrn);
-
-    return ((unsigned long)pPix->devPrivate.ptr -
-            (unsigned long) drm_bo_map(pScrn, pVia->drmmode.front_bo)) < pVia->drmmode.front_bo->size;
+    uint8_t* addr_size;
+    uint8_t* front_bo;
+    Bool ret;
+
+    front_bo = drm_bo_map(pScrn, pVia->drmmode.front_bo);
+    addr_size = (uint8_t*)pPix->devPrivate.ptr -
+                                            (unsigned long)front_bo;
+    ret = (addr_size < (uint8_t*)pVia->drmmode.front_bo->size) ?
+                                                        TRUE : FALSE;
+    return ret;
 }
 
 Bool


More information about the openchrome-devel mailing list