Subject: port-amiga/1810: A2410 GRIFIOCBLANK support
To: None <gnats-bugs@gnats.netbsd.org>
From: Ignatios Souvatzis <is@beverly.rhein.de>
List: netbsd-bugs
Date: 12/05/1995 11:40:15
>Number: 1810
>Category: port-amiga
>Synopsis: A2410 GRFIOCBLANK support
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: gnats-admin (GNATS administrator)
>State: open
>Class: change-request
>Submitter-Id: net
>Arrival-Date: Tue Dec 5 07:50:01 1995
>Last-Modified:
>Originator: Ignatios Souvatzis
>Organization:
Me, myself, and I
>Release: 1.1
>Environment:
System: NetBSD beverly.rhein.de 1.1 NetBSD 1.1 (INSTALL) #0: Fri Nov 24 13:47:14 EST 1995 chopps@coffee.emich.edu:/exp/src/sys/arch/amiga/compile/INSTALL amiga
>Description:
Shortly before the -1.1 feature freeze, the GRFIOCBLANK ioctl was introduced.
This patch contains the A2410 driver support for it.
>How-To-Repeat:
>Fix:
--- /usr/local/NetBSD-1.1/source/usr/src/sys/arch/amiga/dev/grf_ul.c Sat Nov 11 12:31:39 1995
+++ grf_ul.c Fri Oct 27 10:09:06 1995
@@ -59,6 +59,7 @@
int ul_getcmap __P((struct grf_softc *, struct grf_colormap *, dev_t));
int ul_putcmap __P((struct grf_softc *, struct grf_colormap *, dev_t));
int ul_bitblt __P((struct grf_softc *, struct grf_bitblt *, dev_t));
+int ul_blank __P((struct grf_softc *, int *, dev_t));
/*
* marked true early so that ulowell_cnprobe() can tell if we are alive.
@@ -721,6 +722,9 @@
case GRFIOCBITBLT:
return ul_bitblt (gp, (struct grf_bitblt *) data, dev);
+
+ case GRFIOCBLANK:
+ return ul_blank (gp, (int *) data, dev);
}
return EINVAL;
@@ -840,6 +844,24 @@
return 0;
}
+int
+ul_blank(gp, onoff, dev)
+ struct grf_softc *gp;
+ int *onoff;
+ dev_t dev;
+{
+ struct gspregs *gsp;
+ gsp = (struct gspregs *)gp->g_regkva;
+ gsp->ctrl = (gsp->ctrl & ~(INCR|INCW) | LBL);
+ gsp->hstadrh = 0xC000;
+ gsp->hstadrl = 0x0080;
+ if (*onoff)
+ gsp->data |= 0x9000;
+ else
+ gsp->data &= ~0x9000;
+
+ return 0;
+}
/*
* !!! THIS AREA UNDER CONSTRUCTION !!!
*/
>Audit-Trail:
>Unformatted: