1 From bae2790f627eb30ec3845167341b108e13328f6f Mon Sep 17 00:00:00 2001
2 From: Samuel Holland <samuel@sholland.org>
3 Date: Sun, 7 Aug 2022 10:46:43 -0500
4 Subject: [PATCH 084/117] drm/sun4i: dsi: Allow panel attach before card
7 Signed-off-by: Samuel Holland <samuel@sholland.org>
9 drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c | 8 ++++----
10 1 file changed, 4 insertions(+), 4 deletions(-)
12 --- a/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c
13 +++ b/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c
14 @@ -967,13 +967,12 @@ static int sun6i_dsi_attach(struct mipi_
17 return PTR_ERR(panel);
18 - if (!dsi->drm || !dsi->drm->registered)
19 - return -EPROBE_DEFER;
24 - drm_kms_helper_hotplug_event(dsi->drm);
25 + if (dsi->drm && dsi->drm->registered)
26 + drm_kms_helper_hotplug_event(dsi->drm);
28 dev_info(host->dev, "Attached device %s\n", device->name);
30 @@ -988,7 +987,8 @@ static int sun6i_dsi_detach(struct mipi_
34 - drm_kms_helper_hotplug_event(dsi->drm);
35 + if (dsi->drm && dsi->drm->registered)
36 + drm_kms_helper_hotplug_event(dsi->drm);