From: Osama Abdelkader <osama.abdelkader@gmail.com>
To: Linus Walleij <linusw@kernel.org>,
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>,
Cristian Cozzolino <cristian_ci@protonmail.com>,
Sumit Semwal <sumit.semwal@linaro.org>,
Krzysztof Kozlowski <krzk@kernel.org>,
Robert Chiras <robert.chiras@nxp.com>,
dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org
Cc: Osama Abdelkader <osama.abdelkader@gmail.com>
Subject: [PATCH 3/6] drm/panel: Use devm_mipi_dsi_attach in Novatek and Raydium panels
Date: Tue, 11 Aug 2026 17:09:47 +0200 [thread overview]
Message-ID: <20260811151000.75038-4-osama.abdelkader@gmail.com> (raw)
In-Reply-To: <20260811151000.75038-1-osama.abdelkader@gmail.com>
Use the managed MIPI DSI attach helper in Novatek and Raydium panel drivers and drop the corresponding manual detach calls from remove paths.
---
drivers/gpu/drm/panel/panel-novatek-nt35510.c | 4 +---
drivers/gpu/drm/panel/panel-novatek-nt35532.c | 8 +-------
drivers/gpu/drm/panel/panel-novatek-nt35560.c | 4 +---
drivers/gpu/drm/panel/panel-novatek-nt36672a.c | 8 +-------
drivers/gpu/drm/panel/panel-novatek-nt36672e.c | 4 +---
drivers/gpu/drm/panel/panel-novatek-nt37700f.c | 8 +-------
drivers/gpu/drm/panel/panel-novatek-nt37801.c | 8 +-------
drivers/gpu/drm/panel/panel-raydium-rm67191.c | 8 +-------
drivers/gpu/drm/panel/panel-raydium-rm67200.c | 8 +-------
drivers/gpu/drm/panel/panel-raydium-rm68200.c | 4 +---
drivers/gpu/drm/panel/panel-raydium-rm692e5.c | 8 +-------
11 files changed, 11 insertions(+), 61 deletions(-)
diff --git a/drivers/gpu/drm/panel/panel-novatek-nt35510.c b/drivers/gpu/drm/panel/panel-novatek-nt35510.c
index 3189d89c7ca0..e75b6ac3df5c 100644
--- a/drivers/gpu/drm/panel/panel-novatek-nt35510.c
+++ b/drivers/gpu/drm/panel/panel-novatek-nt35510.c
@@ -1175,7 +1175,7 @@ static int nt35510_probe(struct mipi_dsi_device *dsi)
drm_panel_add(&nt->panel);
- ret = mipi_dsi_attach(dsi);
+ ret = devm_mipi_dsi_attach(&dsi->dev, dsi);
if (ret < 0)
drm_panel_remove(&nt->panel);
@@ -1186,8 +1186,6 @@ static void nt35510_remove(struct mipi_dsi_device *dsi)
{
struct nt35510 *nt = mipi_dsi_get_drvdata(dsi);
int ret;
-
- mipi_dsi_detach(dsi);
/* Power off */
ret = nt35510_power_off(nt);
if (ret)
diff --git a/drivers/gpu/drm/panel/panel-novatek-nt35532.c b/drivers/gpu/drm/panel/panel-novatek-nt35532.c
index edea766a3c44..e0bba71e3ff8 100644
--- a/drivers/gpu/drm/panel/panel-novatek-nt35532.c
+++ b/drivers/gpu/drm/panel/panel-novatek-nt35532.c
@@ -754,7 +754,7 @@ static int nt35532_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");
@@ -766,12 +766,6 @@ static int nt35532_probe(struct mipi_dsi_device *dsi)
static void nt35532_remove(struct mipi_dsi_device *dsi)
{
struct novatek_nt35532 *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-novatek-nt35560.c b/drivers/gpu/drm/panel/panel-novatek-nt35560.c
index 6e5173f98a22..1f7d5d670923 100644
--- a/drivers/gpu/drm/panel/panel-novatek-nt35560.c
+++ b/drivers/gpu/drm/panel/panel-novatek-nt35560.c
@@ -435,7 +435,7 @@ static int nt35560_probe(struct mipi_dsi_device *dsi)
drm_panel_add(&nt->panel);
- ret = mipi_dsi_attach(dsi);
+ ret = devm_mipi_dsi_attach(&dsi->dev, dsi);
if (ret < 0) {
drm_panel_remove(&nt->panel);
return ret;
@@ -447,8 +447,6 @@ static int nt35560_probe(struct mipi_dsi_device *dsi)
static void nt35560_remove(struct mipi_dsi_device *dsi)
{
struct nt35560 *nt = mipi_dsi_get_drvdata(dsi);
-
- mipi_dsi_detach(dsi);
drm_panel_remove(&nt->panel);
}
diff --git a/drivers/gpu/drm/panel/panel-novatek-nt36672a.c b/drivers/gpu/drm/panel/panel-novatek-nt36672a.c
index 464d9ce47d87..66f33cc42d30 100644
--- a/drivers/gpu/drm/panel/panel-novatek-nt36672a.c
+++ b/drivers/gpu/drm/panel/panel-novatek-nt36672a.c
@@ -458,7 +458,7 @@ static int nt36672a_panel_probe(struct mipi_dsi_device *dsi)
if (err < 0)
return err;
- err = mipi_dsi_attach(dsi);
+ err = devm_mipi_dsi_attach(&dsi->dev, dsi);
if (err < 0) {
drm_panel_remove(&pinfo->base);
return err;
@@ -470,12 +470,6 @@ static int nt36672a_panel_probe(struct mipi_dsi_device *dsi)
static void nt36672a_panel_remove(struct mipi_dsi_device *dsi)
{
struct nt36672a_panel *pinfo = mipi_dsi_get_drvdata(dsi);
- int err;
-
- err = mipi_dsi_detach(dsi);
- if (err < 0)
- dev_err(&dsi->dev, "failed to detach from DSI host: %d\n", err);
-
drm_panel_remove(&pinfo->base);
}
diff --git a/drivers/gpu/drm/panel/panel-novatek-nt36672e.c b/drivers/gpu/drm/panel/panel-novatek-nt36672e.c
index c5e00eb55722..6309ea17e5bc 100644
--- a/drivers/gpu/drm/panel/panel-novatek-nt36672e.c
+++ b/drivers/gpu/drm/panel/panel-novatek-nt36672e.c
@@ -563,7 +563,7 @@ static int nt36672e_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);
goto err_dsi_attach;
@@ -579,8 +579,6 @@ static int nt36672e_panel_probe(struct mipi_dsi_device *dsi)
static void nt36672e_panel_remove(struct mipi_dsi_device *dsi)
{
struct nt36672e_panel *ctx = mipi_dsi_get_drvdata(dsi);
-
- mipi_dsi_detach(ctx->dsi);
drm_panel_remove(&ctx->panel);
}
diff --git a/drivers/gpu/drm/panel/panel-novatek-nt37700f.c b/drivers/gpu/drm/panel/panel-novatek-nt37700f.c
index c221dd498fed..0c9be8f4628c 100644
--- a/drivers/gpu/drm/panel/panel-novatek-nt37700f.c
+++ b/drivers/gpu/drm/panel/panel-novatek-nt37700f.c
@@ -259,7 +259,7 @@ static int nt37700f_tianma_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");
@@ -271,12 +271,6 @@ static int nt37700f_tianma_probe(struct mipi_dsi_device *dsi)
static void nt37700f_tianma_remove(struct mipi_dsi_device *dsi)
{
struct nt37700f_tianma *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-novatek-nt37801.c b/drivers/gpu/drm/panel/panel-novatek-nt37801.c
index 5e46c4c6d771..8430f70f0e28 100644
--- a/drivers/gpu/drm/panel/panel-novatek-nt37801.c
+++ b/drivers/gpu/drm/panel/panel-novatek-nt37801.c
@@ -283,7 +283,7 @@ static int novatek_nt37801_probe(struct mipi_dsi_device *dsi)
ctx->dsc.bits_per_pixel = 8 << 4; /* 4 fractional bits */
ctx->dsc.block_pred_enable = true;
- 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");
@@ -295,12 +295,6 @@ static int novatek_nt37801_probe(struct mipi_dsi_device *dsi)
static void novatek_nt37801_remove(struct mipi_dsi_device *dsi)
{
struct novatek_nt37801 *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-raydium-rm67191.c b/drivers/gpu/drm/panel/panel-raydium-rm67191.c
index 2af6aa47a551..9bd2d94b03d9 100644
--- a/drivers/gpu/drm/panel/panel-raydium-rm67191.c
+++ b/drivers/gpu/drm/panel/panel-raydium-rm67191.c
@@ -592,7 +592,7 @@ static int rad_panel_probe(struct mipi_dsi_device *dsi)
drm_panel_add(&panel->panel);
- ret = mipi_dsi_attach(dsi);
+ ret = devm_mipi_dsi_attach(&dsi->dev, dsi);
if (ret)
drm_panel_remove(&panel->panel);
@@ -602,12 +602,6 @@ static int rad_panel_probe(struct mipi_dsi_device *dsi)
static void rad_panel_remove(struct mipi_dsi_device *dsi)
{
struct rad_panel *rad = mipi_dsi_get_drvdata(dsi);
- struct device *dev = &dsi->dev;
- int ret;
-
- ret = mipi_dsi_detach(dsi);
- if (ret)
- dev_err(dev, "Failed to detach from host (%d)\n", ret);
drm_panel_remove(&rad->panel);
}
diff --git a/drivers/gpu/drm/panel/panel-raydium-rm67200.c b/drivers/gpu/drm/panel/panel-raydium-rm67200.c
index b2ba006c06f6..ff896e87fc51 100644
--- a/drivers/gpu/drm/panel/panel-raydium-rm67200.c
+++ b/drivers/gpu/drm/panel/panel-raydium-rm67200.c
@@ -422,7 +422,7 @@ static int raydium_rm67200_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);
@@ -434,12 +434,6 @@ static int raydium_rm67200_probe(struct mipi_dsi_device *dsi)
static void raydium_rm67200_remove(struct mipi_dsi_device *dsi)
{
struct raydium_rm67200 *ctx = mipi_dsi_get_drvdata(dsi);
- int ret;
-
- ret = mipi_dsi_detach(dsi);
- if (ret < 0)
- dev_err(&dsi->dev, "Failed to detach DSI host: %d\n", ret);
-
drm_panel_remove(&ctx->panel);
}
diff --git a/drivers/gpu/drm/panel/panel-raydium-rm68200.c b/drivers/gpu/drm/panel/panel-raydium-rm68200.c
index c535dc931903..e42936b4ae96 100644
--- a/drivers/gpu/drm/panel/panel-raydium-rm68200.c
+++ b/drivers/gpu/drm/panel/panel-raydium-rm68200.c
@@ -362,7 +362,7 @@ static int rm68200_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, "mipi_dsi_attach() failed: %d\n", ret);
drm_panel_remove(&ctx->panel);
@@ -375,8 +375,6 @@ static int rm68200_probe(struct mipi_dsi_device *dsi)
static void rm68200_remove(struct mipi_dsi_device *dsi)
{
struct rm68200 *ctx = mipi_dsi_get_drvdata(dsi);
-
- mipi_dsi_detach(dsi);
drm_panel_remove(&ctx->panel);
}
diff --git a/drivers/gpu/drm/panel/panel-raydium-rm692e5.c b/drivers/gpu/drm/panel/panel-raydium-rm692e5.c
index 8e9484768657..7cf284878178 100644
--- a/drivers/gpu/drm/panel/panel-raydium-rm692e5.c
+++ b/drivers/gpu/drm/panel/panel-raydium-rm692e5.c
@@ -331,7 +331,7 @@ static int rm692e5_probe(struct mipi_dsi_device *dsi)
ctx->dsc.bits_per_pixel = 8 << 4; /* 4 fractional bits */
ctx->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(&ctx->panel);
@@ -344,12 +344,6 @@ static int rm692e5_probe(struct mipi_dsi_device *dsi)
static void rm692e5_remove(struct mipi_dsi_device *dsi)
{
struct rm692e5_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-11 15:10 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20260811151000.75038-1-osama.abdelkader@gmail.com>
2026-08-11 15:09 ` [PATCH 1/6] drm/panel: Use devm_mipi_dsi_attach in BOE panels Osama Abdelkader
2026-08-11 15:09 ` [PATCH 2/6] drm/panel: Use devm_mipi_dsi_attach in Samsung panels Osama Abdelkader
2026-08-11 15:09 ` Osama Abdelkader [this message]
2026-08-11 15:09 ` [PATCH 4/6] drm/panel: Use devm_mipi_dsi_attach in Himax and Ilitek panels Osama Abdelkader
2026-08-11 15:27 ` Javier Martinez Canillas
2026-08-11 16:52 ` Osama Abdelkader
2026-08-11 15:09 ` [PATCH 5/6] drm/panel: Use devm_mipi_dsi_attach in display vendor panels Osama Abdelkader
2026-08-11 15:09 ` [PATCH 6/6] drm/panel: Use devm_mipi_dsi_attach in assorted panels Osama Abdelkader
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=20260811151000.75038-4-osama.abdelkader@gmail.com \
--to=osama.abdelkader@gmail.com \
--cc=airlied@gmail.com \
--cc=cristian_ci@protonmail.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=jesszhan0024@gmail.com \
--cc=krzk@kernel.org \
--cc=linusw@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=maarten.lankhorst@linux.intel.com \
--cc=mripard@kernel.org \
--cc=neil.armstrong@linaro.org \
--cc=robert.chiras@nxp.com \
--cc=simona@ffwll.ch \
--cc=sumit.semwal@linaro.org \
--cc=tzimmermann@suse.de \
/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®