Revert "Revert "drm/i810: cleanup reclaim_buffers""
This reverts commit6e877b576d
, reinstating the original commit: commit87499ffdcb
Author: Daniel Vetter <daniel.vetter@ffwll.ch> Date: Tue Oct 25 23:51:24 2011 +0200 drm/i810: cleanup reclaim_buffers My dear old i815 always hits the deadlocked on reclaim_buffers warning. Switch over to the idlelock duct-tape on hope that works better. I've fired up my i815 and now closing glxgears doesn't take 5 seconds anymore. \o/ The original problem with that was that I've moved it ahead in the series so that it could be included despite some patches not being ready quite yet. The little problem is that this patch required some of the previous rework to work correctly. Now that everything is in the right order again, this actually works on my i810 and does speed up closing gl apps as the original commit claimed. Without hanging the machine, as the revert says. Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Signed-off-by: Dave Airlie <airlied@redhat.com>
此提交包含在:
@@ -881,7 +881,7 @@ static int i810_flush_queue(struct drm_device *dev)
|
||||
}
|
||||
|
||||
/* Must be called with the lock held */
|
||||
static void i810_reclaim_buffers(struct drm_device *dev,
|
||||
void i810_driver_reclaim_buffers(struct drm_device *dev,
|
||||
struct drm_file *file_priv)
|
||||
{
|
||||
struct drm_device_dma *dma = dev->dma;
|
||||
@@ -1220,12 +1220,17 @@ void i810_driver_preclose(struct drm_device *dev, struct drm_file *file_priv)
|
||||
if (dev_priv->page_flipping)
|
||||
i810_do_cleanup_pageflip(dev);
|
||||
}
|
||||
}
|
||||
|
||||
void i810_driver_reclaim_buffers_locked(struct drm_device *dev,
|
||||
struct drm_file *file_priv)
|
||||
{
|
||||
i810_reclaim_buffers(dev, file_priv);
|
||||
if (file_priv->master && file_priv->master->lock.hw_lock) {
|
||||
drm_idlelock_take(&file_priv->master->lock);
|
||||
i810_driver_reclaim_buffers(dev, file_priv);
|
||||
drm_idlelock_release(&file_priv->master->lock);
|
||||
} else {
|
||||
/* master disappeared, clean up stuff anyway and hope nothing
|
||||
* goes wrong */
|
||||
i810_driver_reclaim_buffers(dev, file_priv);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
int i810_driver_dma_quiescent(struct drm_device *dev)
|
||||
|
新增問題並參考
封鎖使用者