diff options
author | Prathyush <prathyush.k@samsung.com> | 2012-04-14 07:52:13 -0400 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2012-04-19 09:40:41 -0400 |
commit | 4e47e02d1ac47b6eb591b2a632a6c059ce3e5002 (patch) | |
tree | e9f67b84304f3fbe4dc54c16251ea21646c0db76 /drivers/gpu | |
parent | 5799d9e2eab20ef694fb92a7636f451e1b0e456c (diff) |
drm: Releasing FBs before releasing GEM objects during drm_release
During DRM release, all the FBs and gem objects are released. If
a gem object is being used as a FB and set to a crtc, it must not
be freed before releasing the framebuffer first.
If FBs are released first, the crtc using the FB is disabled first
so now the GEM object can be freed safely. The CRTC will be enabled
again when the driver restores fbdev mode.
Signed-off-by: Prathyush K <prathyush.k@samsung.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers/gpu')
-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 cdfbf27b2b3c..123de28f94ef 100644 --- a/drivers/gpu/drm/drm_fops.c +++ b/drivers/gpu/drm/drm_fops.c | |||
@@ -507,12 +507,12 @@ int drm_release(struct inode *inode, struct file *filp) | |||
507 | 507 | ||
508 | drm_events_release(file_priv); | 508 | drm_events_release(file_priv); |
509 | 509 | ||
510 | if (dev->driver->driver_features & DRIVER_GEM) | ||
511 | drm_gem_release(dev, file_priv); | ||
512 | |||
513 | if (dev->driver->driver_features & DRIVER_MODESET) | 510 | if (dev->driver->driver_features & DRIVER_MODESET) |
514 | drm_fb_release(file_priv); | 511 | drm_fb_release(file_priv); |
515 | 512 | ||
513 | if (dev->driver->driver_features & DRIVER_GEM) | ||
514 | drm_gem_release(dev, file_priv); | ||
515 | |||
516 | mutex_lock(&dev->ctxlist_mutex); | 516 | mutex_lock(&dev->ctxlist_mutex); |
517 | if (!list_empty(&dev->ctxlist)) { | 517 | if (!list_empty(&dev->ctxlist)) { |
518 | struct drm_ctx_list *pos, *n; | 518 | struct drm_ctx_list *pos, *n; |