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 provide a setmode callback for...
details: https://anonhg.NetBSD.org/src/rev/498b8afea8fc
branches: trunk
changeset: 331273:498b8afea8fc
user: jmcneill <jmcneill%NetBSD.org@localhost>
date: Wed Aug 06 22:16:38 2014 +0000
description:
provide a setmode callback for genfb; with this change, vt switching in and out of X works
diffstat:
sys/external/bsd/drm2/i915drm/intelfb.c | 24 ++++++++++++++++++++++--
1 files changed, 22 insertions(+), 2 deletions(-)
diffs (56 lines):
diff -r ba69e8b90973 -r 498b8afea8fc sys/external/bsd/drm2/i915drm/intelfb.c
--- a/sys/external/bsd/drm2/i915drm/intelfb.c Wed Aug 06 22:12:51 2014 +0000
+++ b/sys/external/bsd/drm2/i915drm/intelfb.c Wed Aug 06 22:16:38 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: intelfb.c,v 1.6 2014/08/05 20:28:56 riastradh Exp $ */
+/* $NetBSD: intelfb.c,v 1.7 2014/08/06 22:16:38 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.6 2014/08/05 20:28:56 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: intelfb.c,v 1.7 2014/08/06 22:16:38 jmcneill Exp $");
#ifdef _KERNEL_OPT
#include "vga.h"
@@ -90,6 +90,11 @@
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_setmode(struct genfb_softc *, int);
+
+static const struct genfb_mode_callback intelfb_genfb_mode_callback = {
+ .gmc_setmode = intelfb_genfb_setmode,
+};
CFATTACH_DECL_NEW(intelfb, sizeof(struct intelfb_softc),
intelfb_match, intelfb_attach, intelfb_detach, NULL);
@@ -204,6 +209,9 @@
(uint64_t)(uintptr_t)bus_space_vaddr(sc->sc_ifa.ifa_fb_bst,
sc->sc_fb_bsh));
+ prop_dictionary_set_uint64(dict, "mode_callback",
+ (uint64_t)(uintptr_t)&intelfb_genfb_mode_callback);
+
/* XXX Whattakludge! */
#if NVGA > 0
if (vga_is_console(dev->pdev->pd_pa.pa_iot, -1)) {
@@ -411,3 +419,15 @@
return drm_fb_helper_debug_leave_fb(sc->sc_ifa.ifa_fb_helper);
}
+
+static bool
+intelfb_genfb_setmode(struct genfb_softc *genfb, int mode)
+{
+ struct intelfb_softc *sc = (struct intelfb_softc *)genfb;
+
+ if (mode == WSDISPLAYIO_MODE_EMUL) {
+ drm_fb_helper_set_config(sc->sc_ifa.ifa_fb_helper);
+ }
+
+ return true;
+}
Home |
Main Index |
Thread Index |
Old Index