From: Osama Abdelkader <osama.abdelkader@gmail.com>
To: luca.ceresoli@bootlin.com,
Neil Armstrong <neil.armstrong@linaro.org>,
Jessica Zhang <jesszhan0024@gmail.com>,
Maarten Lankhorst <maarten.lankhorst@linux.intel.com>,
Maxime Ripard <mripard@kernel.org>,
Thomas Zimmermann <tzimmermann@suse.de>,
David Airlie <airlied@gmail.com>, Simona Vetter <simona@ffwll.ch>,
Artur Weber <aweber.kernel@gmail.com>,
David Heidelberg <david@ixit.cz>,
Dzmitry Sankouski <dsankouski@gmail.com>,
Yedaya Katsman <yedaya.ka@gmail.com>,
Casey Connolly <casey.connolly@linaro.org>,
dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org
Cc: Osama Abdelkader <osama.abdelkader@gmail.com>
Subject: [PATCH v3 2/6] drm/panel: Use devm_mipi_dsi_attach in Samsung panels
Date: Wed, 12 Aug 2026 15:04:19 +0200 [thread overview]
Message-ID: <20260812130429.16850-2-osama.abdelkader@gmail.com> (raw)
In-Reply-To: <20260812130429.16850-1-osama.abdelkader@gmail.com>
Use the managed MIPI DSI attach helper in Samsung panel drivers and drop
the corresponding manual detach calls from remove paths.
Signed-off-by: Osama Abdelkader <osama.abdelkader@gmail.com>
---
v3:
- Move the changelog after the `---`.
v2:
- break long description lines.
- add Signed-off-by tag
drivers/gpu/drm/panel/panel-samsung-s6d16d0.c | 4 +---
drivers/gpu/drm/panel/panel-samsung-s6d7aa0.c | 8 +-------
drivers/gpu/drm/panel/panel-samsung-s6e3fa7.c | 8 +-------
drivers/gpu/drm/panel/panel-samsung-s6e3fc2x01.c | 8 +-------
drivers/gpu/drm/panel/panel-samsung-s6e3ha2.c | 4 +---
drivers/gpu/drm/panel/panel-samsung-s6e3ha8.c | 8 +-------
drivers/gpu/drm/panel/panel-samsung-s6e63j0x03.c | 4 +---
drivers/gpu/drm/panel/panel-samsung-s6e63m0-dsi.c | 3 +--
drivers/gpu/drm/panel/panel-samsung-s6e88a0-ams427ap24.c | 8 +-------
drivers/gpu/drm/panel/panel-samsung-s6e88a0-ams452ef01.c | 8 +-------
drivers/gpu/drm/panel/panel-samsung-s6e8aa0.c | 4 +---
drivers/gpu/drm/panel/panel-samsung-s6e8fc0-m1906f9.c | 8 +-------
drivers/gpu/drm/panel/panel-samsung-sofef00.c | 8 +-------
13 files changed, 13 insertions(+), 70 deletions(-)
diff --git a/drivers/gpu/drm/panel/panel-samsung-s6d16d0.c b/drivers/gpu/drm/panel/panel-samsung-s6d16d0.c
index 54a65abf7e89..8b6d39636f50 100644
--- a/drivers/gpu/drm/panel/panel-samsung-s6d16d0.c
+++ b/drivers/gpu/drm/panel/panel-samsung-s6d16d0.c
@@ -209,7 +209,7 @@ static int s6d16d0_probe(struct mipi_dsi_device *dsi)
drm_panel_add(&s6->panel);
- ret = mipi_dsi_attach(dsi);
+ ret = devm_mipi_dsi_attach(&dsi->dev, dsi);
if (ret < 0)
drm_panel_remove(&s6->panel);
@@ -219,8 +219,6 @@ static int s6d16d0_probe(struct mipi_dsi_device *dsi)
static void s6d16d0_remove(struct mipi_dsi_device *dsi)
{
struct s6d16d0 *s6 = mipi_dsi_get_drvdata(dsi);
-
- mipi_dsi_detach(dsi);
drm_panel_remove(&s6->panel);
}
diff --git a/drivers/gpu/drm/panel/panel-samsung-s6d7aa0.c b/drivers/gpu/drm/panel/panel-samsung-s6d7aa0.c
index 692020081524..1f070a99521a 100644
--- a/drivers/gpu/drm/panel/panel-samsung-s6d7aa0.c
+++ b/drivers/gpu/drm/panel/panel-samsung-s6d7aa0.c
@@ -438,7 +438,7 @@ static int s6d7aa0_probe(struct mipi_dsi_device *dsi)
drm_panel_add(&ctx->panel);
- ret = mipi_dsi_attach(dsi);
+ ret = devm_mipi_dsi_attach(&dsi->dev, dsi);
if (ret < 0) {
dev_err(dev, "Failed to attach to DSI host: %d\n", ret);
drm_panel_remove(&ctx->panel);
@@ -451,12 +451,6 @@ static int s6d7aa0_probe(struct mipi_dsi_device *dsi)
static void s6d7aa0_remove(struct mipi_dsi_device *dsi)
{
struct s6d7aa0 *ctx = mipi_dsi_get_drvdata(dsi);
- int ret;
-
- ret = mipi_dsi_detach(dsi);
- if (ret < 0)
- dev_err(&dsi->dev, "Failed to detach from DSI host: %d\n", ret);
-
drm_panel_remove(&ctx->panel);
}
diff --git a/drivers/gpu/drm/panel/panel-samsung-s6e3fa7.c b/drivers/gpu/drm/panel/panel-samsung-s6e3fa7.c
index f4d75eca3cdf..88e4d59941b4 100644
--- a/drivers/gpu/drm/panel/panel-samsung-s6e3fa7.c
+++ b/drivers/gpu/drm/panel/panel-samsung-s6e3fa7.c
@@ -213,7 +213,7 @@ static int s6e3fa7_panel_probe(struct mipi_dsi_device *dsi)
drm_panel_add(&ctx->panel);
- ret = mipi_dsi_attach(dsi);
+ ret = devm_mipi_dsi_attach(&dsi->dev, dsi);
if (ret < 0) {
dev_err(dev, "Failed to attach to DSI host: %d\n", ret);
drm_panel_remove(&ctx->panel);
@@ -226,12 +226,6 @@ static int s6e3fa7_panel_probe(struct mipi_dsi_device *dsi)
static void s6e3fa7_panel_remove(struct mipi_dsi_device *dsi)
{
struct s6e3fa7_panel *ctx = mipi_dsi_get_drvdata(dsi);
- int ret;
-
- ret = mipi_dsi_detach(dsi);
- if (ret < 0)
- dev_err(&dsi->dev, "Failed to detach from DSI host: %d\n", ret);
-
drm_panel_remove(&ctx->panel);
}
diff --git a/drivers/gpu/drm/panel/panel-samsung-s6e3fc2x01.c b/drivers/gpu/drm/panel/panel-samsung-s6e3fc2x01.c
index e63080204af7..cba46e3915b8 100644
--- a/drivers/gpu/drm/panel/panel-samsung-s6e3fc2x01.c
+++ b/drivers/gpu/drm/panel/panel-samsung-s6e3fc2x01.c
@@ -342,7 +342,7 @@ static int s6e3fc2x01_probe(struct mipi_dsi_device *dsi)
drm_panel_add(&ctx->panel);
- ret = mipi_dsi_attach(dsi);
+ ret = devm_mipi_dsi_attach(&dsi->dev, dsi);
if (ret < 0) {
dev_err(dev, "Failed to attach to DSI host: %d\n", ret);
drm_panel_remove(&ctx->panel);
@@ -355,12 +355,6 @@ static int s6e3fc2x01_probe(struct mipi_dsi_device *dsi)
static void s6e3fc2x01_remove(struct mipi_dsi_device *dsi)
{
struct samsung_s6e3fc2x01 *ctx = mipi_dsi_get_drvdata(dsi);
- int ret;
-
- ret = mipi_dsi_detach(dsi);
- if (ret < 0)
- dev_err(&dsi->dev, "Failed to detach from DSI host: %d\n", ret);
-
drm_panel_remove(&ctx->panel);
}
diff --git a/drivers/gpu/drm/panel/panel-samsung-s6e3ha2.c b/drivers/gpu/drm/panel/panel-samsung-s6e3ha2.c
index 1db0c63b1131..a1808124278b 100644
--- a/drivers/gpu/drm/panel/panel-samsung-s6e3ha2.c
+++ b/drivers/gpu/drm/panel/panel-samsung-s6e3ha2.c
@@ -737,7 +737,7 @@ static int s6e3ha2_probe(struct mipi_dsi_device *dsi)
drm_panel_add(&ctx->panel);
- ret = mipi_dsi_attach(dsi);
+ ret = devm_mipi_dsi_attach(&dsi->dev, dsi);
if (ret < 0)
goto remove_panel;
@@ -753,8 +753,6 @@ static int s6e3ha2_probe(struct mipi_dsi_device *dsi)
static void s6e3ha2_remove(struct mipi_dsi_device *dsi)
{
struct s6e3ha2 *ctx = mipi_dsi_get_drvdata(dsi);
-
- mipi_dsi_detach(dsi);
drm_panel_remove(&ctx->panel);
backlight_device_unregister(ctx->bl_dev);
}
diff --git a/drivers/gpu/drm/panel/panel-samsung-s6e3ha8.c b/drivers/gpu/drm/panel/panel-samsung-s6e3ha8.c
index 550e9ef9bb71..22be3463357c 100644
--- a/drivers/gpu/drm/panel/panel-samsung-s6e3ha8.c
+++ b/drivers/gpu/drm/panel/panel-samsung-s6e3ha8.c
@@ -299,7 +299,7 @@ static int s6e3ha8_amb577px01_wqhd_probe(struct mipi_dsi_device *dsi)
priv->dsc.bits_per_pixel = 8 << 4; /* 4 fractional bits */
priv->dsc.block_pred_enable = true;
- ret = mipi_dsi_attach(dsi);
+ ret = devm_mipi_dsi_attach(&dsi->dev, dsi);
if (ret < 0) {
dev_err(dev, "Failed to attach to DSI host: %d\n", ret);
drm_panel_remove(&priv->panel);
@@ -312,12 +312,6 @@ static int s6e3ha8_amb577px01_wqhd_probe(struct mipi_dsi_device *dsi)
static void s6e3ha8_amb577px01_wqhd_remove(struct mipi_dsi_device *dsi)
{
struct s6e3ha8 *priv = mipi_dsi_get_drvdata(dsi);
- int ret;
-
- ret = mipi_dsi_detach(dsi);
- if (ret < 0)
- dev_err(&dsi->dev, "Failed to detach from DSI host: %d\n", ret);
-
drm_panel_remove(&priv->panel);
}
diff --git a/drivers/gpu/drm/panel/panel-samsung-s6e63j0x03.c b/drivers/gpu/drm/panel/panel-samsung-s6e63j0x03.c
index e05199ce14ee..4b16ffe31b8f 100644
--- a/drivers/gpu/drm/panel/panel-samsung-s6e63j0x03.c
+++ b/drivers/gpu/drm/panel/panel-samsung-s6e63j0x03.c
@@ -477,7 +477,7 @@ static int s6e63j0x03_probe(struct mipi_dsi_device *dsi)
drm_panel_add(&ctx->panel);
- ret = mipi_dsi_attach(dsi);
+ ret = devm_mipi_dsi_attach(&dsi->dev, dsi);
if (ret < 0)
goto remove_panel;
@@ -493,8 +493,6 @@ static int s6e63j0x03_probe(struct mipi_dsi_device *dsi)
static void s6e63j0x03_remove(struct mipi_dsi_device *dsi)
{
struct s6e63j0x03 *ctx = mipi_dsi_get_drvdata(dsi);
-
- mipi_dsi_detach(dsi);
drm_panel_remove(&ctx->panel);
backlight_device_unregister(ctx->bl_dev);
diff --git a/drivers/gpu/drm/panel/panel-samsung-s6e63m0-dsi.c b/drivers/gpu/drm/panel/panel-samsung-s6e63m0-dsi.c
index 2630975c111b..0edce6eedc0b 100644
--- a/drivers/gpu/drm/panel/panel-samsung-s6e63m0-dsi.c
+++ b/drivers/gpu/drm/panel/panel-samsung-s6e63m0-dsi.c
@@ -105,7 +105,7 @@ static int s6e63m0_dsi_probe(struct mipi_dsi_device *dsi)
if (ret)
return ret;
- ret = mipi_dsi_attach(dsi);
+ ret = devm_mipi_dsi_attach(&dsi->dev, dsi);
if (ret < 0)
s6e63m0_remove(dev);
@@ -114,7 +114,6 @@ static int s6e63m0_dsi_probe(struct mipi_dsi_device *dsi)
static void s6e63m0_dsi_remove(struct mipi_dsi_device *dsi)
{
- mipi_dsi_detach(dsi);
s6e63m0_remove(&dsi->dev);
}
diff --git a/drivers/gpu/drm/panel/panel-samsung-s6e88a0-ams427ap24.c b/drivers/gpu/drm/panel/panel-samsung-s6e88a0-ams427ap24.c
index 77fee36dbb55..e9e621830fde 100644
--- a/drivers/gpu/drm/panel/panel-samsung-s6e88a0-ams427ap24.c
+++ b/drivers/gpu/drm/panel/panel-samsung-s6e88a0-ams427ap24.c
@@ -724,7 +724,7 @@ static int s6e88a0_ams427ap24_probe(struct mipi_dsi_device *dsi)
drm_panel_add(&ctx->panel);
- ret = mipi_dsi_attach(dsi);
+ ret = devm_mipi_dsi_attach(&dsi->dev, dsi);
if (ret < 0) {
dev_err(dev, "Failed to attach to DSI host: %d\n", ret);
drm_panel_remove(&ctx->panel);
@@ -737,12 +737,6 @@ static int s6e88a0_ams427ap24_probe(struct mipi_dsi_device *dsi)
static void s6e88a0_ams427ap24_remove(struct mipi_dsi_device *dsi)
{
struct s6e88a0_ams427ap24 *ctx = mipi_dsi_get_drvdata(dsi);
- int ret;
-
- ret = mipi_dsi_detach(dsi);
- if (ret < 0)
- dev_err(&dsi->dev, "Failed to detach from DSI host: %d\n", ret);
-
drm_panel_remove(&ctx->panel);
}
diff --git a/drivers/gpu/drm/panel/panel-samsung-s6e88a0-ams452ef01.c b/drivers/gpu/drm/panel/panel-samsung-s6e88a0-ams452ef01.c
index ca5cad41ff1d..43fd28cd1a53 100644
--- a/drivers/gpu/drm/panel/panel-samsung-s6e88a0-ams452ef01.c
+++ b/drivers/gpu/drm/panel/panel-samsung-s6e88a0-ams452ef01.c
@@ -196,7 +196,7 @@ static int s6e88a0_ams452ef01_probe(struct mipi_dsi_device *dsi)
drm_panel_add(&ctx->panel);
- ret = mipi_dsi_attach(dsi);
+ ret = devm_mipi_dsi_attach(&dsi->dev, dsi);
if (ret < 0) {
dev_err(dev, "Failed to attach to DSI host: %d\n", ret);
drm_panel_remove(&ctx->panel);
@@ -209,12 +209,6 @@ static int s6e88a0_ams452ef01_probe(struct mipi_dsi_device *dsi)
static void s6e88a0_ams452ef01_remove(struct mipi_dsi_device *dsi)
{
struct s6e88a0_ams452ef01 *ctx = mipi_dsi_get_drvdata(dsi);
- int ret;
-
- ret = mipi_dsi_detach(dsi);
- if (ret < 0)
- dev_err(&dsi->dev, "Failed to detach from DSI host: %d\n", ret);
-
drm_panel_remove(&ctx->panel);
}
diff --git a/drivers/gpu/drm/panel/panel-samsung-s6e8aa0.c b/drivers/gpu/drm/panel/panel-samsung-s6e8aa0.c
index 1b5c500d4f4e..4902079edd27 100644
--- a/drivers/gpu/drm/panel/panel-samsung-s6e8aa0.c
+++ b/drivers/gpu/drm/panel/panel-samsung-s6e8aa0.c
@@ -1020,7 +1020,7 @@ static int s6e8aa0_probe(struct mipi_dsi_device *dsi)
drm_panel_add(&ctx->panel);
- ret = mipi_dsi_attach(dsi);
+ ret = devm_mipi_dsi_attach(&dsi->dev, dsi);
if (ret < 0)
drm_panel_remove(&ctx->panel);
@@ -1030,8 +1030,6 @@ static int s6e8aa0_probe(struct mipi_dsi_device *dsi)
static void s6e8aa0_remove(struct mipi_dsi_device *dsi)
{
struct s6e8aa0 *ctx = mipi_dsi_get_drvdata(dsi);
-
- mipi_dsi_detach(dsi);
drm_panel_remove(&ctx->panel);
}
diff --git a/drivers/gpu/drm/panel/panel-samsung-s6e8fc0-m1906f9.c b/drivers/gpu/drm/panel/panel-samsung-s6e8fc0-m1906f9.c
index 2fae0dc6c424..6c86cfaf92b2 100644
--- a/drivers/gpu/drm/panel/panel-samsung-s6e8fc0-m1906f9.c
+++ b/drivers/gpu/drm/panel/panel-samsung-s6e8fc0-m1906f9.c
@@ -258,7 +258,7 @@ static int s6e8fc0_m1906f9_probe(struct mipi_dsi_device *dsi)
drm_panel_add(&ctx->panel);
- ret = mipi_dsi_attach(dsi);
+ ret = devm_mipi_dsi_attach(&dsi->dev, dsi);
if (ret < 0) {
drm_panel_remove(&ctx->panel);
return dev_err_probe(dev, ret, "Failed to attach to DSI host\n");
@@ -270,12 +270,6 @@ static int s6e8fc0_m1906f9_probe(struct mipi_dsi_device *dsi)
static void s6e8fc0_remove(struct mipi_dsi_device *dsi)
{
struct s6e8fc0_ctx *ctx = mipi_dsi_get_drvdata(dsi);
- int ret;
-
- ret = mipi_dsi_detach(dsi);
- if (ret < 0)
- dev_err(&dsi->dev, "Failed to detach from DSI host: %d\n", ret);
-
drm_panel_remove(&ctx->panel);
}
diff --git a/drivers/gpu/drm/panel/panel-samsung-sofef00.c b/drivers/gpu/drm/panel/panel-samsung-sofef00.c
index f07d6533ed69..5cb05ba246b8 100644
--- a/drivers/gpu/drm/panel/panel-samsung-sofef00.c
+++ b/drivers/gpu/drm/panel/panel-samsung-sofef00.c
@@ -252,7 +252,7 @@ static int sofef00_panel_probe(struct mipi_dsi_device *dsi)
drm_panel_add(&ctx->panel);
- ret = mipi_dsi_attach(dsi);
+ ret = devm_mipi_dsi_attach(&dsi->dev, dsi);
if (ret < 0) {
dev_err(dev, "Failed to attach to DSI host: %d\n", ret);
drm_panel_remove(&ctx->panel);
@@ -265,12 +265,6 @@ static int sofef00_panel_probe(struct mipi_dsi_device *dsi)
static void sofef00_panel_remove(struct mipi_dsi_device *dsi)
{
struct sofef00_panel *ctx = mipi_dsi_get_drvdata(dsi);
- int ret;
-
- ret = mipi_dsi_detach(dsi);
- if (ret < 0)
- dev_err(&dsi->dev, "Failed to detach from DSI host: %d\n", ret);
-
drm_panel_remove(&ctx->panel);
}
--
2.43.0
next prev parent reply other threads:[~2026-08-12 13:04 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-12 13:04 [PATCH v3 1/6] drm/panel: Use devm_mipi_dsi_attach in BOE panels Osama Abdelkader
2026-08-12 13:04 ` Osama Abdelkader [this message]
2026-08-12 13:04 ` [PATCH v3 3/6] drm/panel: Use devm_mipi_dsi_attach in Novatek and Raydium panels Osama Abdelkader
2026-08-12 13:04 ` [PATCH v3 4/6] drm/panel: Use devm_mipi_dsi_attach in Himax and Ilitek panels Osama Abdelkader
2026-08-12 13:04 ` [PATCH v3 5/6] drm/panel: Use devm_mipi_dsi_attach in display vendor panels Osama Abdelkader
2026-08-12 13:04 ` [PATCH v3 6/6] drm/panel: Use devm_mipi_dsi_attach in assorted panels Osama Abdelkader
2026-08-12 13:26 ` [PATCH v3 1/6] drm/panel: Use devm_mipi_dsi_attach in BOE panels Maxime Ripard
2026-08-12 13:45 ` Luca Ceresoli
2026-08-12 14:23 ` Osama Abdelkader
2026-08-25 15:59 ` Luca Ceresoli
2026-08-25 16:32 ` Luca Ceresoli
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260812130429.16850-2-osama.abdelkader@gmail.com \
--to=osama.abdelkader@gmail.com \
--cc=airlied@gmail.com \
--cc=aweber.kernel@gmail.com \
--cc=casey.connolly@linaro.org \
--cc=david@ixit.cz \
--cc=dri-devel@lists.freedesktop.org \
--cc=dsankouski@gmail.com \
--cc=jesszhan0024@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=luca.ceresoli@bootlin.com \
--cc=maarten.lankhorst@linux.intel.com \
--cc=mripard@kernel.org \
--cc=neil.armstrong@linaro.org \
--cc=simona@ffwll.ch \
--cc=tzimmermann@suse.de \
--cc=yedaya.ka@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®