From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wr1-f41.google.com (mail-wr1-f41.google.com [209.85.221.41]) (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 A3AB63911DF for ; Tue, 11 Aug 2026 15:10:52 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.41 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786461055; cv=none; b=F70kIcDa1LCSuw4/AxIwsItM1FtVkG5VdCNq2t/uzzk83AaV4o/d0TGXiv7MNqtAS/AwJthFZ534pBPaWFfHlIyK7ilMzx0Gsm2d8vA0WkBkWPkyL74OrbJxXHeA/rnWhWtNuOySI1+6atnc4Igl4ebh2Of2USZmO5w+nl0mPds= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786461055; c=relaxed/simple; bh=aGXuB3Pb2bCFce6tmQtWX0SDbb7lLz3fDRjV+sGpcaw=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=jEi5JXnY6Qk9MBpVOCJXebyCe7wsfXgZ6golxZ2jFuu1y7mMUK5Q1OJo6BN5kDCTqZK/H6kqNOCmIFf7Zw23fQ2ZblBTZ19ScyaGvhKYg8GU+bmlEfxnHcZSZRwwj8CTff2iUu4aYxGOhRhm66SwvtXuivVKiwY5ksAIm+iSST4= 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=bUN61pUg; arc=none smtp.client-ip=209.85.221.41 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="bUN61pUg" Received: by mail-wr1-f41.google.com with SMTP id ffacd0b85a97d-47f6609c657so1652824f8f.2 for ; Tue, 11 Aug 2026 08:10:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1786461050; x=1787065850; 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=kDdExMmbEPU0/QhO8P8dukEydRvYYmhOlmGEQGfLyW0=; b=bUN61pUgoAo+8ojmd2WcWXa0V5siIEpWiUvzPA2NV7VVLTQOgKL0Ak/j/dTTfL6Dja GraIvSkIAvwmfCAKrveyTkugT9YoLNDqzH9fro9KT/UggbSDPxlHOQ0k19ElpTwPg7cE hamDt01sk49uk5OrhT35zlekK/xlrcEIOShtSphs25iUubx1fmEPtLfLOWcOTCoriKI8 cYjpIk4Kk/cxJmMvpo183UocHZJEpOTIDQV1lSDtyCwfEJXHvReNJ74t0XTv+T2SK+cV URpDNrMWGMSdq6TCm4DZCHg/yrmpS0R3WmOLor2a0pBLCB8+wYXqvzhQAW5kAlw+StmT AhLg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1786461050; x=1787065850; 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=kDdExMmbEPU0/QhO8P8dukEydRvYYmhOlmGEQGfLyW0=; b=KA2m/mjk5KOsWJZzidnCyf+25RpIPnU7xeLoAgwbt5nNz37bReVo9xVK6H12Zxwwnp sWnwt/9MNxoaNepYYrgpYC6t3AfXf4LhMcL1HD/83MHgHxbm86FlnErTPxzGxlz3U3Q9 MSWqWeUeODRZ2i57W1CMhwItUkM9UKiVBYYqGmCkmpervOGY2M4TiU9R5r6X6Yx31nQG tpGSjHS6t2iocomuaSILF0ZD5IiSZ+P6lKXikHZff6U+vHj7uKQKQY9rRmEGWFflyp4H apIqkOmxvKZW5hp9KKxdtt+nquANbyQtqXmB7oBIntQrkEpJu7jEtSzwfMPz5uZzkpJw DWcA== X-Forwarded-Encrypted: i=1; AHgh+RoOZPgAfxwsic+v8mn33+0+/ohfKu8sxIQjKgHvaCSzuVpk93Uep0w4NBMOAEqA2rHmUb3H+FK0WSQnjAc=@vger.kernel.org X-Gm-Message-State: AOJu0YzO5/i7oVJ3RCxxdhalPF8m8kND25Bj214sJlBidZv57cfMmj88 Su+E96s2hutOQhFC7NiDEv282rFpsOwgf5DUqa8l//vQW6Ec82B073kW X-Gm-Gg: AR+sD13/kzHK0yC6GDSwXX8S6euK5MkNTkmaAbOvW+8S/+AAHC787e8/9Aa+fVHjAII 3SIQzhQKv/9DF1kGphNRsZSA4q8QQis0mu4kkSAVKy+N4JXDNGElzEvBBHnnyvJPPJwKqvIw79e pXh7DHXBSjrIiVeIgs7fgA3qQHfy5pPhm1kW5gd4qtqfxqaxn0AHsnoRyU+FeGbhNFrQ73/5bKQ KZi5oIF0Xo1q8cdmlHErYnu7GO2UiyNQ2f5wRlaKkim66dIzW3laCDbMYOjxCsz6rHJQcYYMkzp y4k0t/dNObgGehWalOgCxCiNr7ARvKfZOPSVcotY5R0eMv8JhzKBFTa3Y4oykKAR3Kq7Z9OeE/y 6crMDGAJfLCKfNGhxN+fOouio2ixgE1yzx+vn8K+4r00YZbrm/5yN5MWbj6n5b+2Vca6B6RSJmm MT5LdAqC28w26hlMNsQ1A1NhOm9sKiZnUVx8bzyF28MbOz65bEdNduE+ukfTWdvSTVGQXeQVc2y 9DCj/Cd3ml+N44chkKwn6jRo5huubWBvH8= X-Received: by 2002:a05:600c:a45:b0:499:7a5e:4c3f with SMTP id 5b1f17b1804b1-4997a5e4c60mr12527455e9.1.1786461049771; Tue, 11 Aug 2026 08:10:49 -0700 (PDT) Received: from osama.. ([2a02:908:185:7e40:b0cf:778:ae86:13b1]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-49977e57785sm54307265e9.2.2026.08.11.08.10.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 11 Aug 2026 08:10:49 -0700 (PDT) From: Osama Abdelkader To: 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 3/6] drm/panel: Use devm_mipi_dsi_attach in Novatek and Raydium panels Date: Tue, 11 Aug 2026 17:09:47 +0200 Message-ID: <20260811151000.75038-4-osama.abdelkader@gmail.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260811151000.75038-1-osama.abdelkader@gmail.com> References: <20260811151000.75038-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. --- 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