diff options
author | Thomas Hellstrom <thomas-at-tungstengraphics-dot-com> | 2006-12-19 23:14:11 +0100 |
---|---|---|
committer | Thomas Hellstrom <thomas-at-tungstengraphics-dot-com> | 2006-12-19 23:14:11 +0100 |
commit | 81251bf78f06dc26e26c3edb09639850371fe540 (patch) | |
tree | efe58e4dab472f3bfd666a4877a8aa17858be7fb /linux-core | |
parent | 737c73d1a081823f5c95a6fd68173b56a304eae5 (diff) |
Reclaim buffers locked fixup.
Avoid calling reclaim_buffers_locked if we don't have a
hardware lock.
Improve reclaim_buffers_locked deadlock error formatting.
Diffstat (limited to 'linux-core')
-rw-r--r-- | linux-core/drm_fops.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/linux-core/drm_fops.c b/linux-core/drm_fops.c index b60ced34..ac205730 100644 --- a/linux-core/drm_fops.c +++ b/linux-core/drm_fops.c @@ -426,7 +426,7 @@ int drm_release(struct inode *inode, struct file *filp) current->pid, (long)old_encode_dev(priv->head->device), dev->open_count); - if (dev->driver->reclaim_buffers_locked) { + if (dev->driver->reclaim_buffers_locked && dev->lock.hw_lock) { unsigned long _end = jiffies + DRM_HZ*3; do { @@ -446,12 +446,12 @@ int drm_release(struct inode *inode, struct file *filp) * holds the lock. Then we can run reclaim buffers locked anyway. */ - DRM_ERROR("Reclaim buffers locked deadlock.\n"); - DRM_ERROR("This is probably a single thread having multiple\n"); - DRM_ERROR("DRM file descriptors open either dying or " - "closing file descriptors\n"); - DRM_ERROR("while having the lock. I will not reclaim buffers.\n"); - DRM_ERROR("Locking context is 0x%08x\n", + DRM_ERROR("Reclaim buffers locked deadlock.\n" + "\tThis is probably a single thread having multiple\n" + "\tDRM file descriptors open either dying or" + " closing file descriptors\n" + "\twhile having the lock. I will not reclaim buffers.\n" + "\tLocking context is 0x%08x\n", _DRM_LOCKING_CONTEXT(dev->lock.hw_lock->lock)); } } else if (drm_i_have_hw_lock(filp)) { |