mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-11-25 08:30:54 +07:00
drm: kill reclaim_buffers_locked
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>
This commit is contained in:
parent
d5346b3727
commit
923d1fe86b
@ -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);
|
||||
}
|
||||
}
|
||||
|
@ -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, */
|
||||
|
@ -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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user