OSDN Git Service

drm/sun4i: dsi: Allow binding the host without a panel
authorSamuel Holland <samuel@sholland.org>
Tue, 11 Feb 2020 07:28:57 +0000 (01:28 -0600)
committerMaxime Ripard <maxime@cerno.tech>
Fri, 14 Feb 2020 15:20:27 +0000 (16:20 +0100)
commit1a2703bd73566dabab7733f14bfd5cce5cabb748
tree1825bba3ffb6f215df63f59ddce80284161d2bd0
parent0e4e3fb4901d19f49e5c0a582f383b10dda8d1c5
drm/sun4i: dsi: Allow binding the host without a panel

Currently, the DSI host blocks binding the display pipeline until the
panel is available. This unnecessarily prevents other display outpus
from working, and adds logspam to dmesg when the panel driver is built
as a module (the component master is unsuccessfully brought up several
times during boot).

Flip the dependency, instead requiring the host to be bound before the
panel is attached. The panel driver provides no functionality outside of
the display pipeline anyway.

Since the panel is now probed after the DRM connector, we need a hotplug
event to turn on the connector after the panel is attached.

This has the added benefit of fixing panel module removal/insertion.
Previously, the panel would be turned off when its module was removed.
But because the connector state was hardcoded, nothing knew to turn the
panel back on when it was re-attached. Now, with hotplug events
available, the connector state will follow the panel module state, and
the panel will be re-enabled properly.

Fixes: 133add5b5ad4 ("drm/sun4i: Add Allwinner A31 MIPI-DSI controller support")
Signed-off-by: Samuel Holland <samuel@sholland.org>
Signed-off-by: Maxime Ripard <maxime@cerno.tech>
Link: https://patchwork.freedesktop.org/patch/msgid/20200211072858.30784-3-samuel@sholland.org
drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c
drivers/gpu/drm/sun4i/sun6i_mipi_dsi.h