Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/wscons use optimized refresh with VCONS_DRAW_INTR ev...
details: https://anonhg.NetBSD.org/src/rev/ae8504fe855c
branches: trunk
changeset: 339390:ae8504fe855c
user: mlelstv <mlelstv%NetBSD.org@localhost>
date: Sun Jul 19 13:22:42 2015 +0000
description:
use optimized refresh with VCONS_DRAW_INTR even when in polling mode.
diffstat:
sys/dev/wscons/wsconsio.h | 22 +++++++++++++++++++++-
sys/dev/wscons/wsdisplay_vcons.c | 14 ++++++++------
2 files changed, 29 insertions(+), 7 deletions(-)
diffs (78 lines):
diff -r c4c81b7f048b -r ae8504fe855c sys/dev/wscons/wsconsio.h
--- a/sys/dev/wscons/wsconsio.h Sun Jul 19 10:16:55 2015 +0000
+++ b/sys/dev/wscons/wsconsio.h Sun Jul 19 13:22:42 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: wsconsio.h,v 1.113 2015/05/18 14:27:49 jmcneill Exp $ */
+/* $NetBSD: wsconsio.h,v 1.114 2015/07/19 13:22:42 mlelstv Exp $ */
/*
* Copyright (c) 1996, 1997 Christopher G. Demetriou. All rights reserved.
@@ -657,4 +657,24 @@
#define WSDISPLAYIO_GET_FBINFO _IOWR('W', 104, struct wsdisplayio_fbinfo)
+struct wsdisplayio_blit {
+ uint32_t serial;
+ uint32_t op;
+ uint32_t srcx;
+ uint32_t srcy;
+ uint32_t dstx;
+ uint32_t dsty;
+ uint32_t width;
+ uint32_t height;
+ uint32_t pen;
+};
+
+/* blit ops */
+#define WSFB_BLIT_FILL 1 /* fill rectangle */
+#define WSFB_BLIT_COPY 2 /* copy rectangle */
+#define WSFB_BLIT_TRANS 3 /* copy rectangle with color key */
+
+#define WSDISPLAYIO_DOBLIT _IOWR('W', 105, struct wsdisplayio_blit)
+#define WSDISPLAYIO_WAITBLIT _IOWR('W', 106, struct wsdisplayio_blit)
+
#endif /* _DEV_WSCONS_WSCONSIO_H_ */
diff -r c4c81b7f048b -r ae8504fe855c sys/dev/wscons/wsdisplay_vcons.c
--- a/sys/dev/wscons/wsdisplay_vcons.c Sun Jul 19 10:16:55 2015 +0000
+++ b/sys/dev/wscons/wsdisplay_vcons.c Sun Jul 19 13:22:42 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: wsdisplay_vcons.c,v 1.33 2014/11/10 20:52:47 jmcneill Exp $ */
+/* $NetBSD: wsdisplay_vcons.c,v 1.34 2015/07/19 13:22:42 mlelstv Exp $ */
/*-
* Copyright (c) 2005, 2006 Michael Lorenz
@@ -27,7 +27,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: wsdisplay_vcons.c,v 1.33 2014/11/10 20:52:47 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: wsdisplay_vcons.c,v 1.34 2015/07/19 13:22:42 mlelstv Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -736,9 +736,10 @@
vcons_lock(scr);
if (SCREEN_IS_VISIBLE(scr) && SCREEN_CAN_DRAW(scr)) {
+#if defined(VCONS_DRAW_INTR)
+ vcons_update_screen(scr);
+#else
scr->scr_vd->copycols(cookie, row, srccol, dstcol, ncols);
-#if defined(VCONS_DRAW_INTR)
- vcons_invalidate_cache(scr->scr_vd);
#endif
}
vcons_unlock(scr);
@@ -907,9 +908,10 @@
vcons_lock(scr);
if (SCREEN_IS_VISIBLE(scr) && SCREEN_CAN_DRAW(scr)) {
+#if defined(VCONS_DRAW_INTR)
+ vcons_update_screen(scr);
+#else
scr->scr_vd->copyrows(cookie, srcrow, dstrow, nrows);
-#if defined(VCONS_DRAW_INTR)
- vcons_invalidate_cache(scr->scr_vd);
#endif
}
vcons_unlock(scr);
Home |
Main Index |
Thread Index |
Old Index