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

Kevin Brace kevinbrace at kemper.freedesktop.org
Wed Apr 1 15:11:49 UTC 2020


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

New commits:
commit f32f4762ab68c3283814c07feb18ca3d6865e98c
Author: Kevin Brace <kevinbrace at gmx.com>
Date:   Wed Apr 1 08:04:03 2020 -0700

    Version bumped to 0.6.221
    
    Put in a fix for KMS mode CLE266 and KM400 chipsets HI (Hardware Icon)
    based cursor.  The cursor is still broken in UMS mode.
    
    Signed-off-by: Kevin Brace <kevinbrace at gmx.com>

diff --git a/configure.ac b/configure.ac
index ad1c6e8..5795b9b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -23,7 +23,7 @@
 # Initialize Autoconf
 AC_PREREQ([2.60])
 AC_INIT([xf86-video-openchrome],
-        [0.6.220],
+        [0.6.221],
         [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg&component=Driver/openchrome],
         [xf86-video-openchrome])
 
commit d3c0c8fbfb9d704b43b3bd3c88e6d6495a604e8f
Author: Kevin Brace <kevinbrace at gmx.com>
Date:   Wed Apr 1 07:55:24 2020 -0700

    Fix for KMS mode CLE266 and KM400 chipsets HI (Hardware Icon) cursor
    
    The HI cursor is still broken in UMS mode for CLE266 and KM400
    chipsets.
    
    Signed-off-by: Kevin Brace <kevinbrace at gmx.com>

diff --git a/src/via_driver.c b/src/via_driver.c
index d0adba5..34a6e47 100644
--- a/src/via_driver.c
+++ b/src/via_driver.c
@@ -1419,6 +1419,10 @@ VIAScreenInit(SCREEN_INIT_ARGS_DECL)
     VIAPtr pVia = VIAPTR(pScrn);
     unsigned int bppSize, alignedPitch;
     unsigned long alignment;
+    xf86CrtcConfigPtr xf86_config;
+    int cursorWidth, cursorHeight, flags;
+    int cursorSize;
+    int i;
 
     pScrn->displayWidth = pScrn->virtualX;
 
@@ -1526,26 +1530,15 @@ VIAScreenInit(SCREEN_INIT_ARGS_DECL)
     miDCInitialize(pScreen, xf86GetPointerScreenFuncs());
 
     if (pVia->drmmode.hwcursor) {
-        xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(pScrn);
-        int flags = (HARDWARE_CURSOR_AND_SOURCE_WITH_MASK |
-                     HARDWARE_CURSOR_TRUECOLOR_AT_8BPP);
-        int cursorSize, size, i = 0;
-
-        switch (pVia->Chipset) {
-        case VIA_CLE266:
-        case VIA_KM400:
-            flags |= HARDWARE_CURSOR_SOURCE_MASK_INTERLEAVE_1;
-            size = 32;
-            cursorSize = ((size * size) >> 3) * 2;
-            alignment = cursorSize;
-            break;
-        default:
-            flags |= (HARDWARE_CURSOR_SOURCE_MASK_INTERLEAVE_64 | HARDWARE_CURSOR_ARGB);
-            size = 64;
-            cursorSize = (size * size) << 2;
-            alignment = cursorSize;
-            break;
-        }
+        xf86_config = XF86_CRTC_CONFIG_PTR(pScrn);
+
+        cursorWidth = cursorHeight = 64;
+        flags = HARDWARE_CURSOR_AND_SOURCE_WITH_MASK |
+                HARDWARE_CURSOR_SOURCE_MASK_INTERLEAVE_64 |
+                HARDWARE_CURSOR_TRUECOLOR_AT_8BPP |
+                HARDWARE_CURSOR_ARGB;
+        cursorSize = (cursorWidth * cursorHeight) * (32 / 8);
+        alignment = 1024;
 
         for (i = 0; i < xf86_config->num_crtc; i++) {
             xf86CrtcPtr crtc = xf86_config->crtc[i];
@@ -1559,7 +1552,8 @@ VIAScreenInit(SCREEN_INIT_ARGS_DECL)
                                             TTM_PL_FLAG_VRAM);
         }
 
-        if (!xf86_cursors_init(pScreen, size, size, flags)) {
+        if (!xf86_cursors_init(pScreen,
+                                cursorWidth, cursorHeight, flags)) {
             pVia->drmmode.hwcursor = FALSE;
             xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
                         "Hardware cursor initialization failed.\n");


More information about the openchrome-devel mailing list