Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/external/bsd/drm2/drm Figure drm_debug into the drm_init...
details: https://anonhg.NetBSD.org/src/rev/6f0acad67291
branches: trunk
changeset: 328492:6f0acad67291
user: riastradh <riastradh%NetBSD.org@localhost>
date: Fri Apr 04 15:16:59 2014 +0000
description:
Figure drm_debug into the drm_init module kludgerosity.
diffstat:
sys/external/bsd/drm2/drm/drm_drv.c | 10 ++++++++--
sys/external/bsd/drm2/drm/drm_module.c | 19 ++++++++++---------
2 files changed, 18 insertions(+), 11 deletions(-)
diffs (95 lines):
diff -r 3a80d343ff9c -r 6f0acad67291 sys/external/bsd/drm2/drm/drm_drv.c
--- a/sys/external/bsd/drm2/drm/drm_drv.c Fri Apr 04 15:16:29 2014 +0000
+++ b/sys/external/bsd/drm2/drm/drm_drv.c Fri Apr 04 15:16:59 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: drm_drv.c,v 1.2 2014/03/18 18:20:42 riastradh Exp $ */
+/* $NetBSD: drm_drv.c,v 1.3 2014/04/04 15:16:59 riastradh Exp $ */
/*-
* Copyright (c) 2013 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: drm_drv.c,v 1.2 2014/03/18 18:20:42 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: drm_drv.c,v 1.3 2014/04/04 15:16:59 riastradh Exp $");
#include <sys/param.h>
#include <sys/types.h>
@@ -45,6 +45,9 @@
#include <sys/once.h>
#endif
#include <sys/poll.h>
+#ifndef _MODULE
+#include <sys/reboot.h> /* XXX drm_init kludge */
+#endif
#include <sys/select.h>
#include <uvm/uvm_extern.h>
@@ -455,6 +458,9 @@
linux_suppress_init = 1;
linux_mutex_init(&drm_global_mutex);
+ if (ISSET(boothowto, AB_DEBUG))
+ drm_debug = ~(unsigned int)0;
+
return 0;
fail1: linux_kmap_fini();
diff -r 3a80d343ff9c -r 6f0acad67291 sys/external/bsd/drm2/drm/drm_module.c
--- a/sys/external/bsd/drm2/drm/drm_module.c Fri Apr 04 15:16:29 2014 +0000
+++ b/sys/external/bsd/drm2/drm/drm_module.c Fri Apr 04 15:16:59 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: drm_module.c,v 1.4 2014/04/03 15:16:18 riastradh Exp $ */
+/* $NetBSD: drm_module.c,v 1.5 2014/04/04 15:16:59 riastradh Exp $ */
/*-
* Copyright (c) 2013 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: drm_module.c,v 1.4 2014/04/03 15:16:18 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: drm_module.c,v 1.5 2014/04/04 15:16:59 riastradh Exp $");
#include <sys/types.h>
#include <sys/device.h>
@@ -49,10 +49,12 @@
#include "ioconf.c"
#endif
-#ifndef _MODULE
/*
* XXX Mega-kludge. See drm_init in drm_drv.c for details.
*/
+#ifdef _MODULE
+static const int linux_suppress_init = 1;
+#else
extern int linux_suppress_init;
#endif
@@ -66,10 +68,11 @@
switch (cmd) {
case MODULE_CMD_INIT:
-#ifndef _MODULE
- if (!linux_suppress_init)
-#endif
- linux_mutex_init(&drm_global_mutex);
+ if (!linux_suppress_init) {
+ linux_mutex_init(&drm_global_mutex);
+ if (ISSET(boothowto, AB_DEBUG))
+ drm_debug = ~(unsigned int)0;
+ }
#ifdef _MODULE
error = config_init_component(cfdriver_ioconf_drmkms,
cfattach_ioconf_drmkms, cfdata_ioconf_drmkms);
@@ -86,8 +89,6 @@
goto init_fail1;
}
#endif
- if (ISSET(boothowto, AB_DEBUG))
- drm_debug = ~(unsigned int)0;
return 0;
#ifdef _MODULE
Home |
Main Index |
Thread Index |
Old Index