diff options
author | Miod Vallat <miod@cvs.openbsd.org> | 2006-07-31 18:01:19 +0000 |
---|---|---|
committer | Miod Vallat <miod@cvs.openbsd.org> | 2006-07-31 18:01:19 +0000 |
commit | de0b717bc1ab7992bf418fef9d66a59fcf4a279c (patch) | |
tree | b6026544616312ba09a5ed912eac25fec41da647 /sys | |
parent | 5221282c5b55cebf1b9908c506ff0d77640ba978 (diff) |
Get my raster ops correct for the cursor, fixes the display glitches.
Diffstat (limited to 'sys')
-rw-r--r-- | sys/arch/vax/qbus/qdreg.h | 10 | ||||
-rw-r--r-- | sys/arch/vax/vsa/gpx.c | 13 |
2 files changed, 13 insertions, 10 deletions
diff --git a/sys/arch/vax/qbus/qdreg.h b/sys/arch/vax/qbus/qdreg.h index 32141bc415e..a7be6c4c722 100644 --- a/sys/arch/vax/qbus/qdreg.h +++ b/sys/arch/vax/qbus/qdreg.h @@ -1,4 +1,4 @@ -/* $OpenBSD: qdreg.h,v 1.3 2003/09/26 21:43:31 miod Exp $ */ +/* $OpenBSD: qdreg.h,v 1.4 2006/07/31 18:01:16 miod Exp $ */ /* $NetBSD: qdreg.h,v 1.1 1998/03/21 10:02:39 ragge Exp $ */ /*- * Copyright (c) 1982, 1986 The Regents of the University of California. @@ -173,10 +173,12 @@ /* VIPER logical function unit codes */ #define LF_ZEROS 0x0000 +#define LF_NOT_D 0x0003 #define LF_D_XOR_S 0x0006 -#define LF_SOURCE 0x000A -#define LF_D_OR_S 0x000E -#define LF_ONES 0x000F +#define LF_D 0x000c +#define LF_SOURCE 0x000a +#define LF_D_OR_S 0x000d +#define LF_ONES 0x000f #define INV_M1_M2 0x0030 #define FULL_SRC_RESOLUTION 0X00C0 /* makes second pass like first pass */ diff --git a/sys/arch/vax/vsa/gpx.c b/sys/arch/vax/vsa/gpx.c index 57a3835e7e2..141c7e5a204 100644 --- a/sys/arch/vax/vsa/gpx.c +++ b/sys/arch/vax/vsa/gpx.c @@ -1,4 +1,4 @@ -/* $OpenBSD: gpx.c,v 1.6 2006/07/29 19:04:37 miod Exp $ */ +/* $OpenBSD: gpx.c,v 1.7 2006/07/31 18:01:18 miod Exp $ */ /* * Copyright (c) 2006 Miodrag Vallat. * @@ -759,9 +759,9 @@ gpx_reset_viper(struct gpx_screen *ss) /* putchar */ gpx_viper_write(ss, LU_FUNCTION_R1, FULL_SRC_RESOLUTION | LF_SOURCE); /* erase{cols,rows} */ - gpx_viper_write(ss, LU_FUNCTION_R2, FULL_SRC_RESOLUTION | LF_ONES); + gpx_viper_write(ss, LU_FUNCTION_R2, FULL_SRC_RESOLUTION | LF_ZEROS); /* cursor */ - gpx_viper_write(ss, LU_FUNCTION_R4, FULL_SRC_RESOLUTION | LF_D_XOR_S); + gpx_viper_write(ss, LU_FUNCTION_R4, FULL_SRC_RESOLUTION | LF_NOT_D); } /* Clear the whole screen. Straight from qdss. */ @@ -990,6 +990,7 @@ gpx_copyrect(struct gpx_screen *ss, ss->ss_adder->error_1 = 0; ss->ss_adder->error_2 = 0; ss->ss_adder->rasterop_mode = DST_WRITE_ENABLE | NORMAL; + gpx_wait(ss, RASTEROP_COMPLETE); ss->ss_adder->destination_x = dx; ss->ss_adder->fast_dest_dx = w; ss->ss_adder->destination_y = dy; @@ -1015,9 +1016,8 @@ gpx_fillrect(struct gpx_screen *ss, int x, int y, int dx, int dy, long attr, while (gpx_viper_write(ss, CS_UPDATE_MASK, 0x00ff)); gpx_viper_write(ss, MASK_1, 0xffff); gpx_viper_write(ss, SOURCE, 0xffff); - /* the swap of bg and fg is intentional */ - gpx_viper_write(ss, VIPER_Z_LOAD | FOREGROUND_COLOR_Z, bg); - gpx_viper_write(ss, VIPER_Z_LOAD | BACKGROUND_COLOR_Z, fg); + gpx_viper_write(ss, VIPER_Z_LOAD | FOREGROUND_COLOR_Z, fg); + gpx_viper_write(ss, VIPER_Z_LOAD | BACKGROUND_COLOR_Z, bg); gpx_viper_write(ss, SRC1_OCR_B, EXT_NONE | INT_SOURCE | ID | BAR_SHIFT_DELAY); gpx_viper_write(ss, DST_OCR_B, @@ -1028,6 +1028,7 @@ gpx_fillrect(struct gpx_screen *ss, int x, int y, int dx, int dy, long attr, ss->ss_adder->error_1 = 0; ss->ss_adder->error_2 = 0; ss->ss_adder->rasterop_mode = DST_WRITE_ENABLE | NORMAL; + gpx_wait(ss, RASTEROP_COMPLETE); ss->ss_adder->destination_x = x; ss->ss_adder->fast_dest_dx = dx; ss->ss_adder->destination_y = y; |