mirror of
https://github.com/Fishwaldo/build.git
synced 2025-03-29 02:01:21 +00:00
Add overlay for the 1024x600 7" LCD from Pine64 to use it on pine64/pine64so boards. Signed-off-by: Icenowy Zheng <icenowy@aosc.io>
39 lines
1.3 KiB
Diff
39 lines
1.3 KiB
Diff
From c1f367a69854abc4c359c98645ce47d550285344 Mon Sep 17 00:00:00 2001
|
|
From: Icenowy Zheng <icenowy@aosc.io>
|
|
Date: Sat, 28 Nov 2020 20:49:38 +0800
|
|
Subject: [PATCH] drm/panel: feiyang-fy07024di26a30d: cleanup if panel
|
|
attaching failed
|
|
|
|
Attaching the panel can fail, so cleanup work is necessary, otherwise
|
|
a pointer to freed struct drm_panel* will remain in drm_panel code.
|
|
|
|
Do the cleanup if panel attaching failed.
|
|
|
|
Fixes: 69dc678abc2b ("drm/panel: Add Feiyang FY07024DI26A30-D MIPI-DSI LCD panel")
|
|
Signed-off-by: Icenowy Zheng <icenowy@aosc.io>
|
|
---
|
|
drivers/gpu/drm/panel/panel-feiyang-fy07024di26a30d.c | 8 +++++++-
|
|
1 file changed, 7 insertions(+), 1 deletion(-)
|
|
|
|
diff --git a/drivers/gpu/drm/panel/panel-feiyang-fy07024di26a30d.c b/drivers/gpu/drm/panel/panel-feiyang-fy07024di26a30d.c
|
|
index 581661b506f8..f9c1f7bc8218 100644
|
|
--- a/drivers/gpu/drm/panel/panel-feiyang-fy07024di26a30d.c
|
|
+++ b/drivers/gpu/drm/panel/panel-feiyang-fy07024di26a30d.c
|
|
@@ -227,7 +227,13 @@ 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;
|
|
+ }
|
|
+
|
|
+ return 0;
|
|
}
|
|
|
|
static int feiyang_dsi_remove(struct mipi_dsi_device *dsi)
|
|
--
|
|
2.28.0
|
|
|