From 9785bf052607612bc0e08f72a390d36386c332ea Mon Sep 17 00:00:00 2001 From: sato Date: Sat, 30 Dec 2000 01:41:51 +0000 Subject: [PATCH] notify console polling mode or not to lower level framebuffer driver. notify EMUL mode or not to lower level framebuffer driver. these may use framebuffer level hardware acceleration/software optimization. --- sys/dev/wscons/wsdisplay.c | 14 ++++++++++++-- sys/dev/wscons/wsdisplayvar.h | 3 ++- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/sys/dev/wscons/wsdisplay.c b/sys/dev/wscons/wsdisplay.c index b5d2624aa727..dccfb1ae4264 100644 --- a/sys/dev/wscons/wsdisplay.c +++ b/sys/dev/wscons/wsdisplay.c @@ -1,4 +1,4 @@ -/* $NetBSD: wsdisplay.c,v 1.43 2000/12/04 13:22:17 ad Exp $ */ +/* $NetBSD: wsdisplay.c,v 1.44 2000/12/30 01:41:51 sato Exp $ */ /* * Copyright (c) 1996, 1997 Christopher G. Demetriou. All rights reserved. @@ -31,7 +31,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: wsdisplay.c,v 1.43 2000/12/04 13:22:17 ad Exp $"); +__KERNEL_RCSID(0, "$NetBSD: wsdisplay.c,v 1.44 2000/12/30 01:41:51 sato Exp $"); #include #include @@ -988,6 +988,10 @@ wsdisplay_internal_ioctl(sc, scr, cmd, data, flag, p) scr->scr_flags |= SCR_GRAPHICS; } else if (d == WSDISPLAYIO_MODE_EMUL) return (EINVAL); + + (void)(*sc->sc_accessops->ioctl)(sc->sc_accesscookie, cmd, data, + flag, p); + return (0); #undef d @@ -1783,9 +1787,15 @@ wsdisplay_pollc(dev, on) dev_t dev; int on; { + struct wsdisplay_softc *sc = (struct wsdisplay_softc *)dev; wsdisplay_cons_pollmode = on; + /* notify to fb drivers */ + if (sc->sc_accessops->pollc != NULL) + (*sc->sc_accessops->pollc)(sc->sc_accesscookie, on); + + /* notify to kbd drivers */ if (wsdisplay_cons_kbd_pollc) (*wsdisplay_cons_kbd_pollc)(dev, on); } diff --git a/sys/dev/wscons/wsdisplayvar.h b/sys/dev/wscons/wsdisplayvar.h index b78261331666..42bdf87070de 100644 --- a/sys/dev/wscons/wsdisplayvar.h +++ b/sys/dev/wscons/wsdisplayvar.h @@ -1,4 +1,4 @@ -/* $NetBSD: wsdisplayvar.h,v 1.17 2000/09/10 11:44:13 lukem Exp $ */ +/* $NetBSD: wsdisplayvar.h,v 1.18 2000/12/30 01:41:52 sato Exp $ */ /* * Copyright (c) 1996, 1997 Christopher G. Demetriou. All rights reserved. @@ -110,6 +110,7 @@ struct wsdisplay_accessops { int (*show_screen) __P((void *, void *, int, void (*) (void *, int, int), void *)); int (*load_font) __P((void *, void *, struct wsdisplay_font *)); + void (*pollc) __P((void *, int)); }; /*