Am Freitag, den 17.06.2016, 12:13 +0200 schrieb Lucas Stach: > Instead let drm_mode_config_cleanup() do the work when taking down > the master device. This requires all cleanup functions to be > properly hooked up to the mode object .destroy callback. > > Signed-off-by: Lucas Stach <l.stach@xxxxxxxxxxxxxx> > --- > drivers/gpu/drm/bridge/dw-hdmi.c | 3 --- > drivers/gpu/drm/imx/imx-drm-core.c | 4 ++-- > drivers/gpu/drm/imx/imx-ldb.c | 6 ------ > drivers/gpu/drm/imx/imx-tve.c | 3 --- > drivers/gpu/drm/imx/ipuv3-crtc.c | 9 ++++++--- > drivers/gpu/drm/imx/parallel-display.c | 3 --- > 6 files changed, 8 insertions(+), 20 deletions(-) > > diff --git a/drivers/gpu/drm/bridge/dw-hdmi.c b/drivers/gpu/drm/bridge/dw-hdmi.c > index c9d941283d30..5f97977f7e5c 100644 > --- a/drivers/gpu/drm/bridge/dw-hdmi.c > +++ b/drivers/gpu/drm/bridge/dw-hdmi.c > @@ -1834,9 +1834,6 @@ void dw_hdmi_unbind(struct device *dev, struct device *master, void *data) > /* Disable all interrupts */ > hdmi_writeb(hdmi, ~0, HDMI_IH_MUTE_PHY_STAT0); > > - hdmi->connector.funcs->destroy(&hdmi->connector); > - hdmi->encoder->funcs->destroy(hdmi->encoder); > - > clk_disable_unprepare(hdmi->iahb_clk); > clk_disable_unprepare(hdmi->isfr_clk); > i2c_put_adapter(hdmi->ddc); The rockchip driver already calls drm_mode_config_cleanup after component_unbind_all, so I this change should work for the rockchip driver as is? > diff --git a/drivers/gpu/drm/imx/imx-drm-core.c b/drivers/gpu/drm/imx/imx-drm-core.c > index 799a68976590..71e33666cae8 100644 > --- a/drivers/gpu/drm/imx/imx-drm-core.c > +++ b/drivers/gpu/drm/imx/imx-drm-core.c > @@ -466,11 +466,11 @@ static void imx_drm_unbind(struct device *dev) > if (fbhelper) > drm_fbdev_cma_fini(fbhelper); > > + drm_mode_config_cleanup(drm); > + > component_unbind_all(drm->dev, drm); > dev_set_drvdata(dev, NULL); > > - drm_mode_config_cleanup(drm); > - > drm_dev_unref(drm); > } regards Philipp _______________________________________________ dri-devel mailing list dri-devel@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/dri-devel