Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 318721
b: refs/heads/master
c: ea5e437
h: refs/heads/master
i:
  318719: e36cabd
v: v3
  • Loading branch information
Daniel Vetter authored and Dave Airlie committed Jul 20, 2012
1 parent 7456dc2 commit 6e988b9
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 834859c3abf9272bf55bd0d0c95e5a892f24dadc
refs/heads/master: ea5e437406701838751ebc0f797d8b1c31df8121
3 changes: 1 addition & 2 deletions trunk/drivers/gpu/drm/sis/sis_drv.c
Original file line number Diff line number Diff line change
Expand Up @@ -105,10 +105,9 @@ static struct drm_driver driver = {
.load = sis_driver_load,
.unload = sis_driver_unload,
.open = sis_driver_open,
.preclose = sis_reclaim_buffers_locked,
.postclose = sis_driver_postclose,
.dma_quiescent = sis_idle,
.reclaim_buffers = NULL,
.reclaim_buffers_idlelocked = sis_reclaim_buffers_locked,
.lastclose = sis_lastclose,
.ioctls = sis_ioctls,
.fops = &sis_driver_fops,
Expand Down
13 changes: 11 additions & 2 deletions trunk/drivers/gpu/drm/sis/sis_mm.c
Original file line number Diff line number Diff line change
Expand Up @@ -321,14 +321,20 @@ void sis_reclaim_buffers_locked(struct drm_device *dev,
struct sis_file_private *file_priv = file->driver_priv;
struct sis_memblock *entry, *next;

if (!(file->minor->master && file->master->lock.hw_lock))
return;

drm_idlelock_take(&file->master->lock);

mutex_lock(&dev->struct_mutex);
if (list_empty(&file_priv->obj_list)) {
mutex_unlock(&dev->struct_mutex);
drm_idlelock_release(&file->master->lock);

return;
}

if (dev->driver->dma_quiescent)
dev->driver->dma_quiescent(dev);
sis_idle(dev);


list_for_each_entry_safe(entry, next, &file_priv->obj_list,
Expand All @@ -343,6 +349,9 @@ void sis_reclaim_buffers_locked(struct drm_device *dev,
kfree(entry);
}
mutex_unlock(&dev->struct_mutex);

drm_idlelock_release(&file->master->lock);

return;
}

Expand Down

0 comments on commit 6e988b9

Please sign in to comment.