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 Fix up removal of _DRM_SHM mappings an...
details: https://anonhg.NetBSD.org/src/rev/892975322e70
branches: trunk
changeset: 328420:892975322e70
user: riastradh <riastradh%NetBSD.org@localhost>
date: Thu Apr 03 05:48:02 2014 +0000
description:
Fix up removal of _DRM_SHM mappings and the hardware lock.
diffstat:
sys/external/bsd/drm2/dist/drm/drm_bufs.c | 2 +-
sys/external/bsd/drm2/drm/drm_fops.c | 17 ++---------------
2 files changed, 3 insertions(+), 16 deletions(-)
diffs (57 lines):
diff -r f27314d4ceee -r 892975322e70 sys/external/bsd/drm2/dist/drm/drm_bufs.c
--- a/sys/external/bsd/drm2/dist/drm/drm_bufs.c Thu Apr 03 02:51:19 2014 +0000
+++ b/sys/external/bsd/drm2/dist/drm/drm_bufs.c Thu Apr 03 05:48:02 2014 +0000
@@ -496,7 +496,7 @@
}
break;
case _DRM_SHM:
- if (master) {
+ if (master && (map->flags & _DRM_CONTAINS_LOCK)) {
spin_lock(&master->lock.spinlock);
/*
* If we successfully removed this mapping,
diff -r f27314d4ceee -r 892975322e70 sys/external/bsd/drm2/drm/drm_fops.c
--- a/sys/external/bsd/drm2/drm/drm_fops.c Thu Apr 03 02:51:19 2014 +0000
+++ b/sys/external/bsd/drm2/drm/drm_fops.c Thu Apr 03 05:48:02 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: drm_fops.c,v 1.2 2014/03/18 18:20:42 riastradh Exp $ */
+/* $NetBSD: drm_fops.c,v 1.3 2014/04/03 05:48:02 riastradh Exp $ */
/*-
* Copyright (c) 2013 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: drm_fops.c,v 1.2 2014/03/18 18:20:42 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: drm_fops.c,v 1.3 2014/04/03 05:48:02 riastradh Exp $");
#include <drm/drmP.h>
@@ -315,7 +315,6 @@
mutex_lock(&dev->struct_mutex);
if (file->is_master) {
- struct drm_master *const master = file->master;
struct drm_file *other_file;
list_for_each_entry(other_file, &dev->filelist, lhead) {
@@ -328,18 +327,6 @@
other_file->authenticated = 0;
}
- spin_lock(&master->lock.spinlock);
- if (master->lock.hw_lock) {
- /* XXX There is copypasta of this in drm_bufs.c. */
- if (dev->sigdata.lock == master->lock.hw_lock)
- dev->sigdata.lock = NULL;
- master->lock.hw_lock = NULL;
- master->lock.file_priv = NULL;
- DRM_SPIN_WAKEUP_ALL(&master->lock.lock_queue,
- &master->lock.spinlock);
- }
- spin_unlock(&master->lock.spinlock);
-
if (file->minor->master == file->master) {
if (dev->driver->master_drop)
(*dev->driver->master_drop)(dev, file, true);
Home |
Main Index |
Thread Index |
Old Index