Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

drm/meson: dw-hdmi: Ensure that clocks are enabled before touching the TOP registers

Removing the meson-dw-hdmi module and re-inserting it results in a hang
as the driver writes to HDMITX_TOP_SW_RESET. Similar effects can be seen
when booting with mainline u-boot and using the u-boot provided DT (which
is highly desirable).

The reason for the hang seem to be that the clocks are not always
enabled by the time we enter meson_dw_hdmi_init(). Moving this call
*after* dw_hdmi_probe() ensures that the clocks are enabled.

Fixes: 1374b8375c2e ("drm/meson: dw_hdmi: add resume/suspend hooks")
Signed-off-by: Marc Zyngier <maz@kernel.org>
Acked-by: Neil Armstrong <narmstrong@baylibre.com>
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20201116200744.495826-5-maz@kernel.org

authored by

Marc Zyngier and committed by
Neil Armstrong
b33340e3 0405f94a

+2 -2
+2 -2
drivers/gpu/drm/meson/meson_dw_hdmi.c
··· 1073 1073 1074 1074 DRM_DEBUG_DRIVER("encoder initialized\n"); 1075 1075 1076 - meson_dw_hdmi_init(meson_dw_hdmi); 1077 - 1078 1076 /* Bridge / Connector */ 1079 1077 1080 1078 dw_plat_data->priv_data = meson_dw_hdmi; ··· 1094 1096 &meson_dw_hdmi->dw_plat_data); 1095 1097 if (IS_ERR(meson_dw_hdmi->hdmi)) 1096 1098 return PTR_ERR(meson_dw_hdmi->hdmi); 1099 + 1100 + meson_dw_hdmi_init(meson_dw_hdmi); 1097 1101 1098 1102 next_bridge = of_drm_find_bridge(pdev->dev.of_node); 1099 1103 if (next_bridge)