OSDN Git Service

drm/mcde: Fix display pipeline restart
authorLinus Walleij <linus.walleij@linaro.org>
Sat, 8 Aug 2020 22:31:21 +0000 (00:31 +0200)
committerLinus Walleij <linus.walleij@linaro.org>
Thu, 13 Aug 2020 14:39:19 +0000 (16:39 +0200)
commitc4842d4d0f744bf419a1b011fa3ce0ed98fcdc10
tree3e67ddaa1882b3460dc685c87edd6d3a12c8d7c2
parentf6fd1d70609ca691ee5dc0d2748b6eeaa57a9535
drm/mcde: Fix display pipeline restart

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: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Linus 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
drivers/gpu/drm/mcde/mcde_display.c
drivers/gpu/drm/mcde/mcde_drm.h
drivers/gpu/drm/mcde/mcde_drv.c
drivers/gpu/drm/mcde/mcde_dsi.c