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 Initialize kernel_fb_helper_lock i...



details:   https://anonhg.NetBSD.org/src/rev/04c55f027d4e
branches:  trunk
changeset: 1027880:04c55f027d4e
user:      riastradh <riastradh%NetBSD.org@localhost>
date:      Sun Dec 19 01:03:22 2021 +0000

description:
Initialize kernel_fb_helper_lock in drm module load.

diffstat:

 sys/external/bsd/drm2/dist/drm/drm_fb_helper.c |  8 +++++---
 sys/external/bsd/drm2/dist/drm/drm_internal.h  |  5 ++++-
 sys/external/bsd/drm2/drm/drm_module.c         |  6 ++++--
 3 files changed, 13 insertions(+), 6 deletions(-)

diffs (82 lines):

diff -r ce645afe4d55 -r 04c55f027d4e sys/external/bsd/drm2/dist/drm/drm_fb_helper.c
--- a/sys/external/bsd/drm2/dist/drm/drm_fb_helper.c    Sun Dec 19 01:03:13 2021 +0000
+++ b/sys/external/bsd/drm2/dist/drm/drm_fb_helper.c    Sun Dec 19 01:03:22 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: drm_fb_helper.c,v 1.18 2021/12/19 00:29:02 riastradh Exp $     */
+/*     $NetBSD: drm_fb_helper.c,v 1.19 2021/12/19 01:03:22 riastradh Exp $     */
 
 /*
  * Copyright (c) 2006-2009 Red Hat Inc.
@@ -30,7 +30,7 @@
  *      Jesse Barnes <jesse.barnes%intel.com@localhost>
  */
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: drm_fb_helper.c,v 1.18 2021/12/19 00:29:02 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: drm_fb_helper.c,v 1.19 2021/12/19 01:03:22 riastradh Exp $");
 
 #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
 
@@ -87,10 +87,12 @@
 #ifdef __NetBSD__              /* XXX LIST_HEAD means something else */
 static struct list_head kernel_fb_helper_list =
     LIST_HEAD_INIT(kernel_fb_helper_list);
+#define        kernel_fb_helper_lock   drm_kernel_fb_helper_lock
+struct mutex kernel_fb_helper_lock;
 #else
 static LIST_HEAD(kernel_fb_helper_list);
+static DEFINE_MUTEX(kernel_fb_helper_lock);
 #endif
-static DEFINE_MUTEX(kernel_fb_helper_lock);
 
 /**
  * DOC: fbdev helpers
diff -r ce645afe4d55 -r 04c55f027d4e sys/external/bsd/drm2/dist/drm/drm_internal.h
--- a/sys/external/bsd/drm2/dist/drm/drm_internal.h     Sun Dec 19 01:03:13 2021 +0000
+++ b/sys/external/bsd/drm2/dist/drm/drm_internal.h     Sun Dec 19 01:03:22 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: drm_internal.h,v 1.8 2021/12/19 00:58:30 riastradh Exp $       */
+/*     $NetBSD: drm_internal.h,v 1.9 2021/12/19 01:03:22 riastradh Exp $       */
 
 /*
  * Copyright © 2014 Intel Corporation
@@ -247,3 +247,6 @@
 /* drm_hdcp.c */
 int drm_setup_hdcp_srm(struct class *drm_class);
 void drm_teardown_hdcp_srm(struct class *drm_class);
+
+/* drm_fb_helper.c */
+extern struct mutex drm_kernel_fb_helper_lock;
diff -r ce645afe4d55 -r 04c55f027d4e sys/external/bsd/drm2/drm/drm_module.c
--- a/sys/external/bsd/drm2/drm/drm_module.c    Sun Dec 19 01:03:13 2021 +0000
+++ b/sys/external/bsd/drm2/drm/drm_module.c    Sun Dec 19 01:03:22 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: drm_module.c,v 1.20 2021/12/19 00:58:31 riastradh Exp $        */
+/*     $NetBSD: drm_module.c,v 1.21 2021/12/19 01:03:22 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.20 2021/12/19 00:58:31 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: drm_module.c,v 1.21 2021/12/19 01:03:22 riastradh Exp $");
 
 #include <sys/types.h>
 #include <sys/condvar.h>
@@ -124,6 +124,7 @@
        idr_init(&drm_minors_idr);
        srcu_init(&drm_unplug_srcu, "drmunplg");
        linux_mutex_init(&drm_global_mutex);
+       linux_mutex_init(&drm_kernel_fb_helper_lock);
        drm_connector_ida_init();
        drm_global_init();
        drm_panel_init_lock();
@@ -156,6 +157,7 @@
        drm_panel_fini_lock();
        drm_global_release();
        drm_connector_ida_destroy();
+       linux_mutex_destroy(&drm_kernel_fb_helper_lock);
        linux_mutex_destroy(&drm_global_mutex);
        srcu_fini(&drm_unplug_srcu);
        idr_destroy(&drm_minors_idr);



Home | Main Index | Thread Index | Old Index