summaryrefslogtreecommitdiff
path: root/sys/arch/hp300/dev/topcat.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/arch/hp300/dev/topcat.c')
-rw-r--r--sys/arch/hp300/dev/topcat.c19
1 files changed, 14 insertions, 5 deletions
diff --git a/sys/arch/hp300/dev/topcat.c b/sys/arch/hp300/dev/topcat.c
index 8ad9c6a8425..051c990ea47 100644
--- a/sys/arch/hp300/dev/topcat.c
+++ b/sys/arch/hp300/dev/topcat.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: topcat.c,v 1.14 2005/12/31 18:13:41 miod Exp $ */
+/* $OpenBSD: topcat.c,v 1.15 2006/08/11 18:33:13 miod Exp $ */
/*
* Copyright (c) 2005, Miodrag Vallat.
@@ -122,8 +122,8 @@ int topcat_reset(struct diofb *, int, struct diofbreg *);
void topcat_restore(struct diofb *);
int topcat_setcmap(struct diofb *, struct wsdisplay_cmap *);
void topcat_setcolor(struct diofb *, u_int);
-void topcat_windowmove(struct diofb *, u_int16_t, u_int16_t,
- u_int16_t, u_int16_t, u_int16_t, u_int16_t, int);
+int topcat_windowmove(struct diofb *, u_int16_t, u_int16_t, u_int16_t,
+ u_int16_t, u_int16_t, u_int16_t, int16_t, int16_t);
int topcat_ioctl(void *, u_long, caddr_t, int, struct proc *);
void topcat_burner(void *, u_int, u_int);
@@ -475,15 +475,22 @@ topcat_setcmap(struct diofb *fb, struct wsdisplay_cmap *cm)
* Accelerated routines
*/
-void
+int
topcat_windowmove(struct diofb *fb, u_int16_t sx, u_int16_t sy,
- u_int16_t dx, u_int16_t dy, u_int16_t cx, u_int16_t cy, int rop)
+ u_int16_t dx, u_int16_t dy, u_int16_t cx, u_int16_t cy, int16_t rop,
+ int16_t planemask)
{
volatile struct tcboxfb *tc = (struct tcboxfb *)fb->regkva;
tc_waitbusy(tc, fb->planemask);
+ tc->wen = planemask;
tc->wmrr = rop;
+ if (planemask != 0xff) {
+ tc->wen = planemask ^ 0xff;
+ tc->wmrr = rop ^ 0x0f;
+ tc->wen = fb->planemask;
+ }
tc->source_y = sy;
tc->source_x = sx;
tc->dest_y = dy;
@@ -493,6 +500,8 @@ topcat_windowmove(struct diofb *fb, u_int16_t sx, u_int16_t sy,
tc->wmove = fb->planemask;
tc_waitbusy(tc, fb->planemask);
+
+ return (0);
}
/*