diff options
author | Miod Vallat <miod@cvs.openbsd.org> | 2006-02-12 13:18:10 +0000 |
---|---|---|
committer | Miod Vallat <miod@cvs.openbsd.org> | 2006-02-12 13:18:10 +0000 |
commit | ff7abe471d42e04f3712ef5bce9d0ba4bfe62b2f (patch) | |
tree | 202373260bcfa0c4a1fb71005c5a88f5a157628a /sys/arch | |
parent | e677d92674d1ff3dd7f92bd2b035994053bc6d56 (diff) |
Disable sync when blanking if display.vblank is set to off.
Diffstat (limited to 'sys/arch')
-rw-r--r-- | sys/arch/sparc/dev/tvtwo.c | 18 |
1 files changed, 12 insertions, 6 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 |