Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/wscons add separate flags for putchar() based copyco...



details:   https://anonhg.NetBSD.org/src/rev/62f8b2ea344d
branches:  trunk
changeset: 757760:62f8b2ea344d
user:      macallan <macallan%NetBSD.org@localhost>
date:      Tue Sep 21 03:33:14 2010 +0000

description:
add separate flags for putchar() based copycols() and copyrows() methods
for hw that can accelerate one but not the other, like Sun's Creator series
VCONS_DONT_READ does the same as before

diffstat:

 sys/dev/wscons/wsdisplay_vcons.c    |  14 +++++++++-----
 sys/dev/wscons/wsdisplay_vconsvar.h |  11 +++++++++--
 2 files changed, 18 insertions(+), 7 deletions(-)

diffs (63 lines):

diff -r f5cf3e805c83 -r 62f8b2ea344d sys/dev/wscons/wsdisplay_vcons.c
--- a/sys/dev/wscons/wsdisplay_vcons.c  Tue Sep 21 03:31:04 2010 +0000
+++ b/sys/dev/wscons/wsdisplay_vcons.c  Tue Sep 21 03:33:14 2010 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: wsdisplay_vcons.c,v 1.17 2010/08/18 16:46:51 macallan Exp $ */
+/*     $NetBSD: wsdisplay_vcons.c,v 1.18 2010/09/21 03:33:14 macallan Exp $ */
 
 /*-
  * Copyright (c) 2005, 2006 Michael Lorenz
@@ -27,7 +27,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: wsdisplay_vcons.c,v 1.17 2010/08/18 16:46:51 macallan Exp $");
+__KERNEL_RCSID(0, "$NetBSD: wsdisplay_vcons.c,v 1.18 2010/09/21 03:33:14 macallan Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -234,12 +234,16 @@
        ri->ri_ops.putchar   = vcons_putchar;
        ri->ri_ops.cursor    = vcons_cursor;
 
-       if (scr->scr_flags & VCONS_DONT_READ) {
-               ri->ri_ops.copyrows  = vcons_copyrows_noread;
+       if (scr->scr_flags & VCONS_NO_COPYCOLS) {
                ri->ri_ops.copycols  = vcons_copycols_noread;
        } else {
+               ri->ri_ops.copycols  = vcons_copycols;
+       }
+
+       if (scr->scr_flags & VCONS_NO_COPYROWS) {
+               ri->ri_ops.copyrows  = vcons_copyrows_noread;
+       } else {
                ri->ri_ops.copyrows  = vcons_copyrows;
-               ri->ri_ops.copycols  = vcons_copycols;
        }
 
        ri->ri_hw = scr;
diff -r f5cf3e805c83 -r 62f8b2ea344d sys/dev/wscons/wsdisplay_vconsvar.h
--- a/sys/dev/wscons/wsdisplay_vconsvar.h       Tue Sep 21 03:31:04 2010 +0000
+++ b/sys/dev/wscons/wsdisplay_vconsvar.h       Tue Sep 21 03:33:14 2010 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: wsdisplay_vconsvar.h,v 1.11 2010/08/18 16:46:51 macallan Exp $ */
+/*     $NetBSD: wsdisplay_vconsvar.h,v 1.12 2010/09/21 03:33:14 macallan Exp $ */
 
 /*-
  * Copyright (c) 2005, 2006 Michael Lorenz
@@ -53,7 +53,14 @@
                                         * - for drivers that use software
                                         * drawing */
 #define VCONS_DONT_DRAW                8       /* don't draw on this screen at all */
-#define VCONS_DONT_READ                0x10    /* avoid framebuffer reads */
+/*
+ * the following flags are for drivers which either can't accelerate (all) copy 
+ * operations or where drawing characters is faster than the blitter
+ * for example, Sun's Creator boards can't accelerate copycols()
+ */
+#define VCONS_NO_COPYCOLS      0x10    /* use putchar() based copycols() */
+#define VCONS_NO_COPYROWS      0x20    /* use putchar() basec copyrows() */
+#define VCONS_DONT_READ                0x30    /* avoid framebuffer reads */
        /* status flags used by vcons */
        uint32_t scr_status;
 #define VCONS_IS_VISIBLE       1       /* this screen is currently visible */



Home | Main Index | Thread Index | Old Index