Skip to content

Commit

Permalink
drm: unconditionally clean up dma buffers of closing clients
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Daniel Vetter authored and Dave Airlie committed Jul 20, 2012
1 parent a344a7e commit 67cb4b4
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions drivers/gpu/drm/drm_fops.c
Original file line number Diff line number Diff line change
Expand Up @@ -376,9 +376,6 @@ static void drm_master_release(struct drm_device *dev, struct file *filp)
drm_lock_free(&file_priv->master->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)
Expand Down Expand Up @@ -448,6 +445,9 @@ int drm_release(struct inode *inode, struct file *filp)
if (file_priv->minor->master)
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);

if (dev->driver->driver_features & DRIVER_MODESET)
Expand Down

0 comments on commit 67cb4b4

Please sign in to comment.