drm/mediatek: dsi: Register DSI host after acquiring clocks and PHY
authorAngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Thu, 15 Feb 2024 08:53:13 +0000 (09:53 +0100)
committerChun-Kuang Hu <chunkuang.hu@kernel.org>
Mon, 19 Feb 2024 14:45:06 +0000 (14:45 +0000)
commite4732b590a77318dff134612b013d66d2448ab20
treef86421a915486e8894e704401d1ca66bdb86a601
parentff4e452146295a9311dec3c845a8bf533ed63379
drm/mediatek: dsi: Register DSI host after acquiring clocks and PHY

Registering the dsi host with its ops before getting dsi->regs is
simply wrong: even though there's nothing (for now) asynchronously
calling those ops before the end of the probe function, installing
ops that are using iospace(s) and clocks before even initializing
those is too fragile.

Register the DSI host after getting clocks, iospace and PHY.
This wil also allow to simplify the error paths in a later commit.

Reviewed-by: Alexandre Mergnat <amergnat@baylibre.com>
Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Reviewed-by: CK Hu <ck.hu@mediatek.com>
Link: https://patchwork.kernel.org/project/dri-devel/patch/20240215085316.56835-7-angelogioacchino.delregno@collabora.com/
Signed-off-by: Chun-Kuang Hu <chunkuang.hu@kernel.org>
drivers/gpu/drm/mediatek/mtk_dsi.c