drm/mediatek: Allow commands to be sent during video mode
authorJulien STEPHAN <jstephan@baylibre.com>
Mon, 14 Feb 2022 09:27:42 +0000 (10:27 +0100)
committerChun-Kuang Hu <chunkuang.hu@kernel.org>
Wed, 16 Feb 2022 15:29:29 +0000 (23:29 +0800)
commit81cc7e51c4f1686b71e30046437056ece6b2cb4d
treef4416599b2e6c974e82b224d983deafd3e8a2a1f
parente7dcfe64204a5cd9a74a9ca7d9c7a22434dc7fe5
drm/mediatek: Allow commands to be sent during video mode

Mipi dsi panel drivers can use mipi_dsi_dcs_{set,get}_display_brightness()
to request backlight changes.

This can be done during panel initialization (dsi is in command mode)
or afterwards (dsi is in Video Mode).

When the DSI is in Video Mode, all commands are rejected.

Detect current DSI mode in mtk_dsi_host_transfer() and switch modes
temporarily to allow commands to be sent.

Signed-off-by: Julien STEPHAN <jstephan@baylibre.com>
Signed-off-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Signed-off-by: Chun-Kuang Hu <chunkuang.hu@kernel.org>
drivers/gpu/drm/mediatek/mtk_dsi.c