From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wm1-f54.google.com (mail-wm1-f54.google.com [209.85.128.54]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6672E43F0A6 for ; Wed, 12 Aug 2026 13:04:48 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.54 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786539892; cv=none; b=MxBeLZF8pugiRclJKgAVi+6nBZfDF98dsjrRsjkMR/pAgTK08TGncp6Oz46QSuGNgPDMNIuVvM75UfT2ew8ck3GdHaVqun7HYc5UVjAyVGxOWIZKPD3OEuwwm0xluReiwRZcdxLrdnWCeX/g5CDHtZrczJvL4xtc2+rZjMgV2Yk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786539892; c=relaxed/simple; bh=T5fcLYaYzlBtxIFdaMwTONMCYPzJRefJl1igFuDvjD8=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=qmjop8Jo3H9itgnleGPmWmlF4grj27xWgh4XrpLbj8pg+cFQX2pBnUt/FA7+vmIgLzhiBOqTJo/hUl+xKPVmvkCKSC/xhsuZmupL/1yVZ24B+eRrDPlm2bC4sxYPNw/9q1h/edsUPQm49V+YPffRS6QsEi3QHxlKyoxV/DL8Ig4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=ML6hN6+O; arc=none smtp.client-ip=209.85.128.54 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="ML6hN6+O" Received: by mail-wm1-f54.google.com with SMTP id 5b1f17b1804b1-4997581cdc1so7804465e9.3 for ; Wed, 12 Aug 2026 06:04:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1786539884; x=1787144684; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=Sa9Z6PRqCh3Jb26bTeo/yPbWENjLJgCyd/Cw8VYcC9Y=; b=ML6hN6+OjjoYnZzHPcvLWt0EbBMhxF58oIu13CTeoPV/suzspH5yz+QmQVZq99NrO4 OVrvvE22Y8XUOxafpd8/mtSsz/BXxRIuHhikZFG3mPkY3HLWajfFAUnuNxIvwG/TudUt 01mB7vx/+4o8eHcnG1OmWclHuOc9/SibG/L21M+8Vkdh/QofKXhvIh6lijqKGAlXvOVF o5oJ4Q95OmcNa3XiPgCQ3qMkScnmunH2nhn0lRAItgEJHQuulbAR15rUR+3CGHM6beAJ 90hgSSfsNgM5gPWUr13tX0HYNcNZckP4XodbDsWfkbOXiDAxrX6GPozYHhCdJL1vxGHG 2Jbw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1786539884; x=1787144684; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to:content-type; bh=Sa9Z6PRqCh3Jb26bTeo/yPbWENjLJgCyd/Cw8VYcC9Y=; b=RmiNBN6ymXffvbuXvsZJx4EBwEt3e/QLBVEr8NFoZnYCRpEW2yjGrJi1RVq9H5QatC TX0U4Ik2zrARRBx6h2SQz6Iy8YSWNU4qCka2MCwwSEzKdFdb8caIwpjIh5lbW0Dd9RAw bbWlv5QQj1Req9BABncpK3Vuyf89O3bkpaC7X7oITUA7KAXc20fmLyGf5O69tpCL0+nc 9fvmRn7m4bRHgZtTxD0hIBzIetR/h+uVStZBiAbEgpSx1ZRI/4syBoEja/EzLaRQuyo6 cwYWOQMYnbmuX8094axrxWlRismzDuN6IRTYNmnsXgtXFahnUTEhGysYrNVA4dnwEg8F ENqw== X-Forwarded-Encrypted: i=1; AHgh+Rq7s4FcqpbChuhlzRoyv8zsekhAJduRX8xhbDAoEdmG34vUH2MOOb0EGo9i8pMBPlI/XS8tCQfpCoqlqvg=@vger.kernel.org X-Gm-Message-State: AOJu0YxrB8vveQKhKoUF2xFsCVKF+bzlr7eaJke97Bjn9MKYdN5514Ld Q1niyDEm4ghoY45AFyZCq0QSvcQeS8UZW987ybhP1D6vLuJ65Wzq2WaI X-Gm-Gg: AR+sD12ZKBYtNtQ/31/1/ij4HD0isYVo4q9asoQJEoTBzAcR+3b8SlfRddOeMeAWm4E jdgEmfj4abL551rKWxIKEKXW6ENa7RQ4xDtxDBNZXaqTTqX85Z3wealoEEPOTqWl7zwVc3JmlX7 temYdn/wck88V/3IVoVYqSvtTEApaDs5OF8eeQ51gilPf2WGu2L7v+kHx+qpwLNcKbWwTWDiCvp cnJIk/DaOkrARmDYkZSGEpISJiH4K8ab02fsoG9dMh1tNgB5at0EL8ZB7RIRYMOe/SQW16BEZro hBAWCn9n+wY6MuJLty7VRwL9WxXMT+/eztQ/Cwc835F6YKrjyxyyTRaRwxRCmNXKKYta+TsCt35 ViJIwLm2xsQMYU2G2F3MtLZanFvuYjuONkP2j5nIZM9aBr6cDShX5tEK0uV7VJrr765catKFC9y YOmrzpSwhY4nrgkfjanwmwj9Re1JFZy2cGN4z2taK3VOWrMpG5eWUfcRNC+yGhmrReDwQq0Q01B ulxYga2jAEV0F8ZhzK6/RLr1SLzYiekIMnC X-Received: by 2002:a05:600c:19c6:b0:499:7a5e:4c3f with SMTP id 5b1f17b1804b1-4997c0fcab7mr72341265e9.1.1786539884084; Wed, 12 Aug 2026 06:04:44 -0700 (PDT) Received: from osama.. ([2a02:908:185:7e40:3d2e:78f3:cfb2:413d]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-48150d5eb2csm7040804f8f.30.2026.08.12.06.04.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 12 Aug 2026 06:04:43 -0700 (PDT) From: Osama Abdelkader To: luca.ceresoli@bootlin.com, Linus Walleij , Neil Armstrong , Jessica Zhang , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Simona Vetter , Cristian Cozzolino , Sumit Semwal , Krzysztof Kozlowski , Robert Chiras , dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org Cc: Osama Abdelkader Subject: [PATCH v3 3/6] drm/panel: Use devm_mipi_dsi_attach in Novatek and Raydium panels Date: Wed, 12 Aug 2026 15:04:20 +0200 Message-ID: <20260812130429.16850-3-osama.abdelkader@gmail.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260812130429.16850-1-osama.abdelkader@gmail.com> References: <20260812130429.16850-1-osama.abdelkader@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Use the managed MIPI DSI attach helper in Novatek and Raydium panel drivers and drop the corresponding manual detach calls from remove paths. Signed-off-by: Osama Abdelkader --- v3: - Move the changelog after the `---`. v2: - break long description lines. - add Signed-off-by tag 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