Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/arm/sunxi Support "nomodeset" kernel cmdline flag t...
details: https://anonhg.NetBSD.org/src/rev/d46de560a4c2
branches: trunk
changeset: 448467:d46de560a4c2
user: jmcneill <jmcneill%NetBSD.org@localhost>
date: Sun Feb 03 15:43:57 2019 +0000
description:
Support "nomodeset" kernel cmdline flag to disable sunxidrm
diffstat:
sys/arch/arm/sunxi/sunxi_drm.c | 12 ++++++++++--
sys/arch/arm/sunxi/sunxi_platform.c | 11 +++++++++--
2 files changed, 19 insertions(+), 4 deletions(-)
diffs (79 lines):
diff -r b41cec02e3ed -r d46de560a4c2 sys/arch/arm/sunxi/sunxi_drm.c
--- a/sys/arch/arm/sunxi/sunxi_drm.c Sun Feb 03 13:56:38 2019 +0000
+++ b/sys/arch/arm/sunxi/sunxi_drm.c Sun Feb 03 15:43:57 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: sunxi_drm.c,v 1.4 2019/01/31 01:49:28 jmcneill Exp $ */
+/* $NetBSD: sunxi_drm.c,v 1.5 2019/02/03 15:43:57 jmcneill Exp $ */
/*-
* Copyright (c) 2019 Jared D. McNeill <jmcneill%invisible.ca@localhost>
@@ -27,7 +27,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: sunxi_drm.c,v 1.4 2019/01/31 01:49:28 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sunxi_drm.c,v 1.5 2019/02/03 15:43:57 jmcneill Exp $");
#include <sys/param.h>
#include <sys/bus.h>
@@ -121,6 +121,8 @@
struct sunxi_drm_softc * const sc = device_private(self);
struct fdt_attach_args * const faa = aux;
struct drm_driver * const driver = &sunxi_drm_driver;
+ prop_dictionary_t dict = device_properties(self);
+ bool is_disabled;
sc->sc_dev = self;
sc->sc_dmat = faa->faa_dmat;
@@ -128,6 +130,12 @@
sc->sc_phandle = faa->faa_phandle;
aprint_naive("\n");
+
+ if (prop_dictionary_get_bool(dict, "disabled", &is_disabled) && is_disabled) {
+ aprint_normal(": Display Engine Pipeline (disabled)\n");
+ return;
+ }
+
aprint_normal(": Display Engine Pipeline\n");
sc->sc_ddev = drm_dev_alloc(driver, sc->sc_dev);
diff -r b41cec02e3ed -r d46de560a4c2 sys/arch/arm/sunxi/sunxi_platform.c
--- a/sys/arch/arm/sunxi/sunxi_platform.c Sun Feb 03 13:56:38 2019 +0000
+++ b/sys/arch/arm/sunxi/sunxi_platform.c Sun Feb 03 15:43:57 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: sunxi_platform.c,v 1.34 2019/01/03 14:44:21 jmcneill Exp $ */
+/* $NetBSD: sunxi_platform.c,v 1.35 2019/02/03 15:43:57 jmcneill Exp $ */
/*-
* Copyright (c) 2017 Jared McNeill <jmcneill%invisible.ca@localhost>
@@ -31,7 +31,7 @@
#include "opt_console.h"
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: sunxi_platform.c,v 1.34 2019/01/03 14:44:21 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sunxi_platform.c,v 1.35 2019/02/03 15:43:57 jmcneill Exp $");
#include <sys/param.h>
#include <sys/bus.h>
@@ -201,6 +201,7 @@
sunxi_platform_device_register(device_t self, void *aux)
{
prop_dictionary_t prop = device_properties(self);
+ int val;
if (device_is_a(self, "rgephy")) {
/* Pine64+ and NanoPi NEO Plus2 gigabit ethernet workaround */
@@ -224,6 +225,12 @@
prop_dictionary_set_bool(prop, "sun50i-a64-unstable-timer", true);
}
}
+
+ if (device_is_a(self, "sunxidrm")) {
+ if (get_bootconf_option(boot_args, "nomodeset", BOOTOPT_TYPE_BOOLEAN, &val))
+ if (val)
+ prop_dictionary_set_bool(prop, "disabled", true);
+ }
}
static u_int
Home |
Main Index |
Thread Index |
Old Index