[Outreachy kernel] Re: [PATCH] drm/amd/amdgpu/amdgpu_drv.c: Replace drm_modeset_lock_all with drm_modeset_lock

Fabio M. De Francesco fmdefrancesco at gmail.com
Mon Apr 26 19:06:10 UTC 2021


On Monday, April 26, 2021 6:11:11 PM CEST Daniel Vetter wrote:
> On Thu, Apr 22, 2021 at 05:50:34PM +0100, Matthew Wilcox wrote:
> > On Thu, Apr 22, 2021 at 05:59:51PM +0200, Fabio M. De Francesco wrote:
> > > -		drm_modeset_lock_all(drm_dev);
> > > -
> > > 
> > >  		drm_for_each_crtc(crtc, drm_dev) {
> > > 
> > > +			drm_modeset_lock(&crtc->mutex, NULL);
> > > 
> > >  			if (crtc->state->active) {
> > >  			
> > >  				ret = -EBUSY;
> > > 
> > > -				break;
> > > 
> > >  			}
> > > 
> > > +			drm_modeset_unlock(&crtc->mutex);
> > > +			if (ret < 0)
> > > +				break;
> > > 
> > >  		}
> > > 
> > > -		drm_modeset_unlock_all(drm_dev);
> > > -
> > 
> > I might remove the {} around ret = -EBUSY, but this is good.
> > 
> > Reviewed-by: Matthew Wilcox (Oracle) <willy at infradead.org>
> 
> Yup patch looks good, but it's not cc'ed to drm/amdgpu maintainers/m-l, so
> likely won't get picked up. Can you pls check scripts/get_maintainers for
> anything you've missed, add those and resend with Willy's r-b tag
> included?
> 
> Then Alex can pick it up for merging.
> 
> Thanks, Daniel
>
I had already submitted a v2 of this patch with an added 'Review-by' Matthew 
Wilcox under my name. It removed the unnecessary braces that willy pointed 
out. However I see that not all maintainers had been cc'ed, so I'm going to  
resend it as v3.

Thanks,

Fabio







More information about the dri-devel mailing list