drm: kill reclaim_buffers_locked
authorDaniel Vetter <daniel.vetter@ffwll.ch>
Tue, 25 Oct 2011 21:57:28 +0000 (23:57 +0200)
committerDave Airlie <airlied@redhat.com>
Fri, 20 Jul 2012 02:49:58 +0000 (22:49 -0400)
i810 was the last user of this code, with that gone, kill it.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Dave Airlie <airlied@redhat.com>
drivers/gpu/drm/drm_fops.c
drivers/gpu/drm/vmwgfx/vmwgfx_drv.c
include/drm/drmP.h

index f6231f0203e856a7a2feddc8b1c23c7ea9f29220..6cf9369e8cd516c2978df8e667618bcb8cefac4e 100644 (file)
@@ -370,53 +370,10 @@ int drm_fasync(int fd, struct file *filp, int on)
 }
 EXPORT_SYMBOL(drm_fasync);
 
-/*
- * Reclaim locked buffers; note that this may be a bad idea if the current
- * context doesn't have the hw lock...
- */
-static void drm_reclaim_locked_buffers(struct drm_device *dev, struct file *f)
-{
-       struct drm_file *file_priv = f->private_data;
-
-       if (drm_i_have_hw_lock(dev, file_priv)) {
-               dev->driver->reclaim_buffers_locked(dev, file_priv);
-       } else {
-               unsigned long _end = jiffies + 3 * DRM_HZ;
-               int locked = 0;
-
-               drm_idlelock_take(&file_priv->master->lock);
-
-               /*
-                * Wait for a while.
-                */
-               do {
-                       spin_lock_bh(&file_priv->master->lock.spinlock);
-                       locked = file_priv->master->lock.idle_has_lock;
-                       spin_unlock_bh(&file_priv->master->lock.spinlock);
-                       if (locked)
-                               break;
-                       schedule();
-               } while (!time_after_eq(jiffies, _end));
-
-               if (!locked) {
-                       DRM_ERROR("reclaim_buffers_locked() deadlock. Please rework this\n"
-                                 "\tdriver to use reclaim_buffers_idlelocked() instead.\n"
-                                 "\tI will go on reclaiming the buffers anyway.\n");
-               }
-
-               dev->driver->reclaim_buffers_locked(dev, file_priv);
-               drm_idlelock_release(&file_priv->master->lock);
-       }
-}
-
 static void drm_master_release(struct drm_device *dev, struct file *filp)
 {
        struct drm_file *file_priv = filp->private_data;
 
-       if (dev->driver->reclaim_buffers_locked &&
-           file_priv->master->lock.hw_lock)
-               drm_reclaim_locked_buffers(dev, filp);
-
        if (drm_i_have_hw_lock(dev, file_priv)) {
                DRM_DEBUG("File %p released, freeing lock for context %d\n",
                          filp, _DRM_LOCKING_CONTEXT(file_priv->master->lock.hw_lock->lock));
@@ -424,8 +381,7 @@ static void drm_master_release(struct drm_device *dev, struct file *filp)
                              _DRM_LOCKING_CONTEXT(file_priv->master->lock.hw_lock->lock));
        }
 
-       if (drm_core_check_feature(dev, DRIVER_HAVE_DMA) &&
-           !dev->driver->reclaim_buffers_locked) {
+       if (drm_core_check_feature(dev, DRIVER_HAVE_DMA)) {
                dev->driver->reclaim_buffers(dev, file_priv);
        }
 }
index ee24d216aa856e59c13816dbff3ed06fe2e92750..5d5632f5265b7cdbe57e2410ce046bf342ad7d19 100644 (file)
@@ -1147,7 +1147,6 @@ static struct drm_driver driver = {
        .get_vblank_counter = vmw_get_vblank_counter,
        .enable_vblank = vmw_enable_vblank,
        .disable_vblank = vmw_disable_vblank,
-       .reclaim_buffers_locked = NULL,
        .ioctls = vmw_ioctls,
        .num_ioctls = DRM_ARRAY_SIZE(vmw_ioctls),
        .dma_quiescent = NULL,  /*vmw_dma_quiescent, */
index 5f2211c9130dc1f031edafc9b476c81517559fbd..259a7619c464c6042b6bb02df0f136c758ece431 100644 (file)
@@ -878,8 +878,6 @@ struct drm_driver {
        void (*irq_uninstall) (struct drm_device *dev);
        void (*reclaim_buffers) (struct drm_device *dev,
                                 struct drm_file * file_priv);
-       void (*reclaim_buffers_locked) (struct drm_device *dev,
-                                       struct drm_file *file_priv);
        void (*set_version) (struct drm_device *dev,
                             struct drm_set_version *sv);