Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/arm/allwinner hide the hw cursor when blanking the ...



details:   https://anonhg.NetBSD.org/src/rev/567a97b65d8a
branches:  trunk
changeset: 334670:567a97b65d8a
user:      jmcneill <jmcneill%NetBSD.org@localhost>
date:      Sun Nov 30 20:04:57 2014 +0000

description:
hide the hw cursor when blanking the screen

diffstat:

 sys/arch/arm/allwinner/awin_debe.c |  18 ++++++++++++++----
 1 files changed, 14 insertions(+), 4 deletions(-)

diffs (55 lines):

diff -r ee1fa1ae5c8d -r 567a97b65d8a sys/arch/arm/allwinner/awin_debe.c
--- a/sys/arch/arm/allwinner/awin_debe.c        Sun Nov 30 19:15:53 2014 +0000
+++ b/sys/arch/arm/allwinner/awin_debe.c        Sun Nov 30 20:04:57 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: awin_debe.c,v 1.9 2014/11/30 19:15:53 jmcneill Exp $ */
+/* $NetBSD: awin_debe.c,v 1.10 2014/11/30 20:04:57 jmcneill Exp $ */
 
 /*-
  * Copyright (c) 2014 Jared D. McNeill <jmcneill%invisible.ca@localhost>
@@ -36,7 +36,7 @@
 #define AWIN_DEBE_CURMAX       64
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: awin_debe.c,v 1.9 2014/11/30 19:15:53 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: awin_debe.c,v 1.10 2014/11/30 20:04:57 jmcneill Exp $");
 
 #include <sys/param.h>
 #include <sys/bus.h>
@@ -69,6 +69,7 @@
 
        uint16_t sc_margin;
 
+       bool sc_cursor_enable;
        int sc_cursor_x, sc_cursor_y;
        int sc_hot_x, sc_hot_y;
        uint8_t sc_cursor_bitmap[8 * AWIN_DEBE_CURMAX];
@@ -320,6 +321,8 @@
                else
                        val &= ~AWIN_DEBE_MODCTL_HWC_EN;
                DEBE_WRITE(sc, AWIN_DEBE_MODCTL_REG, val);
+
+               sc->sc_cursor_enable = cur->enable;
        }
 
        if (cur->which & WSDISPLAY_CURSOR_DOHOT) {
@@ -504,10 +507,17 @@
        case WSDISPLAYIO_SVIDEO:
                enable = *(int *)data;
                val = DEBE_READ(sc, AWIN_DEBE_MODCTL_REG);
-               if (enable)
+               if (enable) {
                        val |= AWIN_DEBE_MODCTL_LAY0_EN;
-               else
+                       if (sc->sc_cursor_enable) {
+                               val |= AWIN_DEBE_MODCTL_HWC_EN;
+                       } else {
+                               val &= ~AWIN_DEBE_MODCTL_HWC_EN;
+                       }
+               } else {
                        val &= ~AWIN_DEBE_MODCTL_LAY0_EN;
+                       val &= ~AWIN_DEBE_MODCTL_HWC_EN;
+               }
                DEBE_WRITE(sc, AWIN_DEBE_MODCTL_REG, val);
                return 0;
        case WSDISPLAYIO_GVIDEO:



Home | Main Index | Thread Index | Old Index