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/dist/drm/i915 Initialize and destroy d...



details:   https://anonhg.NetBSD.org/src/rev/e04ab6e2571e
branches:  trunk
changeset: 366562:e04ab6e2571e
user:      riastradh <riastradh%NetBSD.org@localhost>
date:      Sun Sep 02 17:36:57 2018 +0000

description:
Initialize and destroy dev_priv->drrs.mutex only once.

Not once per connector!

Candidate fix for:
https://mail-index.netbsd.org/current-users/2018/08/30/msg034155.html

diffstat:

 sys/external/bsd/drm2/dist/drm/i915/intel_display.c |   8 ++++++--
 sys/external/bsd/drm2/dist/drm/i915/intel_dp.c      |  17 ++---------------
 2 files changed, 8 insertions(+), 17 deletions(-)

diffs (94 lines):

diff -r db1cfda2fad7 -r e04ab6e2571e sys/external/bsd/drm2/dist/drm/i915/intel_display.c
--- a/sys/external/bsd/drm2/dist/drm/i915/intel_display.c       Sun Sep 02 17:21:28 2018 +0000
+++ b/sys/external/bsd/drm2/dist/drm/i915/intel_display.c       Sun Sep 02 17:36:57 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: intel_display.c,v 1.21 2018/08/27 07:28:41 riastradh Exp $     */
+/*     $NetBSD: intel_display.c,v 1.22 2018/09/02 17:36:57 riastradh Exp $     */
 
 /*
  * Copyright © 2006-2007 Intel Corporation
@@ -27,7 +27,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: intel_display.c,v 1.21 2018/08/27 07:28:41 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: intel_display.c,v 1.22 2018/09/02 17:36:57 riastradh Exp $");
 
 #include <linux/dmi.h>
 #include <linux/module.h>
@@ -14775,8 +14775,10 @@
 
 #ifdef __NetBSD__
        linux_mutex_init(&dev_priv->pps_mutex);
+       linux_mutex_init(&dev_priv->drrs.mutex);
 #else
        mutex_init(&dev_priv->pps_mutex);
+       mutex_init(&dev_priv->drrs.mutex);
 #endif
 }
 
@@ -15710,10 +15712,12 @@
 
 #ifdef __NetBSD__
        linux_mutex_destroy(&dev_priv->psr.lock);
+       linux_mutex_destroy(&dev_priv->drrs.mutex);
        linux_mutex_destroy(&dev_priv->pps_mutex);
        linux_mutex_destroy(&dev_priv->fbc.lock);
 #else
        mutex_destroy(&dev_priv->psr.lock);
+       mutex_destroy(&dev_priv->drrs.mutex);
        mutex_destroy(&dev_priv->pps_mutex);
        mutex_destroy(&dev_priv->fbc.lock);
 #endif
diff -r db1cfda2fad7 -r e04ab6e2571e sys/external/bsd/drm2/dist/drm/i915/intel_dp.c
--- a/sys/external/bsd/drm2/dist/drm/i915/intel_dp.c    Sun Sep 02 17:21:28 2018 +0000
+++ b/sys/external/bsd/drm2/dist/drm/i915/intel_dp.c    Sun Sep 02 17:36:57 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: intel_dp.c,v 1.17 2018/08/27 13:41:23 riastradh Exp $  */
+/*     $NetBSD: intel_dp.c,v 1.18 2018/09/02 17:36:57 riastradh Exp $  */
 
 /*
  * Copyright © 2008 Intel Corporation
@@ -28,7 +28,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: intel_dp.c,v 1.17 2018/08/27 13:41:23 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: intel_dp.c,v 1.18 2018/09/02 17:36:57 riastradh Exp $");
 
 #include <linux/i2c.h>
 #include <linux/slab.h>
@@ -5014,8 +5014,6 @@
 intel_dp_connector_destroy(struct drm_connector *connector)
 {
        struct intel_connector *intel_connector = to_intel_connector(connector);
-       struct drm_device *dev = intel_connector->base.dev;
-       struct drm_i915_private *dev_priv = dev->dev_private;
 
        kfree(intel_connector->detect_edid);
 
@@ -5028,11 +5026,6 @@
                intel_panel_fini(&intel_connector->panel);
 
        drm_connector_cleanup(connector);
-#ifdef __NetBSD__
-       linux_mutex_destroy(&dev_priv->drrs.mutex);
-#else
-       mutex_destroy(&dev_priv->drrs.mutex);
-#endif
        kfree(connector);
 }
 
@@ -6025,12 +6018,6 @@
 
        intel_dp->pps_pipe = INVALID_PIPE;
 
-#ifdef __NetBSD__
-       linux_mutex_init(&dev_priv->drrs.mutex);
-#else
-       mutex_init(&dev_priv->drrs.mutex);
-#endif
-
        /* intel_dp vfuncs */
        if (INTEL_INFO(dev)->gen >= 9)
                intel_dp->get_aux_clock_divider = skl_get_aux_clock_divider;



Home | Main Index | Thread Index | Old Index