Module Name:    src
Committed By:   macallan
Date:           Wed Nov 11 17:05:11 UTC 2009

Modified Files:
        src/sys/arch/shark/ofw: igsfb_ofbus.c

Log Message:
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.


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/sys/arch/shark/ofw/igsfb_ofbus.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/shark/ofw/igsfb_ofbus.c
diff -u src/sys/arch/shark/ofw/igsfb_ofbus.c:1.9 src/sys/arch/shark/ofw/igsfb_ofbus.c:1.10
--- src/sys/arch/shark/ofw/igsfb_ofbus.c:1.9	Tue Nov 10 22:24:57 2009
+++ src/sys/arch/shark/ofw/igsfb_ofbus.c	Wed Nov 11 17:05:11 2009
@@ -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;

Reply via email to