Commit 67cb4b4d authored by Daniel Vetter's avatar Daniel Vetter Committed by Dave Airlie

drm: unconditionally clean up dma buffers of closing clients

With the last patch to ditch DMA_QUEUE support, we should be able
to call the dma cleanup uncoditionally, even when the master has
disappeared.

Do so because it just makes more sense.
Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
parent a344a7e7
...@@ -376,9 +376,6 @@ static void drm_master_release(struct drm_device *dev, struct file *filp) ...@@ -376,9 +376,6 @@ static void drm_master_release(struct drm_device *dev, struct file *filp)
drm_lock_free(&file_priv->master->lock, drm_lock_free(&file_priv->master->lock,
_DRM_LOCKING_CONTEXT(file_priv->master->lock.hw_lock->lock)); _DRM_LOCKING_CONTEXT(file_priv->master->lock.hw_lock->lock));
} }
if (drm_core_check_feature(dev, DRIVER_HAVE_DMA))
drm_core_reclaim_buffers(dev, file_priv);
} }
static void drm_events_release(struct drm_file *file_priv) static void drm_events_release(struct drm_file *file_priv)
...@@ -448,6 +445,9 @@ int drm_release(struct inode *inode, struct file *filp) ...@@ -448,6 +445,9 @@ int drm_release(struct inode *inode, struct file *filp)
if (file_priv->minor->master) if (file_priv->minor->master)
drm_master_release(dev, filp); drm_master_release(dev, filp);
if (drm_core_check_feature(dev, DRIVER_HAVE_DMA))
drm_core_reclaim_buffers(dev, file_priv);
drm_events_release(file_priv); drm_events_release(file_priv);
if (dev->driver->driver_features & DRIVER_MODESET) if (dev->driver->driver_features & DRIVER_MODESET)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment