linux/drivers/gpu/drm/omapdrm/dss
Tomi Valkeinen dfd2edccfd drm/omap: dsi: allow DSI commands to be sent early
Panel drivers can send DSI commands in panel's prepare(), which happens
before the bridge's enable() is called. The OMAP DSI driver currently
only sets up the DSI interface at bridge's enable(), so prepare() cannot
be used to send DSI commands.

This patch fixes the issue by making it possible to enable the DSI
interface any time a command is about to be sent. Disabling the
interface is be done via delayed work.

Clarifications for the delayed disable work and the panel doing DSI
transactions:

bridge_enable: If the disable callback is called just before
bridge_enable takes the dsi_bus_lock, no problem, bridge_enable just
enables the interface again. If the callback is ran just after
bridge_enable's dsi_bus_unlock, no problem, dsi->video_enabled == true
so the callback does nothing.

bridge_disable: similar to bridge-enable, the callback won't do anything
if video_enabled == true, and after bridge-disable has turned the video
and the interface off, there's nothing to do for the callback.

omap_dsi_host_detach: this is called when the panel does
mipi_dsi_detach(), and we expect the panel to _not_ do any DSI
transactions after (or during) mipi_dsi_detatch(), so there are no
race conditions.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Reviewed-by: Sebastian Reichel <sebastian.reichel@collabora.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20201215104657.802264-85-tomi.valkeinen@ti.com
2020-12-15 16:17:32 +02:00
..
base.c drm/omap: remove dispc_ops 2020-12-15 16:15:06 +02:00
dispc_coefs.c drm: omapdrm: Replace HTTP links with HTTPS ones 2020-11-10 14:41:22 +02:00
dispc.c drm/omap: remove dispc_ops 2020-12-15 16:15:06 +02:00
dispc.h drm: omapdrm: Replace HTTP links with HTTPS ones 2020-11-10 14:41:22 +02:00
dpi.c drm/omap: drop unused owner field 2020-12-15 16:08:27 +02:00
dsi.c drm/omap: dsi: allow DSI commands to be sent early 2020-12-15 16:17:32 +02:00
dsi.h drm/omap: dsi: allow DSI commands to be sent early 2020-12-15 16:17:32 +02:00
dss.c drm/omap: squash omapdrm sub-modules into one 2020-12-15 16:08:27 +02:00
dss.h drm/omap: remove dss_mgr_ops 2020-12-15 16:17:30 +02:00
hdmi4_cec.c drm: omapdrm: Replace HTTP links with HTTPS ones 2020-11-10 14:41:22 +02:00
hdmi4_cec.h omapdrm: hdmi4_cec: add OMAP4 HDMI CEC support 2017-10-12 10:49:14 +03:00
hdmi4_core.c drm: omapdrm: Replace HTTP links with HTTPS ones 2020-11-10 14:41:22 +02:00
hdmi4_core.h drm: omapdrm: Replace HTTP links with HTTPS ones 2020-11-10 14:41:22 +02:00
hdmi4.c drm/omap: drop unused owner field 2020-12-15 16:08:27 +02:00
hdmi5_core.c drm: omapdrm: Replace HTTP links with HTTPS ones 2020-11-10 14:41:22 +02:00
hdmi5_core.h drm: omapdrm: Replace HTTP links with HTTPS ones 2020-11-10 14:41:22 +02:00
hdmi5.c drm/omap: drop unused owner field 2020-12-15 16:08:27 +02:00
hdmi_common.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
hdmi_phy.c drm: omapdrm: Replace HTTP links with HTTPS ones 2020-11-10 14:41:22 +02:00
hdmi_pll.c drm: omapdrm: Replace HTTP links with HTTPS ones 2020-11-10 14:41:22 +02:00
hdmi_wp.c drm: omapdrm: Replace HTTP links with HTTPS ones 2020-11-10 14:41:22 +02:00
hdmi.h drm: omapdrm: Replace HTTP links with HTTPS ones 2020-11-10 14:41:22 +02:00
omapdss.h drm/omap: dsi: move structs & defines to dsi.h 2020-12-15 16:17:31 +02:00
output.c drm/omap: remove dss_mgr_ops 2020-12-15 16:17:30 +02:00
pll.c drm/omap: pll: fix iteration loop check 2020-12-15 16:17:30 +02:00
sdi.c drm/omap: drop unused owner field 2020-12-15 16:08:27 +02:00
venc.c drm/omap: drop unused owner field 2020-12-15 16:08:27 +02:00
video-pll.c drm: omapdrm: Replace HTTP links with HTTPS ones 2020-11-10 14:41:22 +02:00