drm/rockchip: dsi2: optimize drive probe process

Put "component_add" in the attach call so that dsi host and dsi device
(panel or bridge) can be regarded as a component as a whole.

dsi calls "mipi_dsi_host_register" so that the panel executes the probe
process or the bridge successfully executes "mipi_dsi_device_register_full"
during the probe process. The panel or bridge triggers "component_add"
by calling mipi_dsi_attach after the probe is successful.

Through the above modifications, you can avoid dsi defer probe infinitely
due to panel configuration errors.

Type: Fix
Redmine ID: N/A
Associated modifications: N/A
Test: N/A

Signed-off-by: Zhibin Huang <zhibin.huang@rock-chips.com>
Change-Id: Ic8782e9902a6133990fca728ab12e530e50b6d68
This commit is contained in:
Zhibin Huang
2024-04-29 09:28:16 +08:00
committed by Tao Huang
parent 50f19f66e6
commit d420d65bec

View File

@@ -1582,12 +1582,19 @@ static int dw_mipi_dsi2_host_attach(struct mipi_dsi_host *host,
dsi2->format = device->format;
dsi2->mode_flags = device->mode_flags;
return 0;
return component_add(dsi2->dev, &dw_mipi_dsi2_ops);
}
static int dw_mipi_dsi2_host_detach(struct mipi_dsi_host *host,
struct mipi_dsi_device *device)
{
struct dw_mipi_dsi2 *dsi2 = host_to_dsi2(host);
if (dsi2->master)
return 0;
component_del(dsi2->dev, &dw_mipi_dsi2_ops);
return 0;
}
@@ -1828,7 +1835,7 @@ static int dw_mipi_dsi2_probe(struct platform_device *pdev)
return ret;
}
return component_add(&pdev->dev, &dw_mipi_dsi2_ops);
return 0;
}
static int dw_mipi_dsi2_remove(struct platform_device *pdev)