aboutsummaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/drm_fops.c
diff options
context:
space:
mode:
authorKristian Høgsberg <krh@redhat.com>2009-02-12 14:37:56 -0500
committerDave Airlie <airlied@redhat.com>2009-02-20 12:21:11 +1000
commitea39f835168f60b01e59d0f348da25d297e7cf94 (patch)
tree79a5f3cef511245789ab2e5b7c295b6693861b32 /drivers/gpu/drm/drm_fops.c
parentb4476f52e43fadcb9402723a1a55ba1308757525 (diff)
drm: Release user fbs in drm_release
Avoids leaking fbs and associated buffers on release. Signed-off-by: Kristian Høgsberg <krh@redhat.com> Tested-by: Tested-by: Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by: Eric Anholt <eric@anholt.net> Signed-off-by: Dave Airlie <airlied@linux.ie>
Diffstat (limited to 'drivers/gpu/drm/drm_fops.c')
-rw-r--r--drivers/gpu/drm/drm_fops.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/gpu/drm/drm_fops.c b/drivers/gpu/drm/drm_fops.c
index b06a5371585..6c020fe5431 100644
--- a/drivers/gpu/drm/drm_fops.c
+++ b/drivers/gpu/drm/drm_fops.c
@@ -457,6 +457,9 @@ int drm_release(struct inode *inode, struct file *filp)
if (dev->driver->driver_features & DRIVER_GEM)
drm_gem_release(dev, file_priv);
+ if (dev->driver->driver_features & DRIVER_MODESET)
+ drm_fb_release(file_priv);
+
mutex_lock(&dev->ctxlist_mutex);
if (!list_empty(&dev->ctxlist)) {
struct drm_ctx_list *pos, *n;