From 42d39e364d743b6c2dff02b781f093b2742e970b Mon Sep 17 00:00:00 2001 From: luojiale Date: Thu, 25 May 2023 10:31:54 +0800 Subject: [PATCH] fix(media:mipi) Fix the problem that the dual camera fails to start Summary: The following bugs were fixed vps mipi_host0: port2 busy error vps mipi_host0: require 2lane error!!! Signed-off-by: luojiale --- drivers/media/platform/hobot/mipi/hobot_mipi_host.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/media/platform/hobot/mipi/hobot_mipi_host.c b/drivers/media/platform/hobot/mipi/hobot_mipi_host.c index ccecea56e..75f312af4 100644 --- a/drivers/media/platform/hobot/mipi/hobot_mipi_host.c +++ b/drivers/media/platform/hobot/mipi/hobot_mipi_host.c @@ -899,8 +899,9 @@ static int32_t mipi_host_configure_lanemode(mipi_hdev_t *hdev, int lane) mipierr("port%d not support %dlane", hdev->port, lane); return -1; + } else if ((target_mode == hdev->lane_mode) && (target_mode == 0)) { + goto match_ex_hdev; } - mipiinfo("change group%d lane_mode to %d for %dlane", group, target_mode, lane); if (host->state != MIPI_STATE_DEFAULT) { @@ -923,6 +924,7 @@ static int32_t mipi_host_configure_lanemode(mipi_hdev_t *hdev, int lane) if (poth < MIPI_HOST_MAX_NUM && g_hdev[poth]) g_hdev[poth]->lane_mode = target_mode; +match_ex_hdev: if (target_mode) { if (poth < MIPI_HOST_MAX_NUM && g_hdev[poth] && g_hdev[poth]->host.state == MIPI_STATE_DEFAULT) {