]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commite7a7c6b86dd7f8f4056e93590712464abf59820d
tree1825bba3ffb6f215df63f59ddce80284161d2bd0
parent53222a9a92ec198ecf43f96a62acfd43c99ec258
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: b92a9b607c64 ("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