Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/external/bsd/drm/dist call the sysctl destroy functions ...
details: https://anonhg.NetBSD.org/src/rev/2dc3479166bf
branches: trunk
changeset: 758522:2dc3479166bf
user: mrg <mrg%NetBSD.org@localhost>
date: Sat Nov 06 22:06:10 2010 +0000
description:
call the sysctl destroy functions upon failure and unload, which
should fix PR#40029. while there, fix the radeon unload, which
was improperly matching mutex init/destroy operations and leading
to trying to destroy lock that was never initialised.
diffstat:
sys/external/bsd/drm/dist/bsd-core/drm_drv.c | 4 +---
sys/external/bsd/drm/dist/shared-core/radeon_cp.c | 4 ++--
sys/external/bsd/drm/dist/shared-core/radeon_state.c | 1 -
3 files changed, 3 insertions(+), 6 deletions(-)
diffs (55 lines):
diff -r 73288a21a535 -r 2dc3479166bf sys/external/bsd/drm/dist/bsd-core/drm_drv.c
--- a/sys/external/bsd/drm/dist/bsd-core/drm_drv.c Sat Nov 06 21:42:32 2010 +0000
+++ b/sys/external/bsd/drm/dist/bsd-core/drm_drv.c Sat Nov 06 22:06:10 2010 +0000
@@ -659,9 +659,7 @@
return 0;
error:
-#if defined(__FreeBSD__)
drm_sysctl_cleanup(dev);
-#endif
DRM_LOCK();
drm_lastclose(dev);
DRM_UNLOCK();
@@ -685,8 +683,8 @@
DRM_DEBUG("\n");
+ drm_sysctl_cleanup(dev);
#if defined(__FreeBSD__)
- drm_sysctl_cleanup(dev);
destroy_dev(dev->devnode);
#endif
diff -r 73288a21a535 -r 2dc3479166bf sys/external/bsd/drm/dist/shared-core/radeon_cp.c
--- a/sys/external/bsd/drm/dist/shared-core/radeon_cp.c Sat Nov 06 21:42:32 2010 +0000
+++ b/sys/external/bsd/drm/dist/shared-core/radeon_cp.c Sat Nov 06 22:06:10 2010 +0000
@@ -1983,6 +1983,8 @@
dev->dev_private = (void *)dev_priv;
dev_priv->flags = flags;
+ DRM_SPININIT(&dev_priv->cs.cs_mutex, "cs_mtx");
+
switch (flags & RADEON_FAMILY_MASK) {
case CHIP_R100:
case CHIP_RV200:
@@ -2032,8 +2034,6 @@
dev_priv->gart_info.table_size = RADEON_PCIGART_TABLE_SIZE;
- DRM_SPININIT(&dev_priv->cs.cs_mutex, "cs_mtx");
-
ret = drm_addmap(dev, drm_get_resource_start(dev, 2),
drm_get_resource_len(dev, 2), _DRM_REGISTERS,
_DRM_READ_ONLY, &dev_priv->mmio);
diff -r 73288a21a535 -r 2dc3479166bf sys/external/bsd/drm/dist/shared-core/radeon_state.c
--- a/sys/external/bsd/drm/dist/shared-core/radeon_state.c Sat Nov 06 21:42:32 2010 +0000
+++ b/sys/external/bsd/drm/dist/shared-core/radeon_state.c Sat Nov 06 22:06:10 2010 +0000
@@ -3226,7 +3226,6 @@
if (dev_priv->sarea_priv &&
dev_priv->sarea_priv->pfCurrentPage != 0)
radeon_cp_dispatch_flip(dev);
- DRM_SPINUNINIT(&dev_priv->cs.cs_mutex);
}
radeon_do_release(dev);
Home |
Main Index |
Thread Index |
Old Index