From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wm1-f42.google.com (mail-wm1-f42.google.com [209.85.128.42]) (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 9871C2F532F for ; Tue, 11 Aug 2026 16:51:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.42 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786467062; cv=none; b=nYCXOQnHGB3ZIS8t/WTOVcBe9WiLCusPQunqFPWy/Yvozo6x0WxjTmlMu9Iwq/YchQ3qKE1WQbPKeUCS/slZBjKQgOQRgRW+hAa/A5G9KKtZWPT6mIpIg4sVwQff87ktHaS1nlRUnTzhFYfFDHgxjx1rMgC2CEYgEJYPIT4bExI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786467062; c=relaxed/simple; bh=H2a0DMDrEWN8cnTHo6KVop511lE6ewTls1bN8rUbxlY=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=mQRlP4P4lWKKTdP1qAB+ZtVTznpRv/m6cbnINaXfM4FrrPtY5ua+eXYxtHykh5hJKYq+YfnGkh/FE8AwdVRCXkVuon+C78jRNt2P46K15X4qLNssVkWvG5oL2TDv++w4vCYFUTxMaxtzpGYaJnJGKLiVIVAX19jJzaFyMuci5bE= 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=hw1xLjrZ; arc=none smtp.client-ip=209.85.128.42 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="hw1xLjrZ" Received: by mail-wm1-f42.google.com with SMTP id 5b1f17b1804b1-4954d29264cso5941425e9.2 for ; Tue, 11 Aug 2026 09:51:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1786467059; x=1787071859; 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=K2+JE1x+X5o7mEQxwM8IWJDe+MFPE9zYYrpiHBojfUM=; b=hw1xLjrZRv34hJu3xxYZI9u1pGQECHE8LKi1UpvBHhNJYSoJiE897/odGZwoDN4bzd 5ZP+Og1x76Z3wLIVty5IeTZnTBj7NTiZjQ0AQJy4st+gkk4by6G09hJ6ulgG2n0oy9E9 adL8vsRHukssOuCyS+/LogJ+jVoxssJ08gV7XwJwwY1CihGgvaTV2ljoeC7hXIV+2it9 2JgcDB3s/FTRteD0vzW7+7uEYBv2CXis6iQekFT0M8Wk1byF5x4VmmHx6b9ixJIyoTMV nZsq+IFdtMg9YXEcWNp+asn/UqwmyZI/W8KhlenFD2qWabzMCCxhR3eQ7PqCmlomTwTu QMRg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1786467059; x=1787071859; 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=K2+JE1x+X5o7mEQxwM8IWJDe+MFPE9zYYrpiHBojfUM=; b=kActH2C1dGe4PvuZbshITohm0DDeFy3EG0bKpnbCuCEhzMyRi1yb2mDc+TKZ+S1K3B e/UQ+BqlrsFbR51ivfRlsErIgVzu6fIXVnpaOuLfgl9PFrekUi4/E/v/6afWxOaEhQ2q eFK++X7hkL+Ftic4icNEDx8RQ+vjXheucpcakNv3WoWy65YrMHNKdSVgRA9MSfLTgX5t keai8eeWUjrw7U9gH4K2sq/ClJleLCpuZE0jEnyg7Csl9n2vM8xryXRryEFUx3prz2EB TRkqAyFcfvXwRFV6IpfrlN7wo0xwzdAFgdAH5OWeKpdc7PhXDaflAD7CRAf5zVzV0r9c ffdw== X-Forwarded-Encrypted: i=1; AHgh+RoWEd/ieRRZvdEht16+c/UhWnowmdahU8QHiTseCHbpK4sQFsBwIJAZBxH4BWm2xB9ex/QMtl1VOLZByV0=@vger.kernel.org X-Gm-Message-State: AOJu0YzfXs70IFuoNuGG5Zh5NRb6SS57T1MRZVeeuvKxekNrLGDRk2iJ 1L5Bi5S25af0eq5OuZFh71DcTE5MY6MGEd3v5iOn0qUhekiiKQbVKckJ X-Gm-Gg: AR+sD100UgBg6XLO3P9UYM4gdsiDsR8nmY7kjOZ682NwASbjENbISSN5LnsrIsRo5Gn qEjRytY3CwKTQr3SKvoQ2ai1b67erZnF3RW5ikRtKtZpT0V+89GdE1A/FCkN8fQuyC+QNCOPPjZ VRxkPJ/e76f/75YWZZ0rXePRQGnXyJ33gXNosgxSS2AEQ76UG3/qPHUQgRaGS42NBNrPuM7XzT0 61ReGTmFk0a7Y/mY3KsOF8K0UkNRywWpjoCbfrrG8MKbUDXLxdUQks3z4SB55KhTu90qyqnaPpv UJbKXz0TBi2OFFtMbbJTAboIyyO8x+bWJOWUVm+SIvD5kbRk5r2tjjvOV1wfoL8s4D/gkTloFGg FaYyO94tbpaVE1Lfd+lKWuPcE0iiIr9dU7vJxRLXfj2yR/xYqq3l5pWkzkpTom7JztYx5ANmjyZ t1njF/9AAqB9J8+j5b88+WXpxtgQOk8UEdGoJ7R+/O5GRLfk9WXi1S9t+p5OjB8Ot4VFH++PvWA nk7vp4s2RPrWIaS9sBGVIEMFA== X-Received: by 2002:a05:600c:a08c:b0:493:e983:806e with SMTP id 5b1f17b1804b1-4997a5bc30fmr26660125e9.3.1786467058477; Tue, 11 Aug 2026 09:50:58 -0700 (PDT) Received: from osama.. ([2a02:908:185:7e40:434a:d6cf:4fd1:90b]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4997aab4ea6sm11425975e9.10.2026.08.11.09.50.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 11 Aug 2026 09:50:58 -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 v2 1/6] drm/panel: Use devm_mipi_dsi_attach in BOE panels Date: Tue, 11 Aug 2026 18:50:35 +0200 Message-ID: <20260811165037.12437-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 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