W dniu 30.03.2021 o 04:53, Douglas Anderson pisze: > The register() / attach() for MIPI happen in the bridge's > attach(). That means that the inverse belongs in the bridge's > detach(). As I commented in previous patch, it would be better to fix mipi/bridge registration order in host and this driver. Have you considered this? Regards Andrzej > > Signed-off-by: Douglas Anderson <dianders@xxxxxxxxxxxx> > --- > > (no changes since v1) > > drivers/gpu/drm/bridge/ti-sn65dsi86.c | 15 +++++++++------ > 1 file changed, 9 insertions(+), 6 deletions(-) > > diff --git a/drivers/gpu/drm/bridge/ti-sn65dsi86.c b/drivers/gpu/drm/bridge/ti-sn65dsi86.c > index c006678c9921..e8e523b3a16b 100644 > --- a/drivers/gpu/drm/bridge/ti-sn65dsi86.c > +++ b/drivers/gpu/drm/bridge/ti-sn65dsi86.c > @@ -437,7 +437,15 @@ static int ti_sn_bridge_attach(struct drm_bridge *bridge, > > static void ti_sn_bridge_detach(struct drm_bridge *bridge) > { > - drm_dp_aux_unregister(&bridge_to_ti_sn_bridge(bridge)->aux); > + struct ti_sn_bridge *pdata = bridge_to_ti_sn_bridge(bridge); > + > + > + if (pdata->dsi) { > + mipi_dsi_detach(pdata->dsi); > + mipi_dsi_device_unregister(pdata->dsi); > + } > + > + drm_dp_aux_unregister(&pdata->aux); > } > > static void ti_sn_bridge_disable(struct drm_bridge *bridge) > @@ -1315,11 +1323,6 @@ static int ti_sn_bridge_remove(struct i2c_client *client) > if (!pdata) > return -EINVAL; > > - if (pdata->dsi) { > - mipi_dsi_detach(pdata->dsi); > - mipi_dsi_device_unregister(pdata->dsi); > - } > - > kfree(pdata->edid); > > ti_sn_debugfs_remove(pdata); _______________________________________________ dri-devel mailing list dri-devel@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/dri-devel