From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wm1-f44.google.com (mail-wm1-f44.google.com [209.85.128.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 AFE753A7F50 for ; Tue, 11 Aug 2026 16:53:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.44 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786467210; cv=none; b=rtYhN5LEGA8g42KiIwg7Abd8+8tB3hemH97OlUSmVPnfc8ssSex5rLGiTJpwprCSRl/z9AnSoLyvNEYvIKNbOtkWHMFjpJvGKrjbvIiPSiLQqPKozWyr2COtj0+nTEXe1FMDduzzXmUtn52gV0+ogF6L0IGYwN2TJ+u42fOmflA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786467210; c=relaxed/simple; bh=tTiDc9n2Jm0gzZEcT1n2PEJ1dm3gR+sdVOE+hkUCivI=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=lVrx2AWEeYiZ+O8eDyDmPFOncAF8LXOBghmxzIAav3atVO/gbsUXRzxcCCTDhF0VU2OWUXZEM5DcmD7JhNeo7XtoXF/htSny6O3jxrupUrXyTIk6av2mlv4agpuBnxxY3DW/PRMF8o0g8RrieauMl42GzlWwR01H3wTApi068fs= 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=bzcGBZri; arc=none smtp.client-ip=209.85.128.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="bzcGBZri" Received: by mail-wm1-f44.google.com with SMTP id 5b1f17b1804b1-4995b0343c1so30099425e9.3 for ; Tue, 11 Aug 2026 09:53:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1786467207; x=1787072007; 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=TumqbBnHVFtg/n3tj+8i/zqJnSlm+zAXDPXjqg6razk=; b=bzcGBZrioAjONasgvOepw333b6RoHDVolitc+H7yZW2DtOQ80dTILWLuyJ3PWGJmgm M5vF0OYQOjq+vmYT4krdOK0KEtzDzqNdImj4HycZnY/ps0l2ftJP09vSenvWeItc6owd n2wJuUlBiVxp9J/bnErnBw/YoTQH9vPKw1A5WQp58Ar8hCy8tM8jIqy0lquNRUirmGiQ 2iQoMk6vEEmDBvtll2szTwF0wBzH5axL9nR+z4Oivf/ezsRbY/o9k8PHQvPUUaf382Zr gwW7sxV1rqogqcsiU9xNA5JdoDIoIxEt1taVq4Q4tBHOFzNZfFEakymTzVcjhQbgNRW6 +G4Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1786467207; x=1787072007; 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=TumqbBnHVFtg/n3tj+8i/zqJnSlm+zAXDPXjqg6razk=; b=rIg7sRuhyZcjH8TKfOJ9ZJ0CrVlkL2hG5Em451IaXtwE1dmVBeRlt1W3C345zU+6dV WtLJq3G1IKZgdVBI5lGmxhIPmFeoPV5omCZhdAorRzIRCE5K/p8qgjtwmUdUe+MTOZhX VFpXpFHrt1d78bgxM1Vf7ZbIfSnrFRwIrN2NY3lwL4daCrHdNk9+h+15cWRdTwiLPbql AU2Q8P4aN07qMUiWfgrwUqJFzhlpjFNhxmndP5sbQlAdldfmLaMuffXjtFwfzGFxOuY4 7etCdQwO4KDfHHGpeFnT6lR6kcbZBLyf65aQqmnGvuVzO6R7r5P2GklirkTkW0pdR5Yl nLag== X-Forwarded-Encrypted: i=1; AHgh+Rp1WJwJMluQmeiWuh4gCA8FewieKV9cB2DO3W5Sz54rrmjRyW1yRhqbeNRBUEt5ifdJuol/HVf9Kif3l0I=@vger.kernel.org X-Gm-Message-State: AOJu0YyVaDjnTkwENcaBNBGqC7YSVXM36OkIbeC+IL8xbDEgzJXQ1H5V skFO6Bl+a/bbyb9Ez4YVGrTfKGIEx2vnuqfAG4vugFmdA+lp+aj9BIVX X-Gm-Gg: AR+sD13+TcVV9qiO38pYUPusOwbhFFQoLuGCWWKxp3RRdA+TCj77c6naE8IvOewZ3rx cCQkOPcSZd+zbKAs8L1reT9cfHps3OunBArd3Lm6dQ+Maq+EpdfhbWNn7YTzkn7bWvq4WUyLPA9 287dLXdHRgv56LWGKRDZA9qo2MtMd/GehAEvhYZa26Pi18/GtnYnb/xtM/LovuYryA1FldLzY36 uuOu/ZjntGCJe7MhOhVEGuUOvnSyNok05VRRuhB79gaRJmbYbRctqM6WXrh79HGZbM73dCk/R6b KKSHWu5ic3UezMzBGXqzwGGULBRzevbPB3yMrvKsaSQ8D3x0/4sZPXT/67N8fPUJp2wTw2PkcEH 1U8lWzxXHUFCtet7mXkoKt+vfC8eD/Qt9YlG9cm9auc3Epiem/06fSjMnoMZ35VadHD7omdLNFE +nLnjeuC5Z0xQJWg1JVWmpwwpQvpyCrc2jan5lTO/UKNNbG0M91x79IAFddvHvcI633f0FNgby5 m35Xk9RXytSZlkPdAAEETYG X-Received: by 2002:a05:600c:3553:b0:493:cc25:85cb with SMTP id 5b1f17b1804b1-4997844ed1cmr64030145e9.8.1786467206592; Tue, 11 Aug 2026 09:53:26 -0700 (PDT) Received: from osama.. ([2a02:908:185:7e40:434a:d6cf:4fd1:90b]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4997aaa5d04sm6371845e9.2.2026.08.11.09.53.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 11 Aug 2026 09:53:26 -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 v2 4/6] drm/panel: Use devm_mipi_dsi_attach in Himax and Ilitek panels Date: Tue, 11 Aug 2026 18:53:21 +0200 Message-ID: <20260811165323.14168-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 Himax and Ilitek 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-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