@@ -227,7 +227,11 @@ static int feiyang_dsi_probe(struct mipi_dsi_device *dsi)
dsi->format = MIPI_DSI_FMT_RGB888;
dsi->lanes = 4;
- return mipi_dsi_attach(dsi);
+ ret = mipi_dsi_attach(dsi);
+ if (ret < 0)
+ drm_panel_remove(&ctx->panel);
+
+ return ret;
}
static int feiyang_dsi_remove(struct mipi_dsi_device *dsi)
@@ -674,7 +674,11 @@ static int ili9881c_dsi_probe(struct mipi_dsi_device *dsi)
dsi->format = MIPI_DSI_FMT_RGB888;
dsi->lanes = 4;
- return mipi_dsi_attach(dsi);
+ ret = mipi_dsi_attach(dsi);
+ if (ret < 0)
+ drm_panel_remove(&ctx->panel);
+
+ return ret;
}
static int ili9881c_dsi_remove(struct mipi_dsi_device *dsi)
@@ -495,7 +495,13 @@ static int innolux_panel_probe(struct mipi_dsi_device *dsi)
if (err < 0)
return err;
- return mipi_dsi_attach(dsi);
+ err = mipi_dsi_attach(dsi);
+ if (err < 0) {
+ struct innolux_panel *innolux = mipi_dsi_get_drvdata(dsi);
+ innolux_panel_del(innolux);
+ }
+
+ return err;
}
static int innolux_panel_remove(struct mipi_dsi_device *dsi)
@@ -473,7 +473,11 @@ static int jdi_panel_probe(struct mipi_dsi_device *dsi)
if (ret < 0)
return ret;
- return mipi_dsi_attach(dsi);
+ ret = mipi_dsi_attach(dsi);
+ if (ret < 0)
+ jdi_panel_del(jdi);
+
+ return ret;
}
static int jdi_panel_remove(struct mipi_dsi_device *dsi)
@@ -406,7 +406,11 @@ static int kingdisplay_panel_probe(struct mipi_dsi_device *dsi)
if (err < 0)
return err;
- return mipi_dsi_attach(dsi);
+ err = mipi_dsi_attach(dsi);
+ if (err < 0)
+ drm_panel_remove(kingdisplay);
+
+ return err;
}
static int kingdisplay_panel_remove(struct mipi_dsi_device *dsi)
@@ -656,7 +656,11 @@ static int nt36672a_panel_probe(struct mipi_dsi_device *dsi)
if (err < 0)
return err;
- return mipi_dsi_attach(dsi);
+ err = mipi_dsi_attach(dsi);
+ if (err < 0)
+ drm_panel_remove(&pinfo->base);
+
+ return err;
}
static int nt36672a_panel_remove(struct mipi_dsi_device *dsi)
@@ -241,7 +241,11 @@ static int wuxga_nt_panel_probe(struct mipi_dsi_device *dsi)
if (ret < 0)
return ret;
- return mipi_dsi_attach(dsi);
+ ret = mipi_dsi_attach(dsi);
+ if (ret < 0)
+ wuxga_nt_panel_del(wuxga_nt);
+
+ return ret;
}
static int wuxga_nt_panel_remove(struct mipi_dsi_device *dsi)
@@ -199,7 +199,11 @@ static int rb070d30_panel_dsi_probe(struct mipi_dsi_device *dsi)
dsi->format = MIPI_DSI_FMT_RGB888;
dsi->lanes = 4;
- return mipi_dsi_attach(dsi);
+ ret = mipi_dsi_attach(dsi);
+ if (ret < 0)
+ drm_panel_remove(&ctx->panel);
+
+ return ret;
}
static int rb070d30_panel_dsi_remove(struct mipi_dsi_device *dsi)
@@ -296,7 +296,11 @@ static int sharp_nt_panel_probe(struct mipi_dsi_device *dsi)
if (ret < 0)
return ret;
- return mipi_dsi_attach(dsi);
+ ret = mipi_dsi_attach(dsi);
+ if (ret < 0)
+ sharp_nt_panel_del(sharp_nt);
+
+ return ret;
}
static int sharp_nt_panel_remove(struct mipi_dsi_device *dsi)
@@ -384,7 +384,11 @@ static int st7701_dsi_probe(struct mipi_dsi_device *dsi)
st7701->dsi = dsi;
st7701->desc = desc;
- return mipi_dsi_attach(dsi);
+ ret = mipi_dsi_attach(dsi);
+ if (ret < 0)
+ drm_panel_remove(&st7701->panel);
+
+ return ret;
}
static int st7701_dsi_remove(struct mipi_dsi_device *dsi)
@@ -207,7 +207,11 @@ static int tdo_tl070wsh30_panel_probe(struct mipi_dsi_device *dsi)
if (err < 0)
return err;
- return mipi_dsi_attach(dsi);
+ err = mipi_dsi_attach(dsi);
+ if (err < 0)
+ drm_panel_remove(&tdo_tl070wsh30->base);
+
+ return err;
}
static int tdo_tl070wsh30_panel_remove(struct mipi_dsi_device *dsi)
If mipi_dsi_attach fail the panel must be removed from panel list because it get be probed back but later for -EPROBE_DEFER. A lot of panels are affect on same issue, fix them all Signed-off-by: Michael Trimarchi <michael@amarulasolutions.com> --- drivers/gpu/drm/panel/panel-feiyang-fy07024di26a30d.c | 6 +++++- drivers/gpu/drm/panel/panel-ilitek-ili9881c.c | 6 +++++- drivers/gpu/drm/panel/panel-innolux-p079zca.c | 8 +++++++- drivers/gpu/drm/panel/panel-jdi-lt070me05000.c | 6 +++++- drivers/gpu/drm/panel/panel-kingdisplay-kd097d04.c | 6 +++++- drivers/gpu/drm/panel/panel-novatek-nt36672a.c | 6 +++++- drivers/gpu/drm/panel/panel-panasonic-vvx10f034n00.c | 6 +++++- drivers/gpu/drm/panel/panel-ronbo-rb070d30.c | 6 +++++- drivers/gpu/drm/panel/panel-sharp-ls043t1le01.c | 6 +++++- drivers/gpu/drm/panel/panel-sitronix-st7701.c | 6 +++++- drivers/gpu/drm/panel/panel-tdo-tl070wsh30.c | 6 +++++- 11 files changed, 57 insertions(+), 11 deletions(-)