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