[openchrome-devel] xf86-video-openchrome: 6 commits - configure.ac src/via_dri.c src/via_exa.c src/via_i2c.c src/via_kms.c src/via_memmgr.c

Kevin Brace kevinbrace at kemper.freedesktop.org
Tue Jul 16 00:40:03 UTC 2019


 configure.ac     |    2 +-
 src/via_dri.c    |    4 +++-
 src/via_exa.c    |    1 -
 src/via_i2c.c    |   12 +++++++++---
 src/via_kms.c    |    3 ++-
 src/via_memmgr.c |    8 ++++++++
 6 files changed, 23 insertions(+), 7 deletions(-)

New commits:
commit 4fff56b03193ef40df7287a159c54c21823fefe5
Author: Kevin Brace <kevinbrace at gmx.com>
Date:   Mon Jul 15 17:39:52 2019 -0700

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

diff --git a/configure.ac b/configure.ac
index ebef80d..4bcca26 100644
--- a/configure.ac
+++ b/configure.ac
@@ -23,7 +23,7 @@
 # Initialize Autoconf
 AC_PREREQ([2.60])
 AC_INIT([xf86-video-openchrome],
-        [0.6.191],
+        [0.6.192],
         [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg&component=Driver/openchrome],
         [xf86-video-openchrome])
 
commit ede0b31611142a0ec8143ce0e8e29b40c1746544
Author: Kevin Brace <kevinbrace at gmx.com>
Date:   Mon Jul 15 17:38:23 2019 -0700

    Declare software rasterizer string as a static type
    
    Signed-off-by: Kevin Brace <kevinbrace at gmx.com>

diff --git a/src/via_dri.c b/src/via_dri.c
index b42ae11..8b5a9f1 100644
--- a/src/via_dri.c
+++ b/src/via_dri.c
@@ -79,6 +79,8 @@ static char VIAClientDriverName[] = "unichrome";
 static const ViaDRMVersion drmExpected = { 1, 3, 0 };
 static const ViaDRMVersion drmCompat = { 2, 0, 0 };
 
+static char SWRastClientDriverName[] = "swrast";
+
 static Bool VIAInitVisualConfigs(ScreenPtr pScreen);
 static Bool VIADRIMapInit(ScreenPtr pScreen, VIAPtr pVia);
 
@@ -548,7 +550,7 @@ VIADRI1ScreenInit(ScreenPtr pScreen)
         case VIA_VX800:
         case VIA_VX855:
         case VIA_VX900:
-            pDRIInfo->clientDriverName = "swrast";
+            pDRIInfo->clientDriverName = SWRastClientDriverName;
             break;
         default:
             pDRIInfo->clientDriverName = VIAClientDriverName;
commit 84ac928588ceac7ffc97354adfe249388df7a9ce
Author: Kevin Brace <kevinbrace at gmx.com>
Date:   Mon Jul 15 17:37:04 2019 -0700

    Declare an I2C bus name string as a static type
    
    Signed-off-by: Kevin Brace <kevinbrace at gmx.com>

diff --git a/src/via_i2c.c b/src/via_i2c.c
index 5f1288f..91e1add 100644
--- a/src/via_i2c.c
+++ b/src/via_i2c.c
@@ -39,6 +39,12 @@
 #define SDA_WRITE 0x10
 #define SCL_WRITE 0x20
 
+
+static char strI2CBus1[] = "I2C Bus 1";
+static char strI2CBus2[] = "I2C Bus 2";
+static char strI2CBus3[] = "I2C Bus 3";
+
+
 /*
  * First I2C Bus: Typically used for detecting a VGA monitor.
  */
@@ -90,7 +96,7 @@ ViaI2CBus1Init(ScrnInfoPtr pScrn)
         return NULL;
     }
 
-    pI2CBus->BusName = "I2C Bus 1";
+    pI2CBus->BusName = strI2CBus1;
     pI2CBus->scrnIndex = pScrn->scrnIndex;
 
     pI2CBus->I2CPutBits = ViaI2C1PutBits;
@@ -174,7 +180,7 @@ ViaI2CBus2Init(ScrnInfoPtr pScrn)
         return NULL;
     }
 
-    pI2CBus->BusName = "I2C Bus 2";
+    pI2CBus->BusName = strI2CBus2;
     pI2CBus->scrnIndex = pScrn->scrnIndex;
 
     pI2CBus->I2CPutBits = ViaI2C2PutBits;
@@ -410,7 +416,7 @@ ViaI2CBus3Init(ScrnInfoPtr pScrn)
         return NULL;
     }
 
-    pI2CBus->BusName = "I2C Bus 3";
+    pI2CBus->BusName = strI2CBus3;
     pI2CBus->scrnIndex = pScrn->scrnIndex;
 
     pI2CBus->I2CPutBits = ViaI2C3SimplePutBits;
commit 08ba7c76baa663bac01d7ab99e62fccc729dedfc
Author: Kevin Brace <kevinbrace at gmx.com>
Date:   Sat Jul 13 19:08:09 2019 -0700

    Declare find_clones() as a static type function
    
    Signed-off-by: Kevin Brace <kevinbrace at gmx.com>

diff --git a/src/via_kms.c b/src/via_kms.c
index e8e9126..82ed444 100644
--- a/src/via_kms.c
+++ b/src/via_kms.c
@@ -737,7 +737,8 @@ out_free_encoders:
     drmModeFreeConnector(koutput);
 }
 
-uint32_t find_clones(ScrnInfoPtr scrn, xf86OutputPtr output)
+static uint32_t
+find_clones(ScrnInfoPtr scrn, xf86OutputPtr output)
 {
     drmmode_output_private_ptr drmmode_output = output->driver_private, clone_drmout;
     xf86CrtcConfigPtr   xf86_config = XF86_CRTC_CONFIG_PTR(scrn);
commit a89eb97d3ab348884e08ef6667b4309b8dfcaac3
Author: Kevin Brace <kevinbrace at gmx.com>
Date:   Sat Jul 13 19:00:21 2019 -0700

    Handle unrecognized DRM format type within drm_bo_alloc_surface()
    
    Signed-off-by: Kevin Brace <kevinbrace at gmx.com>

diff --git a/src/via_memmgr.c b/src/via_memmgr.c
index d87d075..508d2b8 100644
--- a/src/via_memmgr.c
+++ b/src/via_memmgr.c
@@ -95,12 +95,20 @@ drm_bo_alloc_surface(ScrnInfoPtr pScrn, unsigned int width, unsigned int height,
     case DRM_FORMAT_XRGB8888:
         pitch = width * 4;
         break;
+    default:
+        pitch = 0;
+        break;
+    }
+
+    if (pitch == 0) {
+        goto exit;
     }
 
     pitch = ALIGN_TO(pitch, alignment);
     obj = drm_bo_alloc(pScrn, pitch * height, alignment, domain);
     if (!obj->pitch)
         obj->pitch = pitch;
+exit:
     return obj;
 }
 
commit 0e2345855a6b7a99a9742da0265cf4be40d0909e
Author: Kevin Brace <kevinbrace at gmx.com>
Date:   Sat Jul 13 18:39:18 2019 -0700

    Not include via_rop.h inside via_exa.c
    
    Signed-off-by: Kevin Brace <kevinbrace at gmx.com>

diff --git a/src/via_exa.c b/src/via_exa.c
index 7708610..5f02392 100644
--- a/src/via_exa.c
+++ b/src/via_exa.c
@@ -42,7 +42,6 @@
 #include "via_driver.h"
 #include "via_regs.h"
 #include "via_dmabuffer.h"
-#include "via_rop.h"
 
 /*
  * Use PCI MMIO to flush the command buffer when AGP DMA is not available.


More information about the openchrome-devel mailing list