diff options
Diffstat (limited to 'sys/arch')
-rw-r--r-- | sys/arch/sgi/dev/gbe.c | 6 | ||||
-rw-r--r-- | sys/arch/sgi/dev/gbereg.h | 4 | ||||
-rw-r--r-- | sys/arch/sgi/dev/gl.h | 39 | ||||
-rw-r--r-- | sys/arch/sgi/xbow/impact.c | 11 | ||||
-rw-r--r-- | sys/arch/sgi/xbow/impactreg.h | 23 | ||||
-rw-r--r-- | sys/arch/sgi/xbow/odyssey.c | 11 | ||||
-rw-r--r-- | sys/arch/sgi/xbow/odysseyreg.h | 21 |
7 files changed, 57 insertions, 58 deletions
diff --git a/sys/arch/sgi/dev/gbe.c b/sys/arch/sgi/dev/gbe.c index ba51267e4c0..508e879633e 100644 --- a/sys/arch/sgi/dev/gbe.c +++ b/sys/arch/sgi/dev/gbe.c @@ -1,4 +1,4 @@ -/* $OpenBSD: gbe.c,v 1.14 2012/03/15 18:57:22 miod Exp $ */ +/* $OpenBSD: gbe.c,v 1.15 2012/04/16 22:17:13 miod Exp $ */ /* * Copyright (c) 2007, 2008, 2009 Joel Sing <jsing@openbsd.org> @@ -33,6 +33,7 @@ #include <mips64/arcbios.h> #include <mips64/archtype.h> +#include <sgi/dev/gl.h> #include <sgi/localbus/crimebus.h> #include <sgi/localbus/macebusvar.h> @@ -1050,7 +1051,6 @@ gbe_loadcmap(struct gbe_screen *screen, u_int start, u_int end) void gbe_rop(struct gbe_softc *gsc, int x, int y, int w, int h, int op) { - gbe_wait_re_idle(gsc); bus_space_write_4(gsc->iot, gsc->re_ioh, RE_PP_PRIMITIVE, @@ -1156,7 +1156,7 @@ gbe_do_cursor(struct rasops_info *ri) x = ri->ri_xorigin + ri->ri_ccol * w; y = ri->ri_yorigin + ri->ri_crow * h; - gbe_rop(sc, x, y, w, h, LOGIC_OP_XOR); + gbe_rop(sc, x, y, w, h, OPENGL_LOGIC_OP_COPY_INVERTED); return 0; } diff --git a/sys/arch/sgi/dev/gbereg.h b/sys/arch/sgi/dev/gbereg.h index ef8ff324115..5f20f704d7c 100644 --- a/sys/arch/sgi/dev/gbereg.h +++ b/sys/arch/sgi/dev/gbereg.h @@ -1,4 +1,4 @@ -/* $OpenBSD: gbereg.h,v 1.4 2009/02/24 14:37:29 jsing Exp $ */ +/* $OpenBSD: gbereg.h,v 1.5 2012/04/16 22:17:13 miod Exp $ */ /* * Copyright (c) 2007, Joel Sing <jsing@openbsd.org> @@ -165,8 +165,6 @@ #define RE_PP_SHADE_FG_COLOUR 0x000020d0 #define RE_PP_SHADE_BG_COLOUR 0x000020d8 #define RE_PP_LOGIC_OP 0x000021b0 /* Logic operation. */ -#define LOGIC_OP_NONE 0x00 -#define LOGIC_OP_XOR 0x0c #define RE_PP_COLOUR_MASK 0x000021b8 /* Colour buffer plane mask. */ #define COLOUR_MASK_NONE 0xffffffff #define RE_PP_NULL 0x000021f0 diff --git a/sys/arch/sgi/dev/gl.h b/sys/arch/sgi/dev/gl.h new file mode 100644 index 00000000000..9cbf88cc12b --- /dev/null +++ b/sys/arch/sgi/dev/gl.h @@ -0,0 +1,39 @@ +/* $OpenBSD: gl.h,v 1.1 2012/04/16 22:17:13 miod Exp $ */ +/* + * Copyright (c) 2009, 2010 Joel Sing <jsing@openbsd.org> + * + * Permission to use, copy, modify, and distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + */ + +/* + * OpenGL defines + */ + +/* Logic Operations. */ +#define OPENGL_LOGIC_OP_CLEAR 0 +#define OPENGL_LOGIC_OP_AND 1 +#define OPENGL_LOGIC_OP_AND_REVERSE 2 +#define OPENGL_LOGIC_OP_COPY 3 +#define OPENGL_LOGIC_OP_AND_INVERTED 4 +#define OPENGL_LOGIC_OP_NOOP 5 +#define OPENGL_LOGIC_OP_XOR 6 +#define OPENGL_LOGIC_OP_OR 7 +#define OPENGL_LOGIC_OP_NOR 8 +#define OPENGL_LOGIC_OP_EQUIV 9 +#define OPENGL_LOGIC_OP_INVERT 10 +#define OPENGL_LOGIC_OP_OR_REVERSE 11 +#define OPENGL_LOGIC_OP_COPY_INVERTED 12 +#define OPENGL_LOGIC_OP_OR_INVERTED 13 +#define OPENGL_LOGIC_OP_NAND 14 +#define OPENGL_LOGIC_OP_SET 15 + diff --git a/sys/arch/sgi/xbow/impact.c b/sys/arch/sgi/xbow/impact.c index a6ac28908da..1bd7fe38f04 100644 --- a/sys/arch/sgi/xbow/impact.c +++ b/sys/arch/sgi/xbow/impact.c @@ -1,4 +1,4 @@ -/* $OpenBSD: impact.c,v 1.6 2010/04/06 19:12:34 miod Exp $ */ +/* $OpenBSD: impact.c,v 1.7 2012/04/16 22:17:16 miod Exp $ */ /* * Copyright (c) 2010 Miodrag Vallat. @@ -24,7 +24,7 @@ /* * The details regarding the design and operation of this hardware, along with * the necessary magic numbers, are only available thanks to the reverse - * engineering work undertaken by Stanislaw Skowronek <skylark@linux-mips.org>. + * engineering work undertaken by Stanislaw Skowronek <skylark@linux-mips.org>. */ /* @@ -53,6 +53,7 @@ #include <mips64/arcbios.h> +#include <sgi/dev/gl.h> #include <sgi/xbow/impactreg.h> #include <sgi/xbow/impactvar.h> #include <sgi/xbow/widget.h> @@ -125,7 +126,7 @@ int impact_erasecols(void *, int, int, int, long); int impact_copyrows(void *, int, int, int); int impact_eraserows(void *, int, int, long); -/* +/* * Interfaces for wscons. */ int impact_ioctl(void *, u_long, caddr_t, int, struct proc *); @@ -367,7 +368,7 @@ impact_cmd_fifo_wait(struct impact_screen *scr) } val = bus_space_read_4(scr->iot, scr->ioh, IMPACTSR_FIFOSTATUS); } - + return 0; } @@ -517,7 +518,7 @@ impact_putchar(void *cookie, int row, int col, u_int uc, long attr) cell = scr->bs + row * ri->ri_cols + col; cell->uc = uc; cell->attr = attr; - + w = font->fontwidth; h = font->fontheight; x = ri->ri_xorigin + col * w; diff --git a/sys/arch/sgi/xbow/impactreg.h b/sys/arch/sgi/xbow/impactreg.h index ad9cb4df0dd..199bbe7305f 100644 --- a/sys/arch/sgi/xbow/impactreg.h +++ b/sys/arch/sgi/xbow/impactreg.h @@ -1,4 +1,4 @@ -/* $OpenBSD: impactreg.h,v 1.1 2010/03/07 21:26:24 miod Exp $ */ +/* $OpenBSD: impactreg.h,v 1.2 2012/04/16 22:17:16 miod Exp $ */ /* * Copyright (c) 2010 Miodrag Vallat. * Copyright (c) 2009, 2010 Joel Sing <jsing@openbsd.org> @@ -95,24 +95,3 @@ #define IMPACTSR_YXCOORDS(x,y) (((y) << 16) | (x)) #define IMPACTSR_PP1FILLMODE(mode,op) ((mode) | ((op) << 26)) - -/* - * Logic Operations - */ - -#define OPENGL_LOGIC_OP_CLEAR 0 -#define OPENGL_LOGIC_OP_AND 1 -#define OPENGL_LOGIC_OP_AND_REVERSE 2 -#define OPENGL_LOGIC_OP_COPY 3 -#define OPENGL_LOGIC_OP_AND_INVERTED 4 -#define OPENGL_LOGIC_OP_NOOP 5 -#define OPENGL_LOGIC_OP_XOR 6 -#define OPENGL_LOGIC_OP_OR 7 -#define OPENGL_LOGIC_OP_NOR 8 -#define OPENGL_LOGIC_OP_EQUIV 9 -#define OPENGL_LOGIC_OP_INVERT 10 -#define OPENGL_LOGIC_OP_OR_REVERSE 11 -#define OPENGL_LOGIC_OP_COPY_INVERTED 12 -#define OPENGL_LOGIC_OP_OR_INVERTED 13 -#define OPENGL_LOGIC_OP_NAND 14 -#define OPENGL_LOGIC_OP_SET 15 diff --git a/sys/arch/sgi/xbow/odyssey.c b/sys/arch/sgi/xbow/odyssey.c index 36abd2c9cfe..a47ac3d715b 100644 --- a/sys/arch/sgi/xbow/odyssey.c +++ b/sys/arch/sgi/xbow/odyssey.c @@ -1,4 +1,4 @@ -/* $OpenBSD: odyssey.c,v 1.6 2010/04/07 18:16:03 miod Exp $ */ +/* $OpenBSD: odyssey.c,v 1.7 2012/04/16 22:17:16 miod Exp $ */ /* * Copyright (c) 2009, 2010 Joel Sing <jsing@openbsd.org> * @@ -22,7 +22,7 @@ /* * The details regarding the design and operation of this hardware, along with * the necessary magic numbers, are only available thanks to the reverse - * engineering work undertaken by Stanislaw Skowronek <skylark@linux-mips.org>. + * engineering work undertaken by Stanislaw Skowronek <skylark@linux-mips.org>. */ #include <sys/param.h> @@ -36,6 +36,7 @@ #include <mips64/arcbios.h> +#include <sgi/dev/gl.h> #include <sgi/xbow/odysseyreg.h> #include <sgi/xbow/odysseyvar.h> #include <sgi/xbow/widget.h> @@ -118,7 +119,7 @@ int odyssey_eraserows(void *, int, int, long); u_int32_t ieee754_sp(int32_t); -/* +/* * Interfaces for wscons. */ int odyssey_ioctl(void *, u_long, caddr_t, int, struct proc *); @@ -896,7 +897,7 @@ odyssey_putchar(void *cookie, int row, int col, u_int uc, long attr) (l << 10))); } - + if (font->fontwidth > 8) ci = (chunk & (1 << (16 - j)) ? fg : bg); else @@ -904,7 +905,7 @@ odyssey_putchar(void *cookie, int row, int col, u_int uc, long attr) bus_space_write_4(sc->iot, sc->ioh, ODYSSEY_CMD_FIFO, ri->ri_devcmap[ci]); - + l--; } } diff --git a/sys/arch/sgi/xbow/odysseyreg.h b/sys/arch/sgi/xbow/odysseyreg.h index 5464cb2efaf..9bc36378366 100644 --- a/sys/arch/sgi/xbow/odysseyreg.h +++ b/sys/arch/sgi/xbow/odysseyreg.h @@ -1,4 +1,4 @@ -/* $OpenBSD: odysseyreg.h,v 1.1 2010/03/04 14:50:35 jsing Exp $ */ +/* $OpenBSD: odysseyreg.h,v 1.2 2012/04/16 22:17:16 miod Exp $ */ /* * Copyright (c) 2009, 2010 Joel Sing <jsing@openbsd.org> * @@ -41,22 +41,3 @@ #define OPENGL_COLOR_3UB 0xc580cc08 #define OPENGL_QUADS 0x00000007 - -/* Logic Operations. */ -#define OPENGL_LOGIC_OP_CLEAR 0 -#define OPENGL_LOGIC_OP_AND 1 -#define OPENGL_LOGIC_OP_AND_REVERSE 2 -#define OPENGL_LOGIC_OP_COPY 3 -#define OPENGL_LOGIC_OP_AND_INVERTED 4 -#define OPENGL_LOGIC_OP_NOOP 5 -#define OPENGL_LOGIC_OP_XOR 6 -#define OPENGL_LOGIC_OP_OR 7 -#define OPENGL_LOGIC_OP_NOR 8 -#define OPENGL_LOGIC_OP_EQUIV 9 -#define OPENGL_LOGIC_OP_INVERT 10 -#define OPENGL_LOGIC_OP_OR_REVERSE 11 -#define OPENGL_LOGIC_OP_COPY_INVERTED 12 -#define OPENGL_LOGIC_OP_OR_INVERTED 13 -#define OPENGL_LOGIC_OP_NAND 14 -#define OPENGL_LOGIC_OP_SET 15 - |