Port-arm archive

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

Re: graphic drivers and simplefb



On Wed, Apr 04, 2018 at 06:24:44PM +0200, Manuel Bouyer wrote:
> Hello,
> What's missing from the sunxi video drivers is console handling.
> I got this working, but this needs some change to the simplefb driver.

I also need the attached change. Without it, if u-boot did use the serial
port and no framebuffer as console, the kernel's console will end up on the
serial port whatever the content of the bootargs is.

With this change the kernel may end up with no console at all if
bootargs has bee set wrongly, but then it's an operator mistake :)

-- 
Manuel Bouyer <bouyer%antioche.eu.org@localhost>
     NetBSD: 26 ans d'experience feront toujours la difference
--
Index: sunxi_platform.c
===================================================================
RCS file: /cvsroot/src/sys/arch/arm/sunxi/sunxi_platform.c,v
retrieving revision 1.22
diff -u -p -u -r1.22 sunxi_platform.c
--- sunxi_platform.c	1 Apr 2018 04:35:04 -0000	1.22
+++ sunxi_platform.c	4 Apr 2018 18:27:08 -0000
@@ -179,15 +179,9 @@ sunxi_platform_bootstrap(void)
 	if (match_bootconf_option(boot_args, "console", "fb")) {
 		void *fdt_data = __UNCONST(fdtbus_get_data());
 		const int chosen_off = fdt_path_offset(fdt_data, "/chosen");
-		const int framebuffer_off =
-		    fdt_path_offset(fdt_data, "/chosen/framebuffer");
-		if (chosen_off >= 0 && framebuffer_off >= 0) {
-			const char *status = fdt_getprop(fdt_data,
-			    framebuffer_off, "status", NULL);
-			if (status == NULL || strncmp(status, "ok", 2) == 0) {
-				fdt_setprop_string(fdt_data, chosen_off,
-				    "stdout-path", "/chosen/framebuffer");
-			}
+		if (chosen_off >= 0) {
+			fdt_setprop_string(fdt_data, chosen_off,
+			    "stdout-path", "/chosen/framebuffer");
 		}
 	}
 }


Home | Main Index | Thread Index | Old Index