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/radeon Take a mutex around mo...



details:   https://anonhg.NetBSD.org/src/rev/d15abb06f825
branches:  trunk
changeset: 969682:d15abb06f825
user:      riastradh <riastradh%NetBSD.org@localhost>
date:      Thu Feb 27 15:41:47 2020 +0000

description:
Take a mutex around mode config logic as the comment advises.

XXX pullup

diffstat:

 sys/external/bsd/drm2/dist/drm/radeon/radeon_irq_kms.c |  7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diffs (32 lines):

diff -r 9026220f6b3e -r d15abb06f825 sys/external/bsd/drm2/dist/drm/radeon/radeon_irq_kms.c
--- a/sys/external/bsd/drm2/dist/drm/radeon/radeon_irq_kms.c    Thu Feb 27 13:50:06 2020 +0000
+++ b/sys/external/bsd/drm2/dist/drm/radeon/radeon_irq_kms.c    Thu Feb 27 15:41:47 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: radeon_irq_kms.c,v 1.4 2018/08/27 07:03:26 riastradh Exp $     */
+/*     $NetBSD: radeon_irq_kms.c,v 1.5 2020/02/27 15:41:47 riastradh Exp $     */
 
 /*
  * Copyright 2008 Advanced Micro Devices, Inc.
@@ -28,7 +28,7 @@
  *          Jerome Glisse
  */
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: radeon_irq_kms.c,v 1.4 2018/08/27 07:03:26 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: radeon_irq_kms.c,v 1.5 2020/02/27 15:41:47 riastradh Exp $");
 
 #include <drm/drmP.h>
 #include <drm/drm_crtc_helper.h>
@@ -107,11 +107,12 @@
        struct drm_mode_config *mode_config = &dev->mode_config;
        struct drm_connector *connector;
 
-       /* this should take a mutex */
+       mutex_lock(&mode_config->mutex);
        if (mode_config->num_connector) {
                list_for_each_entry(connector, &mode_config->connector_list, head)
                        radeon_connector_hotplug(connector);
        }
+       mutex_unlock(&mode_config->mutex);
 }
 /**
  * radeon_driver_irq_preinstall_kms - drm irq preinstall callback



Home | Main Index | Thread Index | Old Index