]> www.infradead.org Git - users/jedix/linux-maple.git/commit
drm/mediatek: mtk_dpi: Add support for DPI input clock from HDMI
authorAngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Mon, 17 Feb 2025 15:48:00 +0000 (16:48 +0100)
committerChun-Kuang Hu <chunkuang.hu@kernel.org>
Sun, 2 Mar 2025 11:19:49 +0000 (11:19 +0000)
commit713ee441445af282f11e00b7ff950aa3738b0a1e
tree56a5cd670f5ed992772845aabef3245e60fbbab6
parentc90876a695dd83e76680b88b40067275a5982811
drm/mediatek: mtk_dpi: Add support for DPI input clock from HDMI

On some SoCs, like MT8195 and MT8188, the DPI instance that is
reserved to the HDMI Transmitter uses a different clock topology.

In this case, the DPI is clocked by the HDMI IP, and this outputs
its clock to the MM input of dpi_pixel_clk, which is essential to
enable register access to the DPI IP.

Add a `clocked_by_hdmi` member to struct mtk_dpi_conf, and check
it to avoid enabling the DPI clocks in the mediatek-drm internal
.start() callback (and avoid disabing in the .stop() component
callback): this will make sure that the clock configuration
sequence is respected during display pipeline setup by following
the bridge ops between DPI and HDMI, where the HDMI driver is
expected to enable the clocks in the bridge's pre_enable(), and
DPI in the enable() cb.

Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Reviewed-by: CK Hu <ck.hu@mediatek.com>
Signed-off-by: Chun-Kuang Hu <chunkuang.hu@kernel.org>
drivers/gpu/drm/mediatek/mtk_dpi.c