#define GRFIOCBLANK_LIVE and GRFIOCBLANK_DARK in grfioctl.h to make absolutely
clear which switches the video signal on and which off. Make all grf_??.c (which supported it) use the same polarity of the test. While being here, use a > test instead of implicit != to make it extensible to darker than dark values for power managment systems.
This commit is contained in:
parent
6b52790dd2
commit
7aaddee417
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: grf_cl.c,v 1.11 1996/05/19 21:05:20 veego Exp $ */
|
||||
/* $NetBSD: grf_cl.c,v 1.12 1996/06/03 18:55:10 is Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1995 Ezra Story
|
||||
|
@ -542,7 +542,7 @@ cl_blank(gp, on)
|
|||
struct grf_softc *gp;
|
||||
int *on;
|
||||
{
|
||||
WSeq(gp->g_regkva, SEQ_ID_CLOCKING_MODE, *on ? 0x21 : 0x01);
|
||||
WSeq(gp->g_regkva, SEQ_ID_CLOCKING_MODE, *on > 0 ? 0x01 : 0x21);
|
||||
return(0);
|
||||
}
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: grf_cv.c,v 1.14 1996/05/19 21:05:27 veego Exp $ */
|
||||
/* $NetBSD: grf_cv.c,v 1.15 1996/06/03 18:55:14 is Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1995 Michael Teske
|
||||
|
@ -783,7 +783,7 @@ cv_blank(gp, on)
|
|||
volatile caddr_t ba;
|
||||
|
||||
ba = gp->g_regkva;
|
||||
gfx_on_off(*on ? 0 : 1, ba);
|
||||
gfx_on_off(*on > 0 ? 0 : 1, ba);
|
||||
return (0);
|
||||
}
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: grf_et.c,v 1.1 1996/05/19 21:05:32 veego Exp $ */
|
||||
/* $NetBSD: grf_et.c,v 1.2 1996/06/03 18:55:12 is Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1996 Tobias Abt
|
||||
|
@ -627,7 +627,7 @@ et_blank(gp, on)
|
|||
struct grf_softc *gp;
|
||||
int *on;
|
||||
{
|
||||
WSeq(gp->g_regkva, SEQ_ID_CLOCKING_MODE, *on ? 0x21 : 0x01);
|
||||
WSeq(gp->g_regkva, SEQ_ID_CLOCKING_MODE, *on > 0 ? 0x01 : 0x21);
|
||||
return(0);
|
||||
}
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: grf_rh.c,v 1.19 1996/05/24 19:59:33 is Exp $ */
|
||||
/* $NetBSD: grf_rh.c,v 1.20 1996/06/03 18:55:19 is Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1994 Markus Wild
|
||||
|
@ -2062,7 +2062,7 @@ rh_blank(gp, on)
|
|||
|
||||
r = 0x01 | ((md->FLG & MDF_CLKDIV2)/ MDF_CLKDIV2 * 8);
|
||||
|
||||
WSeq(gp->g_regkva, SEQ_ID_CLOCKING_MODE, *on ? r : 0x21);
|
||||
WSeq(gp->g_regkva, SEQ_ID_CLOCKING_MODE, *on > 0 ? r : 0x21);
|
||||
|
||||
return(0);
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: grf_rt.c,v 1.29 1996/05/25 15:23:52 is Exp $ */
|
||||
/* $NetBSD: grf_rt.c,v 1.30 1996/06/03 18:55:18 is Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1993 Markus Wild
|
||||
|
@ -1464,7 +1464,7 @@ rt_blank(gp, on)
|
|||
|
||||
r = 0x01 | ((md->FLG & MDF_CLKDIV2)/ MDF_CLKDIV2 * 8);
|
||||
|
||||
WSeq(gp->g_regkva, SEQ_ID_CLOCKING_MODE, *on ? r : 0x21);
|
||||
WSeq(gp->g_regkva, SEQ_ID_CLOCKING_MODE, *on > 0 ? r : 0x21);
|
||||
|
||||
return(0);
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: grf_ul.c,v 1.17 1996/05/09 20:31:25 is Exp $ */
|
||||
/* $NetBSD: grf_ul.c,v 1.18 1996/06/03 18:55:16 is Exp $ */
|
||||
#define UL_DEBUG
|
||||
|
||||
/*
|
||||
|
@ -910,7 +910,7 @@ ul_blank(gp, onoff, dev)
|
|||
gsp->ctrl = (gsp->ctrl & ~(INCR | INCW)) | LBL;
|
||||
gsp->hstadrh = 0xC000;
|
||||
gsp->hstadrl = 0x0080;
|
||||
if (*onoff)
|
||||
if (*onoff > 0)
|
||||
gsp->data |= 0x9000;
|
||||
else
|
||||
gsp->data &= ~0x9000;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: grfioctl.h,v 1.11 1995/10/09 02:08:47 chopps Exp $ */
|
||||
/* $NetBSD: grfioctl.h,v 1.12 1996/06/03 18:55:08 is Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1988 University of Utah.
|
||||
|
@ -217,3 +217,6 @@ struct grf_bitblt {
|
|||
|
||||
/* can't use IOCON/OFF because that would turn ite on */
|
||||
#define GRFIOCBLANK _IOW('G', 58, int)
|
||||
|
||||
#define GRFIOCBLANK_LIVE 1
|
||||
#define GRFIOCBLANK_DARK 0
|
||||
|
|
Loading…
Reference in New Issue