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 Initialize drm_bridge and drm_panel lo...
details: https://anonhg.NetBSD.org/src/rev/1b4b7bce5105
branches: trunk
changeset: 466861:1b4b7bce5105
user: jmcneill <jmcneill%NetBSD.org@localhost>
date: Fri Jan 03 21:01:16 2020 +0000
description:
Initialize drm_bridge and drm_panel locks.
diffstat:
sys/external/bsd/drm2/dist/drm/drm_bridge.c | 15 +++++++++++++--
sys/external/bsd/drm2/dist/drm/drm_panel.c | 15 +++++++++++++--
sys/external/bsd/drm2/dist/include/drm/drm_crtc.h | 7 ++++++-
sys/external/bsd/drm2/dist/include/drm/drm_panel.h | 7 ++++++-
sys/external/bsd/drm2/drm/drm_module.c | 9 +++++++--
5 files changed, 45 insertions(+), 8 deletions(-)
diffs (158 lines):
diff -r 9c479361ea09 -r 1b4b7bce5105 sys/external/bsd/drm2/dist/drm/drm_bridge.c
--- a/sys/external/bsd/drm2/dist/drm/drm_bridge.c Fri Jan 03 19:13:54 2020 +0000
+++ b/sys/external/bsd/drm2/dist/drm/drm_bridge.c Fri Jan 03 21:01:16 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: drm_bridge.c,v 1.3 2018/08/27 06:43:47 riastradh Exp $ */
+/* $NetBSD: drm_bridge.c,v 1.4 2020/01/03 21:01:16 jmcneill Exp $ */
/*
* Copyright (c) 2014 Samsung Electronics Co., Ltd
@@ -24,7 +24,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: drm_bridge.c,v 1.3 2018/08/27 06:43:47 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: drm_bridge.c,v 1.4 2020/01/03 21:01:16 jmcneill Exp $");
#include <linux/err.h>
#include <linux/module.h>
@@ -66,6 +66,17 @@
static LIST_HEAD(bridge_list);
#endif
+#ifdef __NetBSD__
+void drm_bridge_init_lock(void)
+{
+ linux_mutex_init(&bridge_lock);
+}
+void drm_bridge_fini_lock(void)
+{
+ linux_mutex_destroy(&bridge_lock);
+}
+#endif
+
/**
* drm_bridge_add - add the given bridge to the global bridge list
*
diff -r 9c479361ea09 -r 1b4b7bce5105 sys/external/bsd/drm2/dist/drm/drm_panel.c
--- a/sys/external/bsd/drm2/dist/drm/drm_panel.c Fri Jan 03 19:13:54 2020 +0000
+++ b/sys/external/bsd/drm2/dist/drm/drm_panel.c Fri Jan 03 21:01:16 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: drm_panel.c,v 1.3 2019/12/09 15:36:16 jakllsch Exp $ */
+/* $NetBSD: drm_panel.c,v 1.4 2020/01/03 21:01:16 jmcneill Exp $ */
/*
* Copyright (C) 2013, NVIDIA Corporation. All rights reserved.
@@ -24,7 +24,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: drm_panel.c,v 1.3 2019/12/09 15:36:16 jakllsch Exp $");
+__KERNEL_RCSID(0, "$NetBSD: drm_panel.c,v 1.4 2020/01/03 21:01:16 jmcneill Exp $");
#include <linux/err.h>
#include <linux/module.h>
@@ -40,6 +40,17 @@
static LIST_HEAD(panel_list);
#endif
+#ifdef __NetBSD__
+void drm_panel_init_lock(void)
+{
+ linux_mutex_init(&panel_lock);
+}
+void drm_panel_fini_lock(void)
+{
+ linux_mutex_destroy(&panel_lock);
+}
+#endif
+
void drm_panel_init(struct drm_panel *panel)
{
INIT_LIST_HEAD(&panel->list);
diff -r 9c479361ea09 -r 1b4b7bce5105 sys/external/bsd/drm2/dist/include/drm/drm_crtc.h
--- a/sys/external/bsd/drm2/dist/include/drm/drm_crtc.h Fri Jan 03 19:13:54 2020 +0000
+++ b/sys/external/bsd/drm2/dist/include/drm/drm_crtc.h Fri Jan 03 21:01:16 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: drm_crtc.h,v 1.7 2018/08/27 06:46:02 riastradh Exp $ */
+/* $NetBSD: drm_crtc.h,v 1.8 2020/01/03 21:01:16 jmcneill Exp $ */
/*
* Copyright © 2006 Keith Packard
@@ -1224,6 +1224,11 @@
/* helper to unplug all connectors from sysfs for device */
extern void drm_connector_unplug_all(struct drm_device *dev);
+#ifdef __NetBSD__
+extern void drm_bridge_init_lock(void);
+extern void drm_bridge_fini_lock(void);
+#endif
+
extern int drm_bridge_add(struct drm_bridge *bridge);
extern void drm_bridge_remove(struct drm_bridge *bridge);
extern struct drm_bridge *of_drm_find_bridge(struct device_node *np);
diff -r 9c479361ea09 -r 1b4b7bce5105 sys/external/bsd/drm2/dist/include/drm/drm_panel.h
--- a/sys/external/bsd/drm2/dist/include/drm/drm_panel.h Fri Jan 03 19:13:54 2020 +0000
+++ b/sys/external/bsd/drm2/dist/include/drm/drm_panel.h Fri Jan 03 21:01:16 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: drm_panel.h,v 1.2 2018/08/27 04:58:38 riastradh Exp $ */
+/* $NetBSD: drm_panel.h,v 1.3 2020/01/03 21:01:16 jmcneill Exp $ */
/*
* Copyright (C) 2013, NVIDIA Corporation. All rights reserved.
@@ -127,6 +127,11 @@
return panel ? -ENOSYS : -EINVAL;
}
+#ifdef __NetBSD__
+void drm_panel_init_lock(void);
+void drm_panel_fini_lock(void);
+#endif
+
void drm_panel_init(struct drm_panel *panel);
int drm_panel_add(struct drm_panel *panel);
diff -r 9c479361ea09 -r 1b4b7bce5105 sys/external/bsd/drm2/drm/drm_module.c
--- a/sys/external/bsd/drm2/drm/drm_module.c Fri Jan 03 19:13:54 2020 +0000
+++ b/sys/external/bsd/drm2/drm/drm_module.c Fri Jan 03 21:01:16 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: drm_module.c,v 1.16 2019/09/23 05:54:31 mrg Exp $ */
+/* $NetBSD: drm_module.c,v 1.17 2020/01/03 21:01:16 jmcneill 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.16 2019/09/23 05:54:31 mrg Exp $");
+__KERNEL_RCSID(0, "$NetBSD: drm_module.c,v 1.17 2020/01/03 21:01:16 jmcneill Exp $");
#include <sys/types.h>
#include <sys/condvar.h>
@@ -48,6 +48,7 @@
#include <drm/drm_encoder_slave.h>
#include <drm/drm_internal.h>
#include <drm/drm_sysctl.h>
+#include <drm/drm_panel.h>
/*
* XXX This is stupid.
@@ -122,6 +123,8 @@
linux_mutex_init(&drm_global_mutex);
drm_connector_ida_init();
drm_global_init();
+ drm_panel_init_lock();
+ drm_bridge_init_lock();
drm_sysctl_init(&drm_def);
drm_i2c_encoders_init();
@@ -146,6 +149,8 @@
drm_i2c_encoders_fini();
drm_sysctl_fini(&drm_def);
+ drm_bridge_fini_lock();
+ drm_panel_fini_lock();
drm_global_release();
drm_connector_ida_destroy();
linux_mutex_destroy(&drm_global_mutex);
Home |
Main Index |
Thread Index |
Old Index