lkml.org 
[lkml]   [2020]   [Dec]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 5.10 144/717] drm/meson: dw-hdmi: Ensure that clocks are enabled before touching the TOP registers
    Date
    From: Marc Zyngier <maz@kernel.org>

    [ Upstream commit b33340e33acdfe5ca6a5aa1244709575ae1e0432 ]

    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
    Signed-off-by: Sasha Levin <sashal@kernel.org>
    ---
    drivers/gpu/drm/meson/meson_dw_hdmi.c | 4 ++--
    1 file changed, 2 insertions(+), 2 deletions(-)

    diff --git a/drivers/gpu/drm/meson/meson_dw_hdmi.c b/drivers/gpu/drm/meson/meson_dw_hdmi.c
    index 68826cf9993fc..7f8eea4941472 100644
    --- a/drivers/gpu/drm/meson/meson_dw_hdmi.c
    +++ b/drivers/gpu/drm/meson/meson_dw_hdmi.c
    @@ -1073,8 +1073,6 @@ static int meson_dw_hdmi_bind(struct device *dev, struct device *master,

    DRM_DEBUG_DRIVER("encoder initialized\n");

    - meson_dw_hdmi_init(meson_dw_hdmi);
    -
    /* Bridge / Connector */

    dw_plat_data->priv_data = meson_dw_hdmi;
    @@ -1097,6 +1095,8 @@ static int meson_dw_hdmi_bind(struct device *dev, struct device *master,
    if (IS_ERR(meson_dw_hdmi->hdmi))
    return PTR_ERR(meson_dw_hdmi->hdmi);

    + meson_dw_hdmi_init(meson_dw_hdmi);
    +
    next_bridge = of_drm_find_bridge(pdev->dev.of_node);
    if (next_bridge)
    drm_bridge_attach(encoder, next_bridge,
    --
    2.27.0


    \
     
     \ /
      Last update: 2020-12-28 15:10    [W:2.022 / U:0.092 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site