From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wr1-f53.google.com (mail-wr1-f53.google.com [209.85.221.53]) (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 97957449B0A for ; Wed, 12 Aug 2026 13:04:53 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.53 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786539895; cv=none; b=ZR5fehLJ/zaZGKbwbgsc8Mh96xuW0V30QAKyD3XFqKE7jxwiXzaNa2j6Al9P/pVTc/+xkJtbpj+Vm9cEPnv3DhWoyHiTd8/3QfLmADMGReUZZBr9AUz0n1MuUD+pu/E1nKB4iA8G8E8PbfBwNB1QpI8Kdu2BFimgps/vQtgRwFM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786539895; c=relaxed/simple; bh=y57gLkImyGjFokUy9td17f4EjuE010H3YshvR2OTbJw=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=ODC/N0x+dWEa4roeYHwiJz2RZZvhwXWr3yHDERVLbTX0TsiVQ/VHeN6FZ2KNoHhDsWF4J6XKcEdrUJaPVaoHxYxXPzRCj+nnJy/0hzB4rfiurgFBL9pGoVap4DWoWFV+AWWzZ7sb8F+Owi69b56+lCvQpDojfBM8miWFfCB8Fvw= 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=AJ7ueS+d; arc=none smtp.client-ip=209.85.221.53 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="AJ7ueS+d" Received: by mail-wr1-f53.google.com with SMTP id ffacd0b85a97d-47c2b362ee2so752421f8f.1 for ; Wed, 12 Aug 2026 06:04:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1786539892; x=1787144692; 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=UqlYfHnG6VZbJsj6k61b+U/kYDqFPJOHiYZPRPAPZQI=; b=AJ7ueS+d0CuNoGZKEy1J832n4vRSPIRWU3o/Mwiu/WWqoQJwVUyOwDMTt291xJZQ6p +pR9tzFFPjDM+no7tPwYztRBmKbk5gbKoG5YT7/Y8RIDV7PS9pAdy4X/yBZjecKY8Vdl 4EBijR7lYteJaBqNLo2tRlNHBF+qS28vBbt5dLSXS+3gOKlR6C96Rq6g/MBLu/WG95jp WRyFVaGk8VQZU5xCXCogPmk2qNFRYHsd3WcVh13BFOh56koTxKyab0+ibaAk9NuWwpi3 szaqfB/sFPiDiaDIY41htN+j3hPfU5K5QQVcTrCOM1IvGE4K5nAscx/TqUyaeaXi5uQ0 KTOQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1786539892; x=1787144692; 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=UqlYfHnG6VZbJsj6k61b+U/kYDqFPJOHiYZPRPAPZQI=; b=dKXtJhRXSMmqEuQROS0elLCUwgAPHxTTR8ALirlZwWrd0R8fFfhm3BNsOgjMbs3zHc h4Gaqw9hgpR2+I6FLQaoQSglLqbvQGjW58UYfp5uvOOmI0GM3Eqj2LD72OhEs5/xRVaj EU47olccNeX0ysHzRiG4MyxlTt8uHtdEf2ROtvZIh7wavuDcqq0LeygdpOhBCmfJ9CDu DPwocl1C1Qewph2pKwpfc3CGb7427HLIebGmcz0qejfrWsyzTQ7ftK1y5Mu8FHY/Vviu 5BPpIaKkDhRDnpq8B+bqyKCzNLc0XPPcaXKqUF97fsu5sYthVP1oA5mGqMmIY+9+4MWI yNjA== X-Forwarded-Encrypted: i=1; AHgh+Ro+mhnZWgqicbJ59DiEs9IZNq0zexquWIfj/yO0PtUuIIXiVleyQ9Hb3liPF1JNFf39URFtBKITx8n8fiQ=@vger.kernel.org X-Gm-Message-State: AOJu0YzFedvVs9n77sbHvY2DvQFsLmWafdkOF4jMIWWFQkzF3u+Tf3tN 8V3pshNE8+YM2fIn7fW6VuwzwKUQSk+pZd5msfhoh0/N9FT1PH4ZoY8I/SI0P6rP X-Gm-Gg: AR+sD13FQzqFjuYrLHyv2eP2SgUvqcXxb4R7WBOouvLUs3KqHVwvcHRKA5nPv1uXj3z qPLdZrISiYt4O8zpcTRsq3YYmWhfyKH+IgXkxcV2lq3EL+EKaP/CZlUye40bFwyiX01JqPFbcBH R2lAe6e7QTbPEWf+FBqr81dtklm4iRuDfn9bBLN6vlJuXKIYpXzfg5oguYMw9Hz6n5WUdb8hekF kaweCr7DPz26AdX3IF/MSLOsOb/7Cfa3uFXxv5Xr3JXZ+fS0Q3r7817ZgpksB8U+0Hage3DA0lS wM0WGlTK2gA1ynXcejKad/ou5J9J5+U3DUi3dfok0JMzYWzFhkTGloztdLVbiXXboBqznT3Knlc A8PogwhRn9CAE5yCuqva0HIRa2pfTytRkowfX5zl5aOiJLBDqzcertWCDeBRuxKVX9+cXawCG1F vuOvGaadrcEa5SO2iM3kPIu45rrZSyzZki6Uq91LV+vfkql0Hd37CmfLGpnxETplZ3UBB/u1zou Aa01zeE/2pnYn5pIH5D6I5EQA== X-Received: by 2002:a05:6000:41ef:b0:47f:96e3:5309 with SMTP id ffacd0b85a97d-481528bf4eamr6764670f8f.9.1786539891669; Wed, 12 Aug 2026 06:04:51 -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.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 12 Aug 2026 06:04:51 -0700 (PDT) From: Osama Abdelkader To: luca.ceresoli@bootlin.com, Neil Armstrong , Jessica Zhang , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Simona Vetter , Ondrej Jirman , Javier Martinez Canillas , Michael Trimarchi , Michael Walle , Dario Binacchi , dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org Cc: Osama Abdelkader Subject: [PATCH v3 4/6] drm/panel: Use devm_mipi_dsi_attach in Himax and Ilitek panels Date: Wed, 12 Aug 2026 15:04:21 +0200 Message-ID: <20260812130429.16850-4-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 Himax and Ilitek 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-himax-hx83102.c | 7 +------ drivers/gpu/drm/panel/panel-himax-hx83112a.c | 8 +------- drivers/gpu/drm/panel/panel-himax-hx83112b.c | 8 +------- drivers/gpu/drm/panel/panel-himax-hx8394.c | 8 +------- drivers/gpu/drm/panel/panel-ilitek-ili9805.c | 9 +-------- drivers/gpu/drm/panel/panel-ilitek-ili9806e-dsi.c | 3 +-- drivers/gpu/drm/panel/panel-ilitek-ili9881c.c | 4 +--- drivers/gpu/drm/panel/panel-ilitek-ili9882t.c | 7 +------ 8 files changed, 8 insertions(+), 46 deletions(-) diff --git a/drivers/gpu/drm/panel/panel-himax-hx83102.c b/drivers/gpu/drm/panel/panel-himax-hx83102.c index 6a0851ccf9bb..4a28541891a6 100644 --- a/drivers/gpu/drm/panel/panel-himax-hx83102.c +++ b/drivers/gpu/drm/panel/panel-himax-hx83102.c @@ -1318,7 +1318,7 @@ static int hx83102_probe(struct mipi_dsi_device *dsi) mipi_dsi_set_drvdata(dsi, ctx); - ret = mipi_dsi_attach(dsi); + ret = devm_mipi_dsi_attach(&dsi->dev, dsi); if (ret) drm_panel_remove(&ctx->base); @@ -1328,11 +1328,6 @@ static int hx83102_probe(struct mipi_dsi_device *dsi) static void hx83102_remove(struct mipi_dsi_device *dsi) { struct hx83102 *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); if (ctx->base.dev) drm_panel_remove(&ctx->base); diff --git a/drivers/gpu/drm/panel/panel-himax-hx83112a.c b/drivers/gpu/drm/panel/panel-himax-hx83112a.c index 142cb1cc067a..bcd665b7ff88 100644 --- a/drivers/gpu/drm/panel/panel-himax-hx83112a.c +++ b/drivers/gpu/drm/panel/panel-himax-hx83112a.c @@ -305,7 +305,7 @@ static int hx83112a_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(dev, ret, "Failed to attach to DSI host\n"); drm_panel_remove(&ctx->panel); @@ -318,12 +318,6 @@ static int hx83112a_probe(struct mipi_dsi_device *dsi) static void hx83112a_remove(struct mipi_dsi_device *dsi) { struct hx83112a_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); } diff --git a/drivers/gpu/drm/panel/panel-himax-hx83112b.c b/drivers/gpu/drm/panel/panel-himax-hx83112b.c index 41f21f8c1373..1ea5a9dc3ac5 100644 --- a/drivers/gpu/drm/panel/panel-himax-hx83112b.c +++ b/drivers/gpu/drm/panel/panel-himax-hx83112b.c @@ -388,7 +388,7 @@ static int hx83112b_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"); @@ -400,12 +400,6 @@ static int hx83112b_probe(struct mipi_dsi_device *dsi) static void hx83112b_remove(struct mipi_dsi_device *dsi) { struct hx83112b_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); } diff --git a/drivers/gpu/drm/panel/panel-himax-hx8394.c b/drivers/gpu/drm/panel/panel-himax-hx8394.c index 09124610fdc8..7fc7063862c0 100644 --- a/drivers/gpu/drm/panel/panel-himax-hx8394.c +++ b/drivers/gpu/drm/panel/panel-himax-hx8394.c @@ -1025,7 +1025,7 @@ static int hx8394_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(dev, ret, "mipi_dsi_attach failed\n"); drm_panel_remove(&ctx->panel); @@ -1043,12 +1043,6 @@ static int hx8394_probe(struct mipi_dsi_device *dsi) static void hx8394_remove(struct mipi_dsi_device *dsi) { struct hx8394 *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-ilitek-ili9805.c b/drivers/gpu/drm/panel/panel-ilitek-ili9805.c index 5610a225f77b..aadb13eb41e0 100644 --- a/drivers/gpu/drm/panel/panel-ilitek-ili9805.c +++ b/drivers/gpu/drm/panel/panel-ilitek-ili9805.c @@ -307,7 +307,7 @@ static int ili9805_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(&dsi->dev, "mipi_dsi_attach failed: %d\n", ret); drm_panel_remove(&ctx->panel); @@ -320,13 +320,6 @@ static int ili9805_dsi_probe(struct mipi_dsi_device *dsi) static void ili9805_dsi_remove(struct mipi_dsi_device *dsi) { struct ili9805 *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-ilitek-ili9806e-dsi.c b/drivers/gpu/drm/panel/panel-ilitek-ili9806e-dsi.c index 0fb06c425545..a03a1b4411ad 100644 --- a/drivers/gpu/drm/panel/panel-ilitek-ili9806e-dsi.c +++ b/drivers/gpu/drm/panel/panel-ilitek-ili9806e-dsi.c @@ -141,7 +141,7 @@ static int ili9806e_dsi_probe(struct mipi_dsi_device *dsi) if (ret) return ret; - ret = mipi_dsi_attach(dsi); + ret = devm_mipi_dsi_attach(&dsi->dev, dsi); if (ret < 0) { dev_err_probe(dev, ret, "Failed to attach to DSI host\n"); ili9806e_remove(dev); @@ -153,7 +153,6 @@ static int ili9806e_dsi_probe(struct mipi_dsi_device *dsi) static void ili9806e_dsi_remove(struct mipi_dsi_device *dsi) { - mipi_dsi_detach(dsi); ili9806e_remove(&dsi->dev); } diff --git a/drivers/gpu/drm/panel/panel-ilitek-ili9881c.c b/drivers/gpu/drm/panel/panel-ilitek-ili9881c.c index 3abdd0870e83..ca7037a4242c 100644 --- a/drivers/gpu/drm/panel/panel-ilitek-ili9881c.c +++ b/drivers/gpu/drm/panel/panel-ilitek-ili9881c.c @@ -2597,14 +2597,12 @@ static int ili9881c_dsi_probe(struct mipi_dsi_device *dsi) dsi->format = MIPI_DSI_FMT_RGB888; dsi->lanes = ctx->desc->lanes; - return mipi_dsi_attach(dsi); + return devm_mipi_dsi_attach(&dsi->dev, dsi); } static void ili9881c_dsi_remove(struct mipi_dsi_device *dsi) { struct ili9881c *ctx = mipi_dsi_get_drvdata(dsi); - - mipi_dsi_detach(dsi); drm_panel_remove(&ctx->panel); } diff --git a/drivers/gpu/drm/panel/panel-ilitek-ili9882t.c b/drivers/gpu/drm/panel/panel-ilitek-ili9882t.c index 6d07fe901357..896de9460aa8 100644 --- a/drivers/gpu/drm/panel/panel-ilitek-ili9882t.c +++ b/drivers/gpu/drm/panel/panel-ilitek-ili9882t.c @@ -844,7 +844,7 @@ static int ili9882t_probe(struct mipi_dsi_device *dsi) mipi_dsi_set_drvdata(dsi, ili); - ret = mipi_dsi_attach(dsi); + ret = devm_mipi_dsi_attach(&dsi->dev, dsi); if (ret) drm_panel_remove(&ili->base); @@ -854,11 +854,6 @@ static int ili9882t_probe(struct mipi_dsi_device *dsi) static void ili9882t_remove(struct mipi_dsi_device *dsi) { struct ili9882t *ili = 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 (ili->base.dev) drm_panel_remove(&ili->base); -- 2.43.0