Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys Add enable/disable polling hooks to genfb_ops.
details: https://anonhg.NetBSD.org/src/rev/0dd625b44a86
branches: trunk
changeset: 330879:0dd625b44a86
user: riastradh <riastradh%NetBSD.org@localhost>
date: Thu Jul 24 21:35:12 2014 +0000
description:
Add enable/disable polling hooks to genfb_ops.
diffstat:
sys/arch/arm/broadcom/bcm2835_genfb.c | 8 ++++----
sys/dev/pci/genfb_pci.c | 7 ++++---
sys/dev/sbus/genfb_sbus.c | 7 ++++---
sys/dev/wsfb/genfb.c | 8 ++++++--
sys/dev/wsfb/genfbvar.h | 4 +++-
5 files changed, 21 insertions(+), 13 deletions(-)
diffs (146 lines):
diff -r 85d527a02f83 -r 0dd625b44a86 sys/arch/arm/broadcom/bcm2835_genfb.c
--- a/sys/arch/arm/broadcom/bcm2835_genfb.c Thu Jul 24 21:28:44 2014 +0000
+++ b/sys/arch/arm/broadcom/bcm2835_genfb.c Thu Jul 24 21:35:12 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: bcm2835_genfb.c,v 1.5 2013/05/11 07:42:34 skrll Exp $ */
+/* $NetBSD: bcm2835_genfb.c,v 1.6 2014/07/24 21:35:12 riastradh Exp $ */
/*-
* Copyright (c) 2013 Jared D. McNeill <jmcneill%invisible.ca@localhost>
@@ -31,7 +31,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: bcm2835_genfb.c,v 1.5 2013/05/11 07:42:34 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: bcm2835_genfb.c,v 1.6 2014/07/24 21:35:12 riastradh Exp $");
#include <sys/param.h>
#include <sys/types.h>
@@ -82,7 +82,8 @@
struct bcmgenfb_softc *sc = device_private(self);
struct amba_attach_args *aaa = aux;
prop_dictionary_t dict = device_properties(self);
- struct genfb_ops ops;
+ static const struct genfb_ops zero_ops;
+ struct genfb_ops ops = zero_ops;
bool is_console = false;
int error;
@@ -113,7 +114,6 @@
}
sc->sc_gen.sc_fbaddr = bus_space_vaddr(sc->sc_iot, sc->sc_ioh);
- memset(&ops, 0, sizeof(ops));
ops.genfb_ioctl = bcmgenfb_ioctl;
ops.genfb_mmap = bcmgenfb_mmap;
diff -r 85d527a02f83 -r 0dd625b44a86 sys/dev/pci/genfb_pci.c
--- a/sys/dev/pci/genfb_pci.c Thu Jul 24 21:28:44 2014 +0000
+++ b/sys/dev/pci/genfb_pci.c Thu Jul 24 21:35:12 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: genfb_pci.c,v 1.36 2014/01/27 13:22:55 macallan Exp $ */
+/* $NetBSD: genfb_pci.c,v 1.37 2014/07/24 21:35:13 riastradh Exp $ */
/*-
* Copyright (c) 2007 Michael Lorenz
@@ -27,7 +27,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: genfb_pci.c,v 1.36 2014/01/27 13:22:55 macallan Exp $");
+__KERNEL_RCSID(0, "$NetBSD: genfb_pci.c,v 1.37 2014/07/24 21:35:13 riastradh Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -98,7 +98,8 @@
{
struct pci_genfb_softc *sc = device_private(self);
struct pci_attach_args *pa = aux;
- struct genfb_ops ops;
+ static const struct genfb_ops zero_ops;
+ struct genfb_ops ops = zero_ops;
pcireg_t rom;
int idx, bar, type;
diff -r 85d527a02f83 -r 0dd625b44a86 sys/dev/sbus/genfb_sbus.c
--- a/sys/dev/sbus/genfb_sbus.c Thu Jul 24 21:28:44 2014 +0000
+++ b/sys/dev/sbus/genfb_sbus.c Thu Jul 24 21:35:12 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: genfb_sbus.c,v 1.10 2010/10/07 07:53:54 macallan Exp $ */
+/* $NetBSD: genfb_sbus.c,v 1.11 2014/07/24 21:35:13 riastradh Exp $ */
/*-
* Copyright (c) 2007 Michael Lorenz
@@ -29,7 +29,7 @@
/* an SBus frontend for the generic fb console driver */
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: genfb_sbus.c,v 1.10 2010/10/07 07:53:54 macallan Exp $");
+__KERNEL_RCSID(0, "$NetBSD: genfb_sbus.c,v 1.11 2014/07/24 21:35:13 riastradh Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -91,7 +91,8 @@
{
struct genfb_sbus_softc *sc = device_private(self);
struct sbus_attach_args *sa = args;
- struct genfb_ops ops;
+ static const struct genfb_ops zero_ops;
+ struct genfb_ops ops = zero_ops;
prop_dictionary_t dict;
bus_space_handle_t bh;
paddr_t fbpa;
diff -r 85d527a02f83 -r 0dd625b44a86 sys/dev/wsfb/genfb.c
--- a/sys/dev/wsfb/genfb.c Thu Jul 24 21:28:44 2014 +0000
+++ b/sys/dev/wsfb/genfb.c Thu Jul 24 21:35:12 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: genfb.c,v 1.54 2014/07/22 15:42:59 riastradh Exp $ */
+/* $NetBSD: genfb.c,v 1.55 2014/07/24 21:35:13 riastradh Exp $ */
/*-
* Copyright (c) 2007 Michael Lorenz
@@ -27,7 +27,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: genfb.c,v 1.54 2014/07/22 15:42:59 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: genfb.c,v 1.55 2014/07/24 21:35:13 riastradh Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -779,6 +779,8 @@
SCREEN_ENABLE_DRAWING(&sc->sc_console_screen);
vcons_hard_switch(&sc->sc_console_screen);
vcons_enable_polling(&sc->vd);
+ if (sc->sc_ops.genfb_enable_polling)
+ (*sc->sc_ops.genfb_enable_polling)(sc);
}
}
@@ -788,6 +790,8 @@
struct genfb_softc *sc = device_private(dev);
if (sc->sc_console_screen.scr_vd) {
+ if (sc->sc_ops.genfb_disable_polling)
+ (*sc->sc_ops.genfb_disable_polling)(sc);
vcons_disable_polling(&sc->vd);
}
}
diff -r 85d527a02f83 -r 0dd625b44a86 sys/dev/wsfb/genfbvar.h
--- a/sys/dev/wsfb/genfbvar.h Thu Jul 24 21:28:44 2014 +0000
+++ b/sys/dev/wsfb/genfbvar.h Thu Jul 24 21:35:12 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: genfbvar.h,v 1.23 2014/07/23 16:56:49 riastradh Exp $ */
+/* $NetBSD: genfbvar.h,v 1.24 2014/07/24 21:35:13 riastradh Exp $ */
/*-
* Copyright (c) 2007 Michael Lorenz
@@ -60,6 +60,8 @@
int (*genfb_ioctl)(void *, void *, u_long, void *, int, struct lwp *);
paddr_t (*genfb_mmap)(void *, void *, off_t, int);
int (*genfb_borrow)(void *, bus_addr_t, bus_space_handle_t *);
+ int (*genfb_enable_polling)(void *);
+ int (*genfb_disable_polling)(void *);
};
struct genfb_colormap_callback {
Home |
Main Index |
Thread Index |
Old Index