Source-Changes-HG archive

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

[src/trunk]: src/sys/compat/darwin Switch the console to graphic mode before ...



details:   https://anonhg.NetBSD.org/src/rev/50a82c244ad2
branches:  trunk
changeset: 551136:50a82c244ad2
user:      manu <manu%NetBSD.org@localhost>
date:      Fri Aug 29 22:03:13 2003 +0000

description:
Switch the console to graphic mode before trying to udv_attach the
framebuffer.

diffstat:

 sys/compat/darwin/darwin_ioframebuffer.c |  11 +++++++++--
 1 files changed, 9 insertions(+), 2 deletions(-)

diffs (39 lines):

diff -r 5469673fa020 -r 50a82c244ad2 sys/compat/darwin/darwin_ioframebuffer.c
--- a/sys/compat/darwin/darwin_ioframebuffer.c  Fri Aug 29 21:23:26 2003 +0000
+++ b/sys/compat/darwin/darwin_ioframebuffer.c  Fri Aug 29 22:03:13 2003 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: darwin_ioframebuffer.c,v 1.13 2003/08/28 21:47:02 manu Exp $ */
+/*     $NetBSD: darwin_ioframebuffer.c,v 1.14 2003/08/29 22:03:13 manu Exp $ */
 
 /*-
  * Copyright (c) 2003 The NetBSD Foundation, Inc.
@@ -37,7 +37,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: darwin_ioframebuffer.c,v 1.13 2003/08/28 21:47:02 manu Exp $");
+__KERNEL_RCSID(0, "$NetBSD: darwin_ioframebuffer.c,v 1.14 2003/08/29 22:03:13 manu Exp $");
 
 #include <sys/types.h>
 #include <sys/param.h>
@@ -477,6 +477,7 @@
                int major, minor;
                dev_t device;
                int screen;
+               int mode;
                struct uvm_object *udo;
                struct wsdisplay_fbinfo fbi;
 
@@ -517,6 +518,12 @@
 #endif
                len = round_page(fbi.height * fbi.width * fbi.depth / 8);
 
+               /* Switch to graphic mode */
+               mode = WSDISPLAYIO_MODE_MAPPED;
+               if ((error = (*wsdisplay_cdevsw.d_ioctl)(device, 
+                   WSDISPLAYIO_SMODE, (caddr_t)&mode, 0, p)) != 0)
+                       printf("*** Cannot switch to graphic mode ***\n");
+
                /* Create the uvm_object */
                udo = udv_attach(&device, UVM_PROT_RW, 0, len);
                if (udo == NULL) {



Home | Main Index | Thread Index | Old Index