diff mbox

drm: don't unlock in the addfb error paths

Message ID 1364417135-30928-1-git-send-email-daniel.vetter@ffwll.ch (mailing list archive)
State New, archived
Headers show

Commit Message

Daniel Vetter March 27, 2013, 8:45 p.m. UTC
We don't grab the modeset locks any more since

commit 468174f748603497e73dba9b5c6d1d9f71121486
Author: Daniel Vetter <daniel.vetter@ffwll.ch>
Date:   Tue Dec 11 00:09:12 2012 +0100

    drm: push modeset_lock_all into ->fb_create driver callbacks

Reported-by: Ray Strode <rstrode@redhat.com>
Cc: Ray Strode <rstrode@redhat.com>
Cc: Dave Airlie <airlied@gmail.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
---
 drivers/gpu/drm/drm_crtc.c |    2 --
 1 file changed, 2 deletions(-)

Comments

Ville Syrjälä March 28, 2013, 10:22 a.m. UTC | #1
On Wed, Mar 27, 2013 at 09:45:35PM +0100, Daniel Vetter wrote:
> We don't grab the modeset locks any more since
> 
> commit 468174f748603497e73dba9b5c6d1d9f71121486
> Author: Daniel Vetter <daniel.vetter@ffwll.ch>
> Date:   Tue Dec 11 00:09:12 2012 +0100
> 
>     drm: push modeset_lock_all into ->fb_create driver callbacks
> 
> Reported-by: Ray Strode <rstrode@redhat.com>
> Cc: Ray Strode <rstrode@redhat.com>
> Cc: Dave Airlie <airlied@gmail.com>
> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>

Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>

> ---
>  drivers/gpu/drm/drm_crtc.c |    2 --
>  1 file changed, 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/drm_crtc.c b/drivers/gpu/drm/drm_crtc.c
> index 792c3e3..dd64a06 100644
> --- a/drivers/gpu/drm/drm_crtc.c
> +++ b/drivers/gpu/drm/drm_crtc.c
> @@ -2326,7 +2326,6 @@ int drm_mode_addfb(struct drm_device *dev,
>  	fb = dev->mode_config.funcs->fb_create(dev, file_priv, &r);
>  	if (IS_ERR(fb)) {
>  		DRM_DEBUG_KMS("could not create framebuffer\n");
> -		drm_modeset_unlock_all(dev);
>  		return PTR_ERR(fb);
>  	}
>  
> @@ -2506,7 +2505,6 @@ int drm_mode_addfb2(struct drm_device *dev,
>  	fb = dev->mode_config.funcs->fb_create(dev, file_priv, r);
>  	if (IS_ERR(fb)) {
>  		DRM_DEBUG_KMS("could not create framebuffer\n");
> -		drm_modeset_unlock_all(dev);
>  		return PTR_ERR(fb);
>  	}
>  
> -- 
> 1.7.10.4
> 
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/dri-devel
Daniel Vetter April 11, 2013, 2:09 p.m. UTC | #2
On Thu, Mar 28, 2013 at 12:22:55PM +0200, Ville Syrjälä wrote:
> On Wed, Mar 27, 2013 at 09:45:35PM +0100, Daniel Vetter wrote:
> > We don't grab the modeset locks any more since
> > 
> > commit 468174f748603497e73dba9b5c6d1d9f71121486
> > Author: Daniel Vetter <daniel.vetter@ffwll.ch>
> > Date:   Tue Dec 11 00:09:12 2012 +0100
> > 
> >     drm: push modeset_lock_all into ->fb_create driver callbacks
> > 
> > Reported-by: Ray Strode <rstrode@redhat.com>
> > Cc: Ray Strode <rstrode@redhat.com>
> > Cc: Dave Airlie <airlied@gmail.com>
> > Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
> 
> Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>

Dave?

> 
> > ---
> >  drivers/gpu/drm/drm_crtc.c |    2 --
> >  1 file changed, 2 deletions(-)
> > 
> > diff --git a/drivers/gpu/drm/drm_crtc.c b/drivers/gpu/drm/drm_crtc.c
> > index 792c3e3..dd64a06 100644
> > --- a/drivers/gpu/drm/drm_crtc.c
> > +++ b/drivers/gpu/drm/drm_crtc.c
> > @@ -2326,7 +2326,6 @@ int drm_mode_addfb(struct drm_device *dev,
> >  	fb = dev->mode_config.funcs->fb_create(dev, file_priv, &r);
> >  	if (IS_ERR(fb)) {
> >  		DRM_DEBUG_KMS("could not create framebuffer\n");
> > -		drm_modeset_unlock_all(dev);
> >  		return PTR_ERR(fb);
> >  	}
> >  
> > @@ -2506,7 +2505,6 @@ int drm_mode_addfb2(struct drm_device *dev,
> >  	fb = dev->mode_config.funcs->fb_create(dev, file_priv, r);
> >  	if (IS_ERR(fb)) {
> >  		DRM_DEBUG_KMS("could not create framebuffer\n");
> > -		drm_modeset_unlock_all(dev);
> >  		return PTR_ERR(fb);
> >  	}
> >  
> > -- 
> > 1.7.10.4
> > 
> > _______________________________________________
> > dri-devel mailing list
> > dri-devel@lists.freedesktop.org
> > http://lists.freedesktop.org/mailman/listinfo/dri-devel
> 
> -- 
> Ville Syrjälä
> Intel OTC
diff mbox

Patch

diff --git a/drivers/gpu/drm/drm_crtc.c b/drivers/gpu/drm/drm_crtc.c
index 792c3e3..dd64a06 100644
--- a/drivers/gpu/drm/drm_crtc.c
+++ b/drivers/gpu/drm/drm_crtc.c
@@ -2326,7 +2326,6 @@  int drm_mode_addfb(struct drm_device *dev,
 	fb = dev->mode_config.funcs->fb_create(dev, file_priv, &r);
 	if (IS_ERR(fb)) {
 		DRM_DEBUG_KMS("could not create framebuffer\n");
-		drm_modeset_unlock_all(dev);
 		return PTR_ERR(fb);
 	}
 
@@ -2506,7 +2505,6 @@  int drm_mode_addfb2(struct drm_device *dev,
 	fb = dev->mode_config.funcs->fb_create(dev, file_priv, r);
 	if (IS_ERR(fb)) {
 		DRM_DEBUG_KMS("could not create framebuffer\n");
-		drm_modeset_unlock_all(dev);
 		return PTR_ERR(fb);
 	}