Re: [Intel-gfx] [PATCH 3/5] drm/crtc: take references to connectors used in a modeset.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Apr 27, 2016 at 09:34:34AM +0200, Daniel Vetter wrote:
> On Wed, Apr 27, 2016 at 12:03:27PM +1000, Dave Airlie wrote:
> > From: Dave Airlie <airlied@xxxxxxxxxx>
> > 
> > This just takes a reference on the connector when we set a mode
> > in the non-atomic paths.
> > 
> > Signed-off-by: Dave Airlie <airlied@xxxxxxxxxx>
> 
> Reviewed-by: Daniel Vetter <daniel.vetter@xxxxxxxx>

Ok I feel real silly now reading Daniel Stone's reply ;-) r-b retracted
...

Cheers, Daniel
> 
> > ---
> >  drivers/gpu/drm/drm_crtc_helper.c | 6 ++++++
> >  1 file changed, 6 insertions(+)
> > 
> > diff --git a/drivers/gpu/drm/drm_crtc_helper.c b/drivers/gpu/drm/drm_crtc_helper.c
> > index 66ca313..29b7835 100644
> > --- a/drivers/gpu/drm/drm_crtc_helper.c
> > +++ b/drivers/gpu/drm/drm_crtc_helper.c
> > @@ -456,6 +456,9 @@ drm_crtc_helper_disable(struct drm_crtc *crtc)
> >  			 * between them is henceforth no longer available.
> >  			 */
> >  			connector->dpms = DRM_MODE_DPMS_OFF;
> > +
> > +			/* we keep a reference while the encoder is bound */
> > +			drm_connector_unreference(connector);
> >  		}
> >  	}
> >  
> > @@ -635,9 +638,12 @@ int drm_crtc_helper_set_config(struct drm_mode_set *set)
> >  			mode_changed = true;
> >  			/* If the encoder is reused for another connector, then
> >  			 * the appropriate crtc will be set later.
> > +			 * take a reference only if we haven't had an encoder before.
> >  			 */
> >  			if (connector->encoder)
> >  				connector->encoder->crtc = NULL;
> > +			else
> > +				drm_connector_reference(connector);
> >  			connector->encoder = new_encoder;
> >  		}
> >  	}
> > -- 
> > 2.5.5
> > 
> > _______________________________________________
> > Intel-gfx mailing list
> > Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
> > https://lists.freedesktop.org/mailman/listinfo/intel-gfx
> 
> -- 
> Daniel Vetter
> Software Engineer, Intel Corporation
> http://blog.ffwll.ch

-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/dri-devel




[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux