drm/bridge: analogix_dp: simplify and correct PLL lock checks
authorLucas Stach <l.stach@pengutronix.de>
Wed, 19 Jun 2024 18:21:58 +0000 (20:21 +0200)
committerRobert Foss <rfoss@kernel.org>
Thu, 27 Jun 2024 09:52:16 +0000 (11:52 +0200)
commit0fa5e37f874850e4cd09ba45e79ec698f4630da5
tree579e8ceb1f4089c7d6d27b19b0518602d26a7417
parent917c8d192ba6ada16b4cf11c786f3dbfe70de0d9
drm/bridge: analogix_dp: simplify and correct PLL lock checks

Move the wait loop into its own function, so it doesn't need to be
replicated in multiple locations. Also move the PLL lock checks between
setting the link bandwidth, which may cause the PLL to unlock, and the
MACRO_RST which needs the PLL to be locked.

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Reviewed-by: Robert Foss <rfoss@kernel.org>
Tested-by: Heiko Stuebner <heiko@sntech.de>
Signed-off-by: Robert Foss <rfoss@kernel.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20240619182200.3752465-12-l.stach@pengutronix.de
drivers/gpu/drm/bridge/analogix/analogix_dp_core.c
drivers/gpu/drm/bridge/analogix/analogix_dp_core.h
drivers/gpu/drm/bridge/analogix/analogix_dp_reg.c