Skip to content

Commit

Permalink
drm/cma-helper: fixup compilation
Browse files Browse the repository at this point in the history
/me grabs a few brown paper bags

So it looks like I've broken compilation in

commit 6aed8ec
Author: Daniel Vetter <daniel.vetter@ffwll.ch>
Date:   Sun Jan 20 17:32:21 2013 +0100

    drm: review locking for drm_fb_helper_restore_fbdev_mode

Fix it up again.

v2: Only deref fbdev_cma once we're sure it's non-NULL, noticed by
Thierry Reding.

Reported-by: Wu Fengguang <fengguang.wu@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Reviewed-by: Thierry Reding <thierry.reding@avionic-design.de>
Signed-off-by: Dave Airlie <airlied@redhat.com>
  • Loading branch information
Daniel Vetter authored and Dave Airlie committed Feb 19, 2013
1 parent 8e26875 commit 8fcb6c4
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions drivers/gpu/drm/drm_fb_cma_helper.c
Original file line number Diff line number Diff line change
Expand Up @@ -377,10 +377,13 @@ EXPORT_SYMBOL_GPL(drm_fbdev_cma_fini);
*/
void drm_fbdev_cma_restore_mode(struct drm_fbdev_cma *fbdev_cma)
{
drm_modeset_lock_all(dev);
if (fbdev_cma)
if (fbdev_cma) {
struct drm_device *dev = fbdev_cma->fb_helper.dev;

drm_modeset_lock_all(dev);
drm_fb_helper_restore_fbdev_mode(&fbdev_cma->fb_helper);
drm_modeset_unlock_all(dev);
drm_modeset_unlock_all(dev);
}
}
EXPORT_SYMBOL_GPL(drm_fbdev_cma_restore_mode);

Expand Down

0 comments on commit 8fcb6c4

Please sign in to comment.