drm/bridge: parade-ps8640: Ensure bridge is suspended in .post_disable()
authorPin-yen Lin <treapking@chromium.org>
Tue, 9 Jan 2024 12:04:57 +0000 (20:04 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 1 Feb 2024 00:19:12 +0000 (16:19 -0800)
commit52044fb2abe8d3891e3ede7330097cf4c4c12cb5
tree47f1987ddc17893ff1df960f28282d5f91cb5f8a
parent4f59acbe0837768b4089d381d853392852ec0999
drm/bridge: parade-ps8640: Ensure bridge is suspended in .post_disable()

[ Upstream commit 26db46bc9c675e43230cc6accd110110a7654299 ]

The ps8640 bridge seems to expect everything to be power cycled at the
disable process, but sometimes ps8640_aux_transfer() holds the runtime
PM reference and prevents the bridge from suspend.

Prevent that by introducing a mutex lock between ps8640_aux_transfer()
and .post_disable() to make sure the bridge is really powered off.

Fixes: 826cff3f7ebb ("drm/bridge: parade-ps8640: Enable runtime power management")
Signed-off-by: Pin-yen Lin <treapking@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>
Signed-off-by: Douglas Anderson <dianders@chromium.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20240109120528.1292601-1-treapking@chromium.org
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/gpu/drm/bridge/parade-ps8640.c