Module Name: src
Committed By: macallan
Date: Wed Feb 21 13:24:40 UTC 2024
Modified Files:
src/sys/arch/hppa/dev: gftfb.c
Log Message:
avoid one more instance of unnecessary blitter stalling
To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/sys/arch/hppa/dev/gftfb.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/arch/hppa/dev/gftfb.c
diff -u src/sys/arch/hppa/dev/gftfb.c:1.5 src/sys/arch/hppa/dev/gftfb.c:1.6
--- src/sys/arch/hppa/dev/gftfb.c:1.5 Wed Feb 21 13:04:01 2024
+++ src/sys/arch/hppa/dev/gftfb.c Wed Feb 21 13:24:40 2024
@@ -1,9 +1,10 @@
-/* $NetBSD: gftfb.c,v 1.5 2024/02/21 13:04:01 macallan Exp $ */
+/* $NetBSD: gftfb.c,v 1.6 2024/02/21 13:24:40 macallan Exp $ */
/* $OpenBSD: sti_pci.c,v 1.7 2009/02/06 22:51:04 miod Exp $ */
/*
* Copyright (c) 2006, 2007 Miodrag Vallat.
+ ^ 2024 Michael Lorenz
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
@@ -19,6 +20,11 @@
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
+/*
+ * a native driver for HP Visualize EG PCI graphics cards
+ * STI portions are from Miodrag Vallat's sti_pci.c
+ */
+
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/kmem.h>
@@ -974,15 +980,17 @@ gftfb_bitblt(void *cookie, int xs, int y
bus_space_tag_t memt = rom->memt;
bus_space_handle_t memh = rom->regh[2];
- gftfb_wait(sc);
- bus_space_write_stream_4(memt, memh, NGLE_REG_10, 0x13a01000);
+ if (sc->sc_hwmode != HW_BLIT) {
+ gftfb_wait(sc);
+ bus_space_write_stream_4(memt, memh, NGLE_REG_10, 0x13a01000);
+ sc->sc_hwmode = HW_BLIT;
+ }
gftfb_wait_fifo(sc, 5);
bus_space_write_stream_4(memt, memh, NGLE_REG_14, ((rop << 8) & 0xf00) | 0x23000000);
bus_space_write_stream_4(memt, memh, NGLE_REG_13, 0xff);
bus_space_write_stream_4(memt, memh, NGLE_REG_24, (xs << 16) | ys);
bus_space_write_stream_4(memt, memh, NGLE_REG_7, (wi << 16) | he);
bus_space_write_stream_4(memt, memh, NGLE_REG_25, (xd << 16) | yd);
- sc->sc_hwmode = HW_BLIT;
}
static void