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 Move dev_priv->drrs.mute...
details: https://anonhg.NetBSD.org/src/rev/3098760a419f
branches: trunk
changeset: 365967:3098760a419f
user: riastradh <riastradh%NetBSD.org@localhost>
date: Mon Aug 27 07:25:43 2018 +0000
description:
Move dev_priv->drrs.mutex initialization and add destruction.
This way it is easy to make sure the initialization is matched by
destruction even if we don't always need to create this mutex.
diffstat:
sys/external/bsd/drm2/dist/drm/i915/intel_dp.c | 18 +++++++++++++++---
1 files changed, 15 insertions(+), 3 deletions(-)
diffs (60 lines):
diff -r ab8b17d1fd82 -r 3098760a419f sys/external/bsd/drm2/dist/drm/i915/intel_dp.c
--- a/sys/external/bsd/drm2/dist/drm/i915/intel_dp.c Mon Aug 27 07:25:30 2018 +0000
+++ b/sys/external/bsd/drm2/dist/drm/i915/intel_dp.c Mon Aug 27 07:25:43 2018 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: intel_dp.c,v 1.15 2018/08/27 07:25:30 riastradh Exp $ */
+/* $NetBSD: intel_dp.c,v 1.16 2018/08/27 07:25:43 riastradh Exp $ */
/*
* Copyright © 2008 Intel Corporation
@@ -28,7 +28,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: intel_dp.c,v 1.15 2018/08/27 07:25:30 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: intel_dp.c,v 1.16 2018/08/27 07:25:43 riastradh Exp $");
#include <linux/i2c.h>
#include <linux/slab.h>
@@ -5018,6 +5018,8 @@
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);
@@ -5030,6 +5032,11 @@
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);
}
@@ -5875,7 +5882,6 @@
struct drm_display_mode *downclock_mode = NULL;
INIT_DELAYED_WORK(&dev_priv->drrs.work, intel_edp_drrs_downclock_work);
- mutex_init(&dev_priv->drrs.mutex);
if (INTEL_INFO(dev)->gen <= 6) {
DRM_DEBUG_KMS("DRRS supported for Gen7 and above\n");
@@ -6023,6 +6029,12 @@
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