diff options
author | Patrice Mandin <pmandin@caramail.com> | 2007-08-02 20:08:05 +0200 |
---|---|---|
committer | Patrice Mandin <pmandin@caramail.com> | 2007-08-02 20:08:05 +0200 |
commit | 9dfcc1ba07b6ad1a41234ae4016b54444094ac18 (patch) | |
tree | c0deaa0f308616f35eabfda98d83814a8d405fed /linux-core/drm_fence.c | |
parent | 405c48b857a967c1174b27a5db975668e1d6a9f8 (diff) | |
parent | 7602e4f8a67d777437502672b4f74d9b990535ce (diff) |
Merge branch 'master' of git+ssh://pmandin@git.freedesktop.org/git/mesa/drm
Diffstat (limited to 'linux-core/drm_fence.c')
-rw-r--r-- | linux-core/drm_fence.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/linux-core/drm_fence.c b/linux-core/drm_fence.c index c4f7da15..2f16f7ef 100644 --- a/linux-core/drm_fence.c +++ b/linux-core/drm_fence.c @@ -520,9 +520,10 @@ void drm_fence_manager_init(struct drm_device * dev) struct drm_fence_class_manager *class; struct drm_fence_driver *fed = dev->driver->fence_driver; int i; + unsigned long flags; rwlock_init(&fm->lock); - write_lock(&fm->lock); + write_lock_irqsave(&fm->lock, flags); fm->initialized = 0; if (!fed) goto out_unlock; @@ -541,7 +542,7 @@ void drm_fence_manager_init(struct drm_device * dev) atomic_set(&fm->count, 0); out_unlock: - write_unlock(&fm->lock); + write_unlock_irqrestore(&fm->lock, flags); } void drm_fence_manager_takedown(struct drm_device * dev) @@ -597,7 +598,6 @@ int drm_fence_create_ioctl(struct drm_device *dev, void *data, struct drm_file * * usage > 0. No need to lock dev->struct_mutex; */ - atomic_inc(&fence->usage); arg->handle = fence->base.hash.key; read_lock_irqsave(&fm->lock, flags); @@ -830,7 +830,7 @@ int drm_fence_buffers_ioctl(struct drm_device *dev, void *data, struct drm_file DRM_FENCE_FLAG_SHAREABLE); if (ret) return ret; - atomic_inc(&fence->usage); + arg->handle = fence->base.hash.key; read_lock_irqsave(&fm->lock, flags); |