summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorMiod Vallat <miod@cvs.openbsd.org>2006-02-12 13:18:10 +0000
committerMiod Vallat <miod@cvs.openbsd.org>2006-02-12 13:18:10 +0000
commitff7abe471d42e04f3712ef5bce9d0ba4bfe62b2f (patch)
tree202373260bcfa0c4a1fb71005c5a88f5a157628a /sys
parente677d92674d1ff3dd7f92bd2b035994053bc6d56 (diff)
Disable sync when blanking if display.vblank is set to off.
Diffstat (limited to 'sys')
-rw-r--r--sys/arch/sparc/dev/tvtwo.c18
-rw-r--r--sys/dev/sbus/tvtwo.c18
2 files changed, 24 insertions, 12 deletions
diff --git a/sys/arch/sparc/dev/tvtwo.c b/sys/arch/sparc/dev/tvtwo.c
index a46eb9c44cb..4b8cffa8aef 100644
--- a/sys/arch/sparc/dev/tvtwo.c
+++ b/sys/arch/sparc/dev/tvtwo.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: tvtwo.c,v 1.10 2006/02/12 12:02:29 miod Exp $ */
+/* $OpenBSD: tvtwo.c,v 1.11 2006/02/12 13:18:07 miod Exp $ */
/*
* Copyright (c) 2003, 2006, Miodrag Vallat.
* All rights reserved.
@@ -107,6 +107,7 @@
#define PX_REG_DISPKLUDGE 0x00b8 /* write only */
#define DISPKLUDGE_DEFAULT 0xc41f
#define DISPKLUDGE_BLANK (1 << 12)
+#define DISPKLUDGE_SYNC (1 << 13)
#define PX_REG_BT463_RED 0x0480
#define PX_REG_BT463_GREEN 0x0490
@@ -344,13 +345,18 @@ void
tvtwo_burner(void *v, u_int on, u_int flags)
{
struct tvtwo_softc *sc = v;
- volatile u_int32_t *dispkludge =
- (u_int32_t *)(sc->sc_regs + PX_REG_DISPKLUDGE);
+ u_int32_t dispkludge;
if (on)
- *dispkludge = DISPKLUDGE_DEFAULT & ~DISPKLUDGE_BLANK;
- else
- *dispkludge = DISPKLUDGE_DEFAULT | DISPKLUDGE_BLANK;
+ dispkludge = DISPKLUDGE_DEFAULT & ~DISPKLUDGE_BLANK;
+ else {
+ dispkludge = DISPKLUDGE_DEFAULT | DISPKLUDGE_BLANK;
+ if (flags & WSDISPLAY_BURN_VBLANK)
+ dispkludge |= DISPKLUDGE_SYNC;
+ }
+
+ *(volatile u_int32_t *)(sc->sc_regs + PX_REG_DISPKLUDGE) =
+ dispkludge;
}
void
diff --git a/sys/dev/sbus/tvtwo.c b/sys/dev/sbus/tvtwo.c
index 3f0b687a261..5184999be56 100644
--- a/sys/dev/sbus/tvtwo.c
+++ b/sys/dev/sbus/tvtwo.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: tvtwo.c,v 1.7 2006/02/12 12:02:29 miod Exp $ */
+/* $OpenBSD: tvtwo.c,v 1.8 2006/02/12 13:18:09 miod Exp $ */
/*
* Copyright (c) 2003, 2006, Miodrag Vallat.
* All rights reserved.
@@ -108,6 +108,7 @@
#define PX_REG_DISPKLUDGE 0x00b8 /* write only */
#define DISPKLUDGE_DEFAULT 0xc41f
#define DISPKLUDGE_BLANK (1 << 12)
+#define DISPKLUDGE_SYNC (1 << 13)
#define PX_REG_BT463_RED 0x0480
#define PX_REG_BT463_GREEN 0x0490
@@ -410,13 +411,18 @@ void
tvtwo_burner(void *v, u_int on, u_int flags)
{
struct tvtwo_softc *sc = v;
- volatile u_int32_t *dispkludge =
- (u_int32_t *)(sc->sc_regs + PX_REG_DISPKLUDGE);
+ u_int32_t dispkludge;
if (on)
- *dispkludge = DISPKLUDGE_DEFAULT & ~DISPKLUDGE_BLANK;
- else
- *dispkludge = DISPKLUDGE_DEFAULT | DISPKLUDGE_BLANK;
+ dispkludge = DISPKLUDGE_DEFAULT & ~DISPKLUDGE_BLANK;
+ else {
+ dispkludge = DISPKLUDGE_DEFAULT | DISPKLUDGE_BLANK;
+ if (flags & WSDISPLAY_BURN_VBLANK)
+ dispkludge |= DISPKLUDGE_SYNC;
+ }
+
+ *(volatile u_int32_t *)(sc->sc_regs + PX_REG_DISPKLUDGE) =
+ dispkludge;
}
void