Re: [PATCH v5 4/4] drm/tilcdc: Add drm bridge support for attaching drm bridge drivers

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

 



Hi Jyri,

On Tuesday 29 Nov 2016 22:18:56 Jyri Sarha wrote:
> On 11/25/16 11:02, Jyri Sarha wrote:
> > -void tilcdc_remove_external_encoders(struct drm_device *dev)
> > +void tilcdc_remove_external_device(struct drm_device *dev)
> >  {
> >  	struct tilcdc_drm_private *priv = dev->dev_private;
> > -	int i;
> > 
> >  	/* Restore the original helper functions, if any. */
> > -	for (i = 0; i < priv->num_connectors; i++)
> > -		if (IS_ERR(priv->connector_funcs[i]))
> > -			drm_connector_helper_add(priv->connectors[i], NULL);
> > -		else if (priv->connector_funcs[i])
> > -			drm_connector_helper_add(priv->connectors[i],
> > -						 priv->connector_funcs[i]);
> > +	if (IS_ERR(priv->connector_funcs))
> > +		drm_connector_helper_add(priv->external_connector, NULL);
> > +	else if (priv->connector_funcs)
> > +		drm_connector_helper_add(priv->external_connector,
> > +					 priv->connector_funcs);
> 
> I still need to add:
> +
> +       if (priv->external_encoder && priv->external_encoder->bridge)
> +               drm_bridge_detach(priv->external_encoder->bridge);

"drm: bridge: Detach bridge from encoder at encoder cleanup time" :-)

> > +}
> 
> ... and reorder the tilcdc_fini() a bit. I need to put
> tilcdc_remove_external_device() before drm_mode_config_cleanup()
> for drm_bridge_detach() to be called before whole mode config is teared
> apart.
> 
> There is also a bug in tearing down drm debugfs that had to be fixed
> before I got module unload and reload to work properly. I'll send a
> patch shortly.

-- 
Regards,

Laurent Pinchart

_______________________________________________
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