Add a quick and dirty FBIOGVIDEO implementation. This is hardware independent,

by saving the last written FIOSVIDEO/GRFIOCBLANK value into a shadow variable
in the grf_softc and returning this value on FBIOGVIDEO.
The presence of this ioctl is needed by screenblank(8) nowadays.
Original problem reported by Lars Hecking on the port-amiga mailing list.
This commit is contained in:
is 1999-08-16 19:55:27 +00:00
parent 14cc7c79c1
commit f0e0b02d7c
2 changed files with 12 additions and 4 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: grf.c,v 1.33 1998/01/12 10:39:29 thorpej Exp $ */
/* $NetBSD: grf.c,v 1.34 1999/08/16 19:55:27 is Exp $ */
/*
* Copyright (c) 1988 University of Utah.
@ -268,7 +268,6 @@ grfioctl(dev, cmd, data, flag, p)
case GRFIOCGSPRITEMAX:
case GRFIOCBITBLT:
case GRFIOCSETMON:
case GRFIOCBLANK: /* blank ioctl, IOCON/OFF will turn ite on */
case GRFTOGGLE: /* Toggles between Cirrus boards and native ECS on
Amiga. 15/11/94 ill */
/*
@ -277,8 +276,16 @@ grfioctl(dev, cmd, data, flag, p)
*/
return(gp->g_mode(gp, GM_GRFIOCTL, data, cmd, dev));
case GRFIOCBLANK: /* blank ioctl, IOCON/OFF will turn ite on */
case FBIOSVIDEO:
return(gp->g_mode(gp, GM_GRFIOCTL, data, GRFIOCBLANK, dev));
error = gp->g_mode(gp, GM_GRFIOCTL, data, GRFIOCBLANK, dev);
if (!error)
gp->g_blank = *(int *)data;
return (error);
case FBIOGVIDEO:
*(int *)data = gp->g_blank;
return (0);
default:
#if NVIEW > 0

View File

@ -1,4 +1,4 @@
/* $NetBSD: grfvar.h,v 1.15 1997/10/19 19:08:00 veego Exp $ */
/* $NetBSD: grfvar.h,v 1.16 1999/08/16 19:55:27 is Exp $ */
/*
* Copyright (c) 1988 University of Utah.
@ -68,6 +68,7 @@ struct grf_softc {
void (*g_iteputc) __P((struct ite_softc *,int,int,int,int));
void (*g_itecursor) __P((struct ite_softc *,int));
void (*g_itescroll) __P((struct ite_softc *,int,int,int,int));
int g_blank; /* shadow copy of blank value */
};
/* flags */