[openchrome-devel] xf86-video-openchrome: 2 commits - src/via_display.c src/via_driver.c src/via_driver.h

Kevin Brace kevinbrace at kemper.freedesktop.org
Sat Apr 4 14:44:08 UTC 2020


 src/via_display.c |   77 ------------------------------------------------------
 src/via_driver.c  |   31 ++++-----------------
 src/via_driver.h  |    2 -
 3 files changed, 7 insertions(+), 103 deletions(-)

New commits:
commit 8411740a951dae36537a2cd9809ee4c592b99065
Author: Kevin Brace <kevinbrace at gmx.com>
Date:   Sat Apr 4 07:40:04 2020 -0700

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

diff --git a/configure.ac b/configure.ac
index ea0cc47..97bdb4e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -23,7 +23,7 @@
 # Initialize Autoconf
 AC_PREREQ([2.60])
 AC_INIT([xf86-video-openchrome],
-        [0.6.222],
+        [0.6.223],
         [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg&component=Driver/openchrome],
         [xf86-video-openchrome])
 
commit f197e92241f8e4c55e890c3f64f2929ba23b4cfa
Author: Kevin Brace <kevinbrace at gmx.com>
Date:   Sat Apr 4 07:39:47 2020 -0700

    Revert commit 8484549
    
    In development code adding hardware cursor (bi-color hardware cursor)
    support for older devices got committed accidentally.
    
    Signed-off-by: Kevin Brace <kevinbrace at gmx.com>

diff --git a/configure.ac b/configure.ac
index 97bdb4e..ea0cc47 100644
--- a/configure.ac
+++ b/configure.ac
@@ -23,7 +23,7 @@
 # Initialize Autoconf
 AC_PREREQ([2.60])
 AC_INIT([xf86-video-openchrome],
-        [0.6.223],
+        [0.6.222],
         [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg&component=Driver/openchrome],
         [xf86-video-openchrome])
 
diff --git a/src/via_display.c b/src/via_display.c
index a26965e..696251f 100644
--- a/src/via_display.c
+++ b/src/via_display.c
@@ -175,66 +175,6 @@ viaIGA1SetGamma(ScrnInfoPtr pScrn, CARD8 gammaCorrection)
                         "Exiting viaIGA1SetGamma.\n"));
 }
 
-/*
- * This function displays or hides hardware cursor (HC).
- */
-static void
-viaDisplayHC(ScrnInfoPtr pScrn, Bool hcStatus)
-{
-    VIAPtr pVia = VIAPTR(pScrn);
-    uint32_t temp;
-
-    temp = VIAGETREG(VIA_REG_CURSOR_MODE);
-    temp &= 0xFFFFFFFE;
-    temp |= hcStatus ? 0x00000001 : 0x00000000;
-
-    /*
-     * 64x64 hardware cursor
-     */
-    temp &= 0xFFFFFFFD;
-
-    /*
-     * 32x32 hardware cursor
-     */
-//  temp |= 0x00000002;
-
-    /* VIA_REG_CURSOR_MODE[0] - Hardware Cursor Enable */
-    VIASETREG(VIA_REG_CURSOR_MODE, temp);
-}
-
-static void
-viaSetHCStartingAddress(xf86CrtcPtr crtc)
-{
-    drmmode_crtc_private_ptr iga = crtc->driver_private;
-    ScrnInfoPtr pScrn = crtc->scrn;
-    VIAPtr pVia = VIAPTR(pScrn);
-    uint32_t temp;
-
-    temp = VIAGETREG(VIA_REG_CURSOR_MODE);
-    temp &= 0xFC0000FF;
-    temp |= iga->cursor_bo->offset;
-
-    xf86DrvMsg(pScrn->scrnIndex, X_INFO,
-               "offset: %lx\n", iga->cursor_bo->offset);
-    xf86DrvMsg(pScrn->scrnIndex, X_INFO,
-               "temp: %x\n", temp);
-    /*
-     * VIA_REG_CURSOR_MODE[25:8] - Hardware Cursor Base Address
-     */
-    VIASETREG(VIA_REG_CURSOR_MODE, temp);
-}
-
-static void
-viaSetHCLocation(ScrnInfoPtr pScrn,
-                    int x, unsigned int xoff,
-                    int y, unsigned int yoff)
-{
-    VIAPtr pVia = VIAPTR(pScrn);
-
-    VIASETREG(VIA_REG_CURSOR_POS, ((x    << 16) | (y    & 0x07ff)));
-    VIASETREG(VIA_REG_CURSOR_ORG, ((xoff << 16) | (yoff & 0x07ff)));
-}
-
 static void
 viaIGA1InitHI(ScrnInfoPtr pScrn)
 {
@@ -3471,7 +3411,6 @@ iga_crtc_set_cursor_colors(xf86CrtcPtr crtc, int bg, int fg)
     ScrnInfoPtr pScrn = crtc->scrn;
     drmmode_crtc_private_ptr iga = crtc->driver_private;
     xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(pScrn);
-    VIAPtr pVia = VIAPTR(pScrn);
 
     if (xf86_config->cursor_fg)
         return;
@@ -3548,20 +3487,6 @@ iga_crtc_hide_cursor(xf86CrtcPtr crtc)
     }
 }
 
-static void
-iga_crtc_load_cursor_image(xf86CrtcPtr crtc, CARD8 *image)
-{
-    drmmode_crtc_private_ptr iga = crtc->driver_private;
-    ScrnInfoPtr pScrn = crtc->scrn;
-    void *dst;
-
-    dst = drm_bo_map(pScrn, iga->cursor_bo);
-    memcpy(dst, image, iga->cursor_bo->size);
-    drm_bo_unmap(pScrn, iga->cursor_bo);
-
-    viaSetHCStartingAddress(crtc);
-}
-
 static void
 iga_crtc_load_cursor_argb(xf86CrtcPtr crtc, CARD32 *image)
 {
@@ -3608,7 +3533,6 @@ const xf86CrtcFuncsRec iga1_crtc_funcs = {
     .set_cursor_position    = iga_crtc_set_cursor_position,
     .show_cursor            = iga_crtc_show_cursor,
     .hide_cursor            = iga_crtc_hide_cursor,
-    .load_cursor_image      = iga_crtc_load_cursor_image,
     .load_cursor_argb       = iga_crtc_load_cursor_argb,
 #if GET_ABI_MAJOR(ABI_VIDEODRV_VERSION) > 2
     .set_origin             = iga1_crtc_set_origin,
@@ -3922,7 +3846,6 @@ const xf86CrtcFuncsRec iga2_crtc_funcs = {
     .set_cursor_position    = iga_crtc_set_cursor_position,
     .show_cursor            = iga_crtc_show_cursor,
     .hide_cursor            = iga_crtc_hide_cursor,
-    .load_cursor_image      = iga_crtc_load_cursor_image,
     .load_cursor_argb       = iga_crtc_load_cursor_argb,
 #if GET_ABI_MAJOR(ABI_VIDEODRV_VERSION) > 2
     .set_origin             = iga2_crtc_set_origin,
diff --git a/src/via_driver.c b/src/via_driver.c
index 034b34c..55e40e6 100644
--- a/src/via_driver.c
+++ b/src/via_driver.c
@@ -1533,30 +1533,13 @@ VIAScreenInit(SCREEN_INIT_ARGS_DECL)
     if (pVia->drmmode.hwcursor) {
         xf86_config = XF86_CRTC_CONFIG_PTR(pScrn);
 
-        switch (pVia->Chipset) {
-        case VIA_CLE266:
-        case VIA_KM400:
-        case VIA_P4M800PRO:
-            cursorWidth = cursorHeight = 64;
-            flags = HARDWARE_CURSOR_INVERT_MASK |
-                    HARDWARE_CURSOR_AND_SOURCE_WITH_MASK |
-                    HARDWARE_CURSOR_SOURCE_MASK_INTERLEAVE_64 |
-                    HARDWARE_CURSOR_TRUECOLOR_AT_8BPP |
-                    HARDWARE_CURSOR_BIT_ORDER_MSBFIRST;
-            cursorSize = ((cursorWidth * cursorHeight) / 8) * 2;
-            alignment = 1024;
-            pVia->useHardwareCursor = TRUE;
-            break;
-        default:
-            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;
-            break;
-        }
+        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;
 
         /*
          * Set cursor location in frame buffer.
diff --git a/src/via_driver.h b/src/via_driver.h
index a443454..011ede7 100644
--- a/src/via_driver.h
+++ b/src/via_driver.h
@@ -328,8 +328,6 @@ typedef struct _VIA {
     void                *displayMap;
     CARD32              displayOffset;
 
-    Bool                useHardwareCursor;
-
 #ifdef HAVE_DEBUG
     Bool                disableXvBWCheck;
     Bool                DumpVGAROM;


More information about the openchrome-devel mailing list