Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/external/bsd/drm2/i915drm add a pmf shutdown handler to ...



details:   https://anonhg.NetBSD.org/src/rev/e9283485a422
branches:  trunk
changeset: 331300:e9283485a422
user:      jmcneill <jmcneill%NetBSD.org@localhost>
date:      Fri Aug 08 02:27:40 2014 +0000

description:
add a pmf shutdown handler to switch genfb into polling mode

diffstat:

 sys/external/bsd/drm2/i915drm/intelfb.c |  15 +++++++++++++--
 1 files changed, 13 insertions(+), 2 deletions(-)

diffs (50 lines):

diff -r c03e7e6e1eee -r e9283485a422 sys/external/bsd/drm2/i915drm/intelfb.c
--- a/sys/external/bsd/drm2/i915drm/intelfb.c   Thu Aug 07 22:10:05 2014 +0000
+++ b/sys/external/bsd/drm2/i915drm/intelfb.c   Fri Aug 08 02:27:40 2014 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: intelfb.c,v 1.7 2014/08/06 22:16:38 jmcneill Exp $     */
+/*     $NetBSD: intelfb.c,v 1.8 2014/08/08 02:27:40 jmcneill Exp $     */
 
 /*-
  * Copyright (c) 2014 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: intelfb.c,v 1.7 2014/08/06 22:16:38 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: intelfb.c,v 1.8 2014/08/08 02:27:40 jmcneill Exp $");
 
 #ifdef _KERNEL_OPT
 #include "vga.h"
@@ -90,6 +90,7 @@
 static paddr_t intelfb_genfb_mmap(void *, void *, off_t, int);
 static int     intelfb_genfb_enable_polling(void *);
 static int     intelfb_genfb_disable_polling(void *);
+static bool    intelfb_genfb_shutdown(device_t, int);
 static bool    intelfb_genfb_setmode(struct genfb_softc *, int);
 
 static const struct genfb_mode_callback intelfb_genfb_mode_callback = {
@@ -244,6 +245,9 @@
        }
        sc->sc_attached = true;
 
+       pmf_device_register1(sc->sc_dev, NULL, NULL,
+           intelfb_genfb_shutdown);
+
        drm_fb_helper_set_config(sc->sc_ifa.ifa_fb_helper);
 
        /* Success!  */
@@ -421,6 +425,13 @@
 }
 
 static bool
+intelfb_genfb_shutdown(device_t self, int flags)
+{
+       genfb_enable_polling(self);
+       return true;
+}
+
+static bool
 intelfb_genfb_setmode(struct genfb_softc *genfb, int mode)
 {
        struct intelfb_softc *sc = (struct intelfb_softc *)genfb;



Home | Main Index | Thread Index | Old Index