diff options
author | Daniel Vetter <daniel.vetter@ffwll.ch> | 2011-10-25 18:31:26 -0400 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2012-07-19 22:51:04 -0400 |
commit | 67cb4b4dd4b3bb38626a841200638a4e953ea3fd (patch) | |
tree | e2d819303f3eb1fc85434510f4b0473ee7766996 /drivers/gpu/drm | |
parent | a344a7e7c27776950a70ce4b829a9ac15a212e65 (diff) |
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: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers/gpu/drm')
-rw-r--r-- | drivers/gpu/drm/drm_fops.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/gpu/drm/drm_fops.c b/drivers/gpu/drm/drm_fops.c index c6f5f8951482..d25a61739a7b 100644 --- a/drivers/gpu/drm/drm_fops.c +++ b/drivers/gpu/drm/drm_fops.c | |||
@@ -376,9 +376,6 @@ static void drm_master_release(struct drm_device *dev, struct file *filp) | |||
376 | drm_lock_free(&file_priv->master->lock, | 376 | drm_lock_free(&file_priv->master->lock, |
377 | _DRM_LOCKING_CONTEXT(file_priv->master->lock.hw_lock->lock)); | 377 | _DRM_LOCKING_CONTEXT(file_priv->master->lock.hw_lock->lock)); |
378 | } | 378 | } |
379 | |||
380 | if (drm_core_check_feature(dev, DRIVER_HAVE_DMA)) | ||
381 | drm_core_reclaim_buffers(dev, file_priv); | ||
382 | } | 379 | } |
383 | 380 | ||
384 | static void drm_events_release(struct drm_file *file_priv) | 381 | static void drm_events_release(struct drm_file *file_priv) |
@@ -448,6 +445,9 @@ int drm_release(struct inode *inode, struct file *filp) | |||
448 | if (file_priv->minor->master) | 445 | if (file_priv->minor->master) |
449 | drm_master_release(dev, filp); | 446 | drm_master_release(dev, filp); |
450 | 447 | ||
448 | if (drm_core_check_feature(dev, DRIVER_HAVE_DMA)) | ||
449 | drm_core_reclaim_buffers(dev, file_priv); | ||
450 | |||
451 | drm_events_release(file_priv); | 451 | drm_events_release(file_priv); |
452 | 452 | ||
453 | if (dev->driver->driver_features & DRIVER_MODESET) | 453 | if (dev->driver->driver_features & DRIVER_MODESET) |