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

Kevin Brace kevinbrace at kemper.freedesktop.org
Tue Aug 11 03:32:41 UTC 2020


 configure.ac     |    2 +-
 src/via_driver.c |   25 +++++++++++++++++--------
 2 files changed, 18 insertions(+), 9 deletions(-)

New commits:
commit 08d4273b058d94f0a894828c0905f916b9e54871
Author: Kevin Brace <kevinbrace at gmx.com>
Date:   Mon Aug 10 20:32:20 2020 -0700

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

diff --git a/configure.ac b/configure.ac
index b2497ef..4453b20 100644
--- a/configure.ac
+++ b/configure.ac
@@ -23,7 +23,7 @@
 # Initialize Autoconf
 AC_PREREQ([2.60])
 AC_INIT([xf86-video-openchrome],
-        [0.6.225],
+        [0.6.226],
         [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg&component=Driver/openchrome],
         [xf86-video-openchrome])
 
commit e23ad171259e2a128bb992d63591dc412891fa33
Author: Kevin Brace <kevinbrace at gmx.com>
Date:   Mon Aug 10 20:13:50 2020 -0700

    Fix for a crash during X Server wind down
    
    Since there is only one hardware cursor storage now, it should be
    released only once during wind down.  Essentially, commit 091cb89
    (Use only one storage location for HI (Hardware Icon) based cursor)
    did not have the proper updated code.
    
    Signed-off-by: Kevin Brace <kevinbrace at gmx.com>

diff --git a/src/via_driver.c b/src/via_driver.c
index 3289e74..6919d33 100644
--- a/src/via_driver.c
+++ b/src/via_driver.c
@@ -1343,8 +1343,19 @@ VIACloseScreen(CLOSE_SCREEN_ARGS_DECL)
 {
     ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen);
     xf86CrtcConfigPtr   xf86_config = XF86_CRTC_CONFIG_PTR(pScrn);
+
+    /*
+     * Since there is now only one location for the allocated
+     * hardware cursor storage, the code needs access to one of the
+     * two CRTC structs for obtaining pointer address to the hardware
+     * cursor storage.  In this case, IGA1's CRTC struct happens to
+     * be selected, but IGA2's CRTC struct can very well supply the
+     * same information.
+     */
+    xf86CrtcPtr crtc = xf86_config->crtc[0];
+    drmmode_crtc_private_ptr iga = crtc->driver_private;
+
     VIAPtr pVia = VIAPTR(pScrn);
-    int i;
 
     DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, "VIACloseScreen\n"));
 
@@ -1381,13 +1392,11 @@ VIACloseScreen(CLOSE_SCREEN_ARGS_DECL)
         drm_bo_free(pScrn, pVia->drmmode.front_bo);
     }
 
-    for (i = 0; i < xf86_config->num_crtc; i++) {
-        xf86CrtcPtr crtc = xf86_config->crtc[i];
-        drmmode_crtc_private_ptr iga = crtc->driver_private;
-
-        if (iga->cursor_bo)
-            drm_bo_free(pScrn, iga->cursor_bo);
-    }
+    if (iga->cursor_bo)
+        /*
+         * Release hardware cursor storage.
+         */
+        drm_bo_free(pScrn, iga->cursor_bo);
 
 #ifdef HAVE_DRI
     if (pVia->directRenderingType == DRI_1)


More information about the openchrome-devel mailing list