Skip to content

Commit

Permalink
drm/core: Preserve the framebuffer after removing it.
Browse files Browse the repository at this point in the history
Previously RMFB and fd close chose to disable any plane that had
an active framebuffer from this file. If it was a primary plane the
crtc was disabled. However the fbdev code or any system compositor
should restore the planes anyway so there's no need to do it twice.

The old fb_id is zero'd, so there's no danger of being able to
restore the fb from fb_id.

Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Reviewed-by: David Herrmann <dh.herrmann@gmail.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
  • Loading branch information
Maarten Lankhorst authored and Daniel Vetter committed Sep 24, 2015
1 parent 4dfd648 commit 1380313
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/gpu/drm/drm_crtc.c
Original file line number Diff line number Diff line change
Expand Up @@ -3327,7 +3327,7 @@ int drm_mode_rmfb(struct drm_device *dev,
mutex_unlock(&dev->mode_config.fb_lock);
mutex_unlock(&file_priv->fbs_lock);

drm_framebuffer_remove(fb);
drm_framebuffer_unreference(fb);

return 0;

Expand Down Expand Up @@ -3517,7 +3517,7 @@ void drm_fb_release(struct drm_file *priv)
list_del_init(&fb->filp_head);

/* This will also drop the fpriv->fbs reference. */
drm_framebuffer_remove(fb);
drm_framebuffer_unreference(fb);
}
}

Expand Down

0 comments on commit 1380313

Please sign in to comment.