]> git.itanic.dy.fi Git - linux-stable/commit
drm/rockchip: dsi: Clean up 'usage_mode' when failing to attach
authorBrian Norris <briannorris@chromium.org>
Thu, 20 Oct 2022 00:03:48 +0000 (17:03 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 10 Nov 2022 17:15:42 +0000 (18:15 +0100)
commitdd955eb4e616e308597ecf3bac4d8aabc7cd2941
tree7dfc263811d9e41b6e338e826196f0282f1d8ba1
parentcfa8a89af9f22ae9641ced992b4fe3ec4e6f4f09
drm/rockchip: dsi: Clean up 'usage_mode' when failing to attach

commit 0be67e0556e469c57100ffe3c90df90abc796f3b upstream.

If we fail to attach the first time (especially: EPROBE_DEFER), we fail
to clean up 'usage_mode', and thus will fail to attach on any subsequent
attempts, with "dsi controller already in use".

Re-set to DW_DSI_USAGE_IDLE on attach failure.

This is especially common to hit when enabling asynchronous probe on a
duel-DSI system (such as RK3399 Gru/Scarlet), such that we're more
likely to fail dw_mipi_dsi_rockchip_find_second() the first time.

Fixes: 71f68fe7f121 ("drm/rockchip: dsi: add ability to work as a phy instead of full dsi")
Cc: <stable@vger.kernel.org>
Signed-off-by: Brian Norris <briannorris@chromium.org>
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Link: https://patchwork.freedesktop.org/patch/msgid/20221019170255.1.Ia68dfb27b835d31d22bfe23812baf366ee1c6eac@changeid
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/gpu/drm/rockchip/dw-mipi-dsi-rockchip.c