• Linus Walleij's avatar
    drm/mcde: Fix display pipeline restart · c4842d4d
    Linus Walleij authored
    To make sure that the MCDE is in a reasonable state during
    set-up, perform a reset by power cycling the block by dropping
    the on-chip regulator reference after probe. The display
    subsystem (DSS) has no dedicated reset line so dropping
    the EPOD regulator is the only real way of resetting it.
    
    We introduce code to enable and disable the regulator in
    the display enable/disable callbacks.
    
    We move the generic MCDE setup such as muxing of DPI
    signals and masking of interrupts to the display
    handling.
    
    When we drop the power to the whole display subsystem, not
    only MCDE but also the DSI links lose their state. Therefore
    we move the DSI block reset and hardware initialization
    code to the mcde_dsi_bridge_pre_enable() callback so this
    happens every time we start up the bridge, as we may have
    lost the power.
    
    We move the final disablement of the interrupts and
    clocks to the mcde_dsi_bridge_post_disable() callback
    rather than have it in the mcde_dsi_bridge_disable()
    callback, as some control messages may still be sent
    over the DSI host after the bridge has been shut down.
    
    This (together with a patch for the corresponding
    panel) makes the Samsung GT-S7710 successfully disable
    and re-enable its display, cutting all power while
    disabled and re-initializing the hardware when coming
    back up.
    Acked-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
    Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
    Cc: newbytee@protonmail.com
    Cc: Stephan Gerhold <stephan@gerhold.net>
    Link: https://patchwork.freedesktop.org/patch/msgid/20200808223122.1492124-3-linus.walleij@linaro.org
    c4842d4d
mcde_display.c 31.9 KB