Module Name: src Committed By: jmcneill Date: Mon Nov 17 00:50:40 UTC 2014
Modified Files: src/sys/arch/evbarm/awin: awin_machdep.c Log Message: Allow for overriding DVI/HDMI detection with a kernel boot arg. Set hdmi.forcemode=dvi or hdmi.forcemode=hdmi to disable auto-detection. To generate a diff of this commit: cvs rdiff -u -r1.28 -r1.29 src/sys/arch/evbarm/awin/awin_machdep.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/evbarm/awin/awin_machdep.c diff -u src/sys/arch/evbarm/awin/awin_machdep.c:1.28 src/sys/arch/evbarm/awin/awin_machdep.c:1.29 --- src/sys/arch/evbarm/awin/awin_machdep.c:1.28 Fri Nov 14 19:47:36 2014 +++ src/sys/arch/evbarm/awin/awin_machdep.c Mon Nov 17 00:50:40 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: awin_machdep.c,v 1.28 2014/11/14 19:47:36 jmcneill Exp $ */ +/* $NetBSD: awin_machdep.c,v 1.29 2014/11/17 00:50:40 jmcneill Exp $ */ /* * Machine dependent functions for kernel setup for TI OSK5912 board. @@ -125,7 +125,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: awin_machdep.c,v 1.28 2014/11/14 19:47:36 jmcneill Exp $"); +__KERNEL_RCSID(0, "$NetBSD: awin_machdep.c,v 1.29 2014/11/17 00:50:40 jmcneill Exp $"); #include "opt_machdep.h" #include "opt_ddb.h" @@ -769,6 +769,20 @@ awin_device_register(device_t self, void } } + if (device_is_a(self, "awinhdmi")) { + char *display_mode; + if (get_bootconf_option(boot_args, "hdmi.forcemode", + BOOTOPT_TYPE_STRING, &display_mode)) { + if (strcasecmp(display_mode, "hdmi") == 0) { + prop_dictionary_set_cstring(dict, + "display-mode", "hdmi"); + } else if (strcasecmp(display_mode, "dvi") == 0) { + prop_dictionary_set_cstring(dict, + "display-mode", "dvi"); + } + } + } + #if NGENFB > 0 if (device_is_a(self, "genfb")) { #ifdef DDB