Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/shark/ofw Look for a Sun-like video mode specifier ...



details:   https://anonhg.NetBSD.org/src/rev/a5c13fdc35e8
branches:  trunk
changeset: 748957:a5c13fdc35e8
user:      macallan <macallan%NetBSD.org@localhost>
date:      Wed Nov 11 17:05:11 2009 +0000

description:
Look for a Sun-like video mode specifier in output-device, if there is one
pass it on to igsfb. With this you can
setenv output-device=screen:r1280x1024x60
and igsfb will use that mode. The mode specified must be listed in
dev/videomode/modelines.

diffstat:

 sys/arch/shark/ofw/igsfb_ofbus.c |  12 ++++++++----
 1 files changed, 8 insertions(+), 4 deletions(-)

diffs (54 lines):

diff -r b6f874251818 -r a5c13fdc35e8 sys/arch/shark/ofw/igsfb_ofbus.c
--- a/sys/arch/shark/ofw/igsfb_ofbus.c  Wed Nov 11 17:01:17 2009 +0000
+++ b/sys/arch/shark/ofw/igsfb_ofbus.c  Wed Nov 11 17:05:11 2009 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: igsfb_ofbus.c,v 1.9 2009/11/10 22:24:57 macallan Exp $ */
+/*     $NetBSD: igsfb_ofbus.c,v 1.10 2009/11/11 17:05:11 macallan Exp $ */
 
 /*
  * Copyright (c) 2006 Michael Lorenz
@@ -31,7 +31,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: igsfb_ofbus.c,v 1.9 2009/11/10 22:24:57 macallan Exp $");
+__KERNEL_RCSID(0, "$NetBSD: igsfb_ofbus.c,v 1.10 2009/11/11 17:05:11 macallan Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -90,6 +90,7 @@
        int chosen_phandle, igs_node;
        int stdout_ihandle, stdout_phandle;
        uint32_t regs[16];
+       char mode_buffer[64];
 
        stdout_phandle = 0;
 
@@ -139,6 +140,10 @@
        if (ret)
                return ret;
 
+       if (of_get_mode_string(mode_buffer, sizeof(mode_buffer))) {
+               strcpy(dc->dc_modestring, mode_buffer);
+       }       
+
        ret = igsfb_cnattach_subr(dc);
        if (ret)
                return ret;
@@ -199,7 +204,6 @@
        return 10;      /* beat vga etc. */
 }
 
-
 static void
 igsfb_ofbus_attach(struct device *parent, struct device *self, void *aux)
 {
@@ -207,7 +211,7 @@
        struct ofbus_attach_args *oba = aux;
        uint32_t regs[16];
        int isconsole, ret;
-
+       
        if (igsfb_ofbus_is_console(oba->oba_phandle)) {
                isconsole = 1;
                sc->sc_dc = &igsfb_console_dc;



Home | Main Index | Thread Index | Old Index