From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wr1-f44.google.com (mail-wr1-f44.google.com [209.85.221.44]) (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 37689448396 for ; Wed, 12 Aug 2026 13:04:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.44 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786539889; cv=none; b=Obyp8rpHG837IBqA3LZIk99Vg9JnbbfAKEd0MlbOSMhdP51SRN9iK8Tp1rom+oy63XtHz+A1B0oZwug4s+3GIyvT9foZoCTjt2JD0wJJ6eUm5MXzxjj0Vj10asW1iEDbKxuoWg8VjJKwhkGzs2vhG02wUtdpyNkGWZc1c5cWwLg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786539889; c=relaxed/simple; bh=jo0tVwtWNXPg4Ud97tfpOAQRSDrcWWB7cn7opCLGdc0=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=MR5qGzTQSkXo2ZJ0dtJ7NHvoN7qcZckS0YkPSbm7qNMsxPsuaVfO/SQ6b2CvSuRJzKPQfw+NgwcnH567xxkgrCjs2AqszMGCyQYqnEceKH3M3Oy7JG9b3pJ7yBBGoeiGWe/OwQ9G53Qbz53ObnrA3knjrGUaMmKHWDiwh8BySs4= 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=piHbPpGn; arc=none smtp.client-ip=209.85.221.44 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="piHbPpGn" Received: by mail-wr1-f44.google.com with SMTP id ffacd0b85a97d-47fe89fb333so515335f8f.3 for ; Wed, 12 Aug 2026 06:04:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1786539878; x=1787144678; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to:content-type; bh=iwslSfG+p8iUF3XFQu9lDnLhoLT7aq27LjQL7Nhl58U=; b=piHbPpGnQ7XKOiLeyhyt2SYt7chh/uwbu46q92ZZgTj8/IK4rwNekpH84ZslChVEVi uWGRgCartd1u+8oqsrmMnNvepTI2FZd8KMEqr4m8Yy4VLajhX6M57m8j5lTVzBtIQJnQ ++S1RTBtHCwBUBiU7Qv2qJXrmgfJmVXuVMuX66YHYc1AuXZbL/JcgBCrRjF8+EkkRk7m sPVa+xjTt4KMK+eqk64kvhXmjze1yPsJW3zF5Fzs1t2x4kkgxhNfhQ3sx9Y+kCm5hTs6 TnS6hrqixX6BqimdDf8P7xxS/ZqHOL3dpenbS5NemiDr8nEG/UzdvRUmcibLmEEMiPTc nAtA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1786539878; x=1787144678; h=content-transfer-encoding:mime-version: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=iwslSfG+p8iUF3XFQu9lDnLhoLT7aq27LjQL7Nhl58U=; b=ZVkHF3x2LP0SIImAAHm+xG5FQEtxWAPUTBU5F41NFZSy6Q8BAv2OF8vuxgxvChVikj enZ+ckctyQdY7ImFxKQ0TTKOYYWYkWULrbGXhNsLMMQr+UPhJm93b/bHorhIlt6b83xl z/ZwaQaBf0lqWsURz8ne7MKWwviro/MMzkRWnvFtL5cu4Aum8QpCMp13b7hQhMtYop6G co0poIegZW2DqNSOGbk+yQGNPWE8x/DLSiZh5B+6eYpLPF7JDmSiVhHkeOpOm84QYv4e a0MyrwtBqWW7CyPSAC050Dt9/wXaZfekvvqPtfP4mtJyxeAD0SiyzQAcMt8rEHCJ8sy4 eHOA== X-Forwarded-Encrypted: i=1; AHgh+Rp53NJ6mZkA04yDLO+o08qf2hXhlF4WLQgJxWhT5PoJO7y69nPqLm/bZr8+7xrRMVfZAxOCR9QWffvUYf4=@vger.kernel.org X-Gm-Message-State: AOJu0Yy43DWkvzqvnCBjHMF7rRptcgYOxP6CuoSScMrQ4cOhKLSyI7tQ XRtYoOA/04NTigS1rNSjxoRKZ8W8Ce7GHSmNYBF6/rnjmwXgGp6xFGED X-Gm-Gg: AR+sD11SsV7JfXl1Wv7544x4Mua+VEjomdPcAWuzbBx35mX6UDi/3KqTFb4i6WJ/7Cv fUVareZyRA1SC9f3WxkJ7u3bQ9v5SV6Gw0IQwh3sodig6A2929n45fktNO9ZbqskG8g2iL5/lyq olMRMtuvP6WeSfL2wRyb6CfgkAAFzG4NQYEGw0WK/4UELbB+mRwUR0mEtroEMor26Ujo+EXLXb6 dxc9dLyDK/GF+NlOTJhFlRqLuiIeUkMkkxM+I87IZmg7NWwd7a5LQn3Ic8IUr2Ibs6/tWYwdNiz HXSpSDcehN2pR5EPErOFMzuUxlHcQwfJAyz3MS4QOqhVCrTfeXUZYCRK29zaBlHBtFyzXF81D0+ yh0sIBl8Px8rLHZd+qf/vbM/e+Mm2d3mDlZ4Zn9RCojbmUAc73Xcccu3ehzPE6krVbH+au3i9xH gaxjYxJZzpOM5wuf8+E4a2EA2P39WoR6VZxwk8gKSn/ZUB6NU0jlX30Pn0NP21tg2YXni50DJdb PUBXGoNJm2BTPqdqon2l0cFuNk= X-Received: by 2002:a5d:64e4:0:b0:47f:f908:ba7b with SMTP id ffacd0b85a97d-481528ec696mr6980548f8f.23.1786539877808; Wed, 12 Aug 2026 06:04:37 -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.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 12 Aug 2026 06:04:37 -0700 (PDT) From: Osama Abdelkader To: luca.ceresoli@bootlin.com, Neil Armstrong , Jessica Zhang , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Simona Vetter , Jerry Han , dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org Cc: Osama Abdelkader Subject: [PATCH v3 1/6] drm/panel: Use devm_mipi_dsi_attach in BOE panels Date: Wed, 12 Aug 2026 15:04:18 +0200 Message-ID: <20260812130429.16850-1-osama.abdelkader@gmail.com> X-Mailer: git-send-email 2.43.0 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 BOE 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-boe-bf060y8m-aj0.c | 8 +------- drivers/gpu/drm/panel/panel-boe-himax8279d.c | 8 +------- drivers/gpu/drm/panel/panel-boe-td4320.c | 8 +------- drivers/gpu/drm/panel/panel-boe-th101mb31ig002-28a.c | 4 +--- drivers/gpu/drm/panel/panel-boe-tv101wum-ll2.c | 8 +------- drivers/gpu/drm/panel/panel-boe-tv101wum-nl6.c | 7 +------ 6 files changed, 6 insertions(+), 37 deletions(-) diff --git a/drivers/gpu/drm/panel/panel-boe-bf060y8m-aj0.c b/drivers/gpu/drm/panel/panel-boe-bf060y8m-aj0.c index 84c21c62a43e..6a74523a6614 100644 --- a/drivers/gpu/drm/panel/panel-boe-bf060y8m-aj0.c +++ b/drivers/gpu/drm/panel/panel-boe-bf060y8m-aj0.c @@ -359,7 +359,7 @@ static int boe_bf060y8m_aj0_probe(struct mipi_dsi_device *dsi) drm_panel_add(&boe->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); return ret; @@ -371,12 +371,6 @@ static int boe_bf060y8m_aj0_probe(struct mipi_dsi_device *dsi) static void boe_bf060y8m_aj0_remove(struct mipi_dsi_device *dsi) { struct boe_bf060y8m_aj0 *boe = 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(&boe->panel); } diff --git a/drivers/gpu/drm/panel/panel-boe-himax8279d.c b/drivers/gpu/drm/panel/panel-boe-himax8279d.c index 4a8560b4b899..ffcb63f65b75 100644 --- a/drivers/gpu/drm/panel/panel-boe-himax8279d.c +++ b/drivers/gpu/drm/panel/panel-boe-himax8279d.c @@ -881,7 +881,7 @@ static int 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); @@ -891,12 +891,6 @@ static int panel_probe(struct mipi_dsi_device *dsi) static void panel_remove(struct mipi_dsi_device *dsi) { struct panel_info *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-boe-td4320.c b/drivers/gpu/drm/panel/panel-boe-td4320.c index 23558a76dd72..704d5a9c13e7 100644 --- a/drivers/gpu/drm/panel/panel-boe-td4320.c +++ b/drivers/gpu/drm/panel/panel-boe-td4320.c @@ -204,7 +204,7 @@ static int boe_td4320_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"); @@ -216,12 +216,6 @@ static int boe_td4320_probe(struct mipi_dsi_device *dsi) static void boe_td4320_remove(struct mipi_dsi_device *dsi) { struct boe_td4320 *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-boe-th101mb31ig002-28a.c b/drivers/gpu/drm/panel/panel-boe-th101mb31ig002-28a.c index a70a2e58f88c..94cc675973e6 100644 --- a/drivers/gpu/drm/panel/panel-boe-th101mb31ig002-28a.c +++ b/drivers/gpu/drm/panel/panel-boe-th101mb31ig002-28a.c @@ -393,7 +393,7 @@ static int boe_th101mb31ig002_dsi_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_probe(&dsi->dev, ret, "Failed to attach panel to DSI host\n"); @@ -407,8 +407,6 @@ static int boe_th101mb31ig002_dsi_probe(struct mipi_dsi_device *dsi) static void boe_th101mb31ig002_dsi_remove(struct mipi_dsi_device *dsi) { struct boe_th101mb31ig002 *ctx = mipi_dsi_get_drvdata(dsi); - - mipi_dsi_detach(dsi); drm_panel_remove(&ctx->panel); } diff --git a/drivers/gpu/drm/panel/panel-boe-tv101wum-ll2.c b/drivers/gpu/drm/panel/panel-boe-tv101wum-ll2.c index 20b6e11a7d84..2ab7764d4094 100644 --- a/drivers/gpu/drm/panel/panel-boe-tv101wum-ll2.c +++ b/drivers/gpu/drm/panel/panel-boe-tv101wum-ll2.c @@ -200,7 +200,7 @@ static int boe_tv101wum_ll2_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"); @@ -212,12 +212,6 @@ static int boe_tv101wum_ll2_probe(struct mipi_dsi_device *dsi) static void boe_tv101wum_ll2_remove(struct mipi_dsi_device *dsi) { struct boe_tv101wum_ll2 *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-boe-tv101wum-nl6.c b/drivers/gpu/drm/panel/panel-boe-tv101wum-nl6.c index 150dff3ab6c3..7d2672578dd8 100644 --- a/drivers/gpu/drm/panel/panel-boe-tv101wum-nl6.c +++ b/drivers/gpu/drm/panel/panel-boe-tv101wum-nl6.c @@ -1765,7 +1765,7 @@ static int boe_panel_probe(struct mipi_dsi_device *dsi) mipi_dsi_set_drvdata(dsi, boe); - ret = mipi_dsi_attach(dsi); + ret = devm_mipi_dsi_attach(&dsi->dev, dsi); if (ret) drm_panel_remove(&boe->base); @@ -1775,11 +1775,6 @@ static int boe_panel_probe(struct mipi_dsi_device *dsi) static void boe_panel_remove(struct mipi_dsi_device *dsi) { struct boe_panel *boe = 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); if (boe->base.dev) drm_panel_remove(&boe->base); -- 2.43.0