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

Kevin Brace kevinbrace at kemper.freedesktop.org
Fri Aug 18 23:12:32 UTC 2017


 configure.ac     |    2 +-
 src/via_driver.c |   16 +++++++++++-----
 2 files changed, 12 insertions(+), 6 deletions(-)

New commits:
commit e6f9b06def0560a5cf206e84158d4c794c6b928f
Author: Kevin Brace <kevinbrace at gmx.com>
Date:   Fri Aug 18 16:12:14 2017 -0700

    Version bumped to 0.6.158
    
    Put in important code fixes for next generation OpenChrome DRM
    (drm-openchrome).
    
    Signed-off-by: Kevin Brace <kevinbrace at gmx.com>

diff --git a/configure.ac b/configure.ac
index 96fab39..5032d07 100644
--- a/configure.ac
+++ b/configure.ac
@@ -23,7 +23,7 @@
 # Initialize Autoconf
 AC_PREREQ(2.57)
 AC_INIT([xf86-video-openchrome],
-        [0.6.157],
+        [0.6.158],
         [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg&component=Driver/openchrome],
         [xf86-video-openchrome])
 
commit b1cb0f18d1a9e0081e4c89954b2662f40df55db1
Author: Kevin Brace <kevinbrace at gmx.com>
Date:   Fri Aug 18 16:08:04 2017 -0700

    Initial fix for supporting next generation OpenChrome DRM
    
    The DDX code “happened” to work without these safeguards when mated
    with an older Linux kernel (i.e., 3.19 rc6). Since then, the behavior
    of Linux has changed, and these fixes are needed in order to properly
    handle KMS (Kernel Mode Setting). Older code was going through code
    paths it should not have been going through.
    
    Signed-off-by: Kevin Brace <kevinbrace at gmx.com>

diff --git a/src/via_driver.c b/src/via_driver.c
index 221c589..f47abe9 100644
--- a/src/via_driver.c
+++ b/src/via_driver.c
@@ -1164,9 +1164,11 @@ VIAPreInit(ScrnInfoPtr pScrn, int flags)
     /* After umsPreInit function succeeds, PCI hardware resources are
      * memory mapped. If there is an error from this point on, they will
      * need to be explicitly relinquished. */
-    if (!umsPreInit(pScrn)) {
-        VIAFreeRec(pScrn);
-        return FALSE;
+    if (!pVia->KMS) {
+        if (!umsPreInit(pScrn)) {
+            VIAFreeRec(pScrn);
+            return FALSE;
+        }
     }
 
     xf86CollectOptions(pScrn, option);
@@ -1509,8 +1511,11 @@ VIAPreInit(ScrnInfoPtr pScrn, int flags)
     status = TRUE;
     goto exit;
 fail:
-    viaUnmapMMIO(pScrn);
-    VIAFreeRec(pScrn);
+    if (!pVia->KMS) {
+        viaUnmapMMIO(pScrn);
+    }
+
+	VIAFreeRec(pScrn);
 exit:
     DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO,
                         "Exiting VIAPreInit.\n"));
@@ -1709,6 +1714,7 @@ VIAScreenInit(SCREEN_INIT_ARGS_DECL)
             xf86DrvMsg(pScrn->scrnIndex, X_WARNING,
                         "drmSetMaster failed: %s\n",
                         strerror(errno));
+            return FALSE;
         }
     }
 


More information about the Openchrome-devel mailing list