Module Name:    src
Committed By:   macallan
Date:           Tue Sep 21 03:33:15 UTC 2010

Modified Files:
        src/sys/dev/wscons: wsdisplay_vcons.c wsdisplay_vconsvar.h

Log Message:
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


To generate a diff of this commit:
cvs rdiff -u -r1.17 -r1.18 src/sys/dev/wscons/wsdisplay_vcons.c
cvs rdiff -u -r1.11 -r1.12 src/sys/dev/wscons/wsdisplay_vconsvar.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/dev/wscons/wsdisplay_vcons.c
diff -u src/sys/dev/wscons/wsdisplay_vcons.c:1.17 src/sys/dev/wscons/wsdisplay_vcons.c:1.18
--- src/sys/dev/wscons/wsdisplay_vcons.c:1.17	Wed Aug 18 16:46:51 2010
+++ src/sys/dev/wscons/wsdisplay_vcons.c	Tue Sep 21 03:33:14 2010
@@ -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,14 +234,18 @@
 	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.copyrows  = vcons_copyrows;
 		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_hw = scr;
 
 	/* 

Index: src/sys/dev/wscons/wsdisplay_vconsvar.h
diff -u src/sys/dev/wscons/wsdisplay_vconsvar.h:1.11 src/sys/dev/wscons/wsdisplay_vconsvar.h:1.12
--- src/sys/dev/wscons/wsdisplay_vconsvar.h:1.11	Wed Aug 18 16:46:51 2010
+++ src/sys/dev/wscons/wsdisplay_vconsvar.h	Tue Sep 21 03:33:14 2010
@@ -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 */

Reply via email to