[PATCH] drm/cma-helper: fixup compilation

Thierry Reding thierry.reding at avionic-design.de
Tue Feb 19 02:22:22 PST 2013


On Tue, Feb 19, 2013 at 11:18:04AM +0100, Daniel Vetter wrote:
> /me grabs a few brown paper bags
> 
> So it looks like I've broken compilation in
> 
> commit 6aed8ec3f76a22217c9ae183d32b1aa990bed069
> Author: Daniel Vetter <daniel.vetter at 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 at intel.com>
> Signed-off-by: Daniel Vetter <daniel.vetter at ffwll.ch>
> ---
>  drivers/gpu/drm/drm_fb_cma_helper.c |    9 ++++++---
>  1 file changed, 6 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/gpu/drm/drm_fb_cma_helper.c b/drivers/gpu/drm/drm_fb_cma_helper.c
> index e851658..1c8549d 100644
> --- a/drivers/gpu/drm/drm_fb_cma_helper.c
> +++ b/drivers/gpu/drm/drm_fb_cma_helper.c
> @@ -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);
>  

Reviewed-by: Thierry Reding <thierry.reding at avionic-design.de>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/dri-devel/attachments/20130219/ec19c668/attachment.pgp>


More information about the dri-devel mailing list