aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/i810
diff options
context:
space:
mode:
authorDaniel Vetter <daniel.vetter@ffwll.ch>2012-01-29 11:05:52 -0500
committerDave Airlie <airlied@redhat.com>2012-01-30 04:31:25 -0500
commit6e877b576ddf7cde5db2e9a6dcb56fef0ea77e64 (patch)
treee00314c066c623ccb3ea44fad5a754ea7dc2dd2c /drivers/gpu/drm/i810
parent0a9626575400879d1d5e6bc8768188b938d7c501 (diff)
Revert "drm/i810: cleanup reclaim_buffers"
This reverts commit 87499ffdcb1c70f66988cd8febc4ead0ba2f9118. Where is that paper bag ... ah here. I've failed to take an odd interaction between my other cleanups and this reclaim_buffers patch into account and also failed to properly test it. Looks like there are more dragons and hidden trapdoors in the drm release path than actual lines of code. Until I get a clue, let's just revert this. Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/i810')
-rw-r--r--drivers/gpu/drm/i810/i810_dma.c17
-rw-r--r--drivers/gpu/drm/i810/i810_drv.c1
-rw-r--r--drivers/gpu/drm/i810/i810_drv.h6
3 files changed, 11 insertions, 13 deletions
diff --git a/drivers/gpu/drm/i810/i810_dma.c b/drivers/gpu/drm/i810/i810_dma.c
index f7c17b239833..7f4b4e10246e 100644
--- a/drivers/gpu/drm/i810/i810_dma.c
+++ b/drivers/gpu/drm/i810/i810_dma.c
@@ -886,7 +886,7 @@ static int i810_flush_queue(struct drm_device *dev)
886} 886}
887 887
888/* Must be called with the lock held */ 888/* Must be called with the lock held */
889void i810_driver_reclaim_buffers(struct drm_device *dev, 889static void i810_reclaim_buffers(struct drm_device *dev,
890 struct drm_file *file_priv) 890 struct drm_file *file_priv)
891{ 891{
892 struct drm_device_dma *dma = dev->dma; 892 struct drm_device_dma *dma = dev->dma;
@@ -1223,17 +1223,12 @@ void i810_driver_preclose(struct drm_device *dev, struct drm_file *file_priv)
1223 if (dev_priv->page_flipping) 1223 if (dev_priv->page_flipping)
1224 i810_do_cleanup_pageflip(dev); 1224 i810_do_cleanup_pageflip(dev);
1225 } 1225 }
1226}
1226 1227
1227 if (file_priv->master && file_priv->master->lock.hw_lock) { 1228void i810_driver_reclaim_buffers_locked(struct drm_device *dev,
1228 drm_idlelock_take(&file_priv->master->lock); 1229 struct drm_file *file_priv)
1229 i810_driver_reclaim_buffers(dev, file_priv); 1230{
1230 drm_idlelock_release(&file_priv->master->lock); 1231 i810_reclaim_buffers(dev, file_priv);
1231 } else {
1232 /* master disappeared, clean up stuff anyway and hope nothing
1233 * goes wrong */
1234 i810_driver_reclaim_buffers(dev, file_priv);
1235 }
1236
1237} 1232}
1238 1233
1239int i810_driver_dma_quiescent(struct drm_device *dev) 1234int i810_driver_dma_quiescent(struct drm_device *dev)
diff --git a/drivers/gpu/drm/i810/i810_drv.c b/drivers/gpu/drm/i810/i810_drv.c
index 053f1ee58393..ec12f7dc717a 100644
--- a/drivers/gpu/drm/i810/i810_drv.c
+++ b/drivers/gpu/drm/i810/i810_drv.c
@@ -63,6 +63,7 @@ static struct drm_driver driver = {
63 .lastclose = i810_driver_lastclose, 63 .lastclose = i810_driver_lastclose,
64 .preclose = i810_driver_preclose, 64 .preclose = i810_driver_preclose,
65 .device_is_agp = i810_driver_device_is_agp, 65 .device_is_agp = i810_driver_device_is_agp,
66 .reclaim_buffers_locked = i810_driver_reclaim_buffers_locked,
66 .dma_quiescent = i810_driver_dma_quiescent, 67 .dma_quiescent = i810_driver_dma_quiescent,
67 .ioctls = i810_ioctls, 68 .ioctls = i810_ioctls,
68 .fops = &i810_driver_fops, 69 .fops = &i810_driver_fops,
diff --git a/drivers/gpu/drm/i810/i810_drv.h b/drivers/gpu/drm/i810/i810_drv.h
index 6e0acad9e0f5..c9339f481795 100644
--- a/drivers/gpu/drm/i810/i810_drv.h
+++ b/drivers/gpu/drm/i810/i810_drv.h
@@ -116,12 +116,14 @@ typedef struct drm_i810_private {
116 116
117 /* i810_dma.c */ 117 /* i810_dma.c */
118extern int i810_driver_dma_quiescent(struct drm_device *dev); 118extern int i810_driver_dma_quiescent(struct drm_device *dev);
119void i810_driver_reclaim_buffers(struct drm_device *dev, 119extern void i810_driver_reclaim_buffers_locked(struct drm_device *dev,
120 struct drm_file *file_priv); 120 struct drm_file *file_priv);
121extern int i810_driver_load(struct drm_device *, unsigned long flags); 121extern int i810_driver_load(struct drm_device *, unsigned long flags);
122extern void i810_driver_lastclose(struct drm_device *dev); 122extern void i810_driver_lastclose(struct drm_device *dev);
123extern void i810_driver_preclose(struct drm_device *dev, 123extern void i810_driver_preclose(struct drm_device *dev,
124 struct drm_file *file_priv); 124 struct drm_file *file_priv);
125extern void i810_driver_reclaim_buffers_locked(struct drm_device *dev,
126 struct drm_file *file_priv);
125extern int i810_driver_device_is_agp(struct drm_device *dev); 127extern int i810_driver_device_is_agp(struct drm_device *dev);
126 128
127extern long i810_ioctl(struct file *file, unsigned int cmd, unsigned long arg); 129extern long i810_ioctl(struct file *file, unsigned int cmd, unsigned long arg);