From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wm1-f47.google.com (mail-wm1-f47.google.com [209.85.128.47]) (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 5C5852EEE6E for ; Tue, 11 Aug 2026 16:53:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.47 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786467223; cv=none; b=Iiz+OlFNNFwjpleodpGurXvHW6+HrsVsFVMj3cg/P1JqUH7l7fpSc4RuivynDuvDB6IQgUl0Ft7xKiZ3Hpb96YDcKJQQMO0PE1xZbr+DVxiUG4xkf+YFdzWxrQHmWMQO721630tZen0VWGEAFOjAVM/1mRWoTw1Oy2YB9OZFSqI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786467223; c=relaxed/simple; bh=gRJSj8kBUJV31qg0+3EUTClLmYvOiHbdwybqfBgewSk=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=qyBGTZjl4gsCKI4ZDgyAcHFRiff76cydpcrLmHO4JFH5QgiBJR2EayKBHcxlSwYM6Ss07v6BDb2A4TiYk2EXTkFEmv60HzhnugSgmyNQu0IHOQpO30AhkHUY9xX3c/aakfCg3L132GJx6N+BpmDGWAgpwwejHcqZmKbkng1cGLs= 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=ZhRRSYSA; arc=none smtp.client-ip=209.85.128.47 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="ZhRRSYSA" Received: by mail-wm1-f47.google.com with SMTP id 5b1f17b1804b1-4957eefd361so16035e9.1 for ; Tue, 11 Aug 2026 09:53:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1786467219; x=1787072019; 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=utlT2uUQzdRUww5rygwGaoyBNBp4hH6JMcjmwhuHBtQ=; b=ZhRRSYSA5zWzEwJT0N9vlKFfn9daAisvMk+EVVFV3OkkkZtfscaAFzck9M8028eh0g vnLeQ5hUUCMFg+p62y8KgoGIqHIg3HC50d7q/525moVspEAsXgbSSnh5U6onil/ulvX8 6VVRwcZWQ90JnR05ng5xcfAl1Q3OGYmI1utPG48FqZi87zrg/Ygy24Boy0opt6txLAKE +98Byb0coqRV2cIDxbF47Bz6hJp6V1rbO+ZCrIRMaLoohe/WCrPyxPcw5uAxZwoXlmK5 Dpfb/f32Blx/6e2o597lOxUrhg26EyI4N0JfYDs8TenHShiL1CBpHYYYaRlmxk9HL0ux P5Qw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1786467219; x=1787072019; 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=utlT2uUQzdRUww5rygwGaoyBNBp4hH6JMcjmwhuHBtQ=; b=fEK0lkz+vTGf3PZ7SzbcMOzI23Hb8M+joqbI8LU8ZNudxrR3erIwqzenGRICgWQIRi ghkj0zmpxUHZy4GBNBy2tPZ7j9GzjZNS26begBHcE/LigQdoc7eFFQweDEB/0fVThspE 622/oWDvpOB2j8lkKnpvTxQ4bOvEM+VIpv5dF4u/P3SIIIKnGXD57cMEoQksp207clrG dJ/uZh1MKlHvsPyoJDYqc5pquXa6PoT09sO1ihOZBcJ4DZFMp30aden2k7aCdgActtcq hKWrI2OZSockXxAq3KNO7iBOfIskwoH6hJy6Y2oGRbIxw2R4/sJgF+vbDcRIvN/S76qX 7LIg== X-Forwarded-Encrypted: i=1; AHgh+RrkPplMS108+OL0Ydz5cqVv6SK3pSn0fGzSGF5fYiBitkYG1mrn7F1XQePlricQ9yqscCzYAe1A8eQtYb0=@vger.kernel.org X-Gm-Message-State: AOJu0YzS+5EUmDBPuVCHFDGdCPVu8Edj+Uvg2KBB+RModMZfz1tNrtfX ITChKtYj/jY2I5L+DaLnpaWp82MYWx+8M02eJb8FL5NFllb0znislofn X-Gm-Gg: AR+sD13+sFamcKJFQRik/eVy3RCY2B//Jq77xqazGzGDE8CkJTusHhwRC1JhZnHT00P 7OSFF36rqZcOjlR93oEpcTZvWzR7Xk+64ZCCqx97Ao5Nzh5LvU9PiWsqbIuF6c48ppUclG2RQ0H 5QFRhw+Kqp923HW/ERjJGLrBH4UM8zp/ma6JAZjmk9umt0hJLObzw0z2IsbPcYEf5oaVE+Up0ir xxg8v0RJlvXhRth2OzEQOl9OtG5Tr2GsQu66gilbRqRtHf8QtwwmzNm+UtZ1vezgX+5uaweo0vs Z+Usiz0lov8gRAcNlVROQN3IFUotkzQk6M4Ymf9Rj0MSE0KwpjjCgugFkrBPJkXAx/gED/gobAE Fz/lf8hk4QHzq6xnsmycAnN1xRzEoIn+5QiwcP/97RUNkf6gJ79gtIrK4XwjUG29zkj2dDBR75X Cp05Pwo7Tv0ebulNgApXRPSrM4HsA+eEvjWY2JqUM+ZxrUUfIozIpQnw4BbAuby7CYrAbnlP7sE mn8G1ISwDs29dL/d8rDKkh5 X-Received: by 2002:a05:600c:4705:b0:498:8e6:d464 with SMTP id 5b1f17b1804b1-499784737ccmr75785185e9.14.1786467218953; Tue, 11 Aug 2026 09:53:38 -0700 (PDT) Received: from osama.. ([2a02:908:185:7e40:434a:d6cf:4fd1:90b]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4997abeba30sm4794825e9.9.2026.08.11.09.53.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 11 Aug 2026 09:53:38 -0700 (PDT) From: Osama Abdelkader To: luca.ceresoli@bootlin.com, Neil Armstrong , Jessica Zhang , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Simona Vetter , dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org Cc: Osama Abdelkader Subject: [PATCH v2 5/6] drm/panel: Use devm_mipi_dsi_attach in display vendor panels Date: Tue, 11 Aug 2026 18:53:34 +0200 Message-ID: <20260811165337.14348-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 JDI, Sharp, Sony, Visionox and Leadtek 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-jdi-fhd-r63452.c | 8 +------- drivers/gpu/drm/panel/panel-jdi-lt070me05000.c | 8 +------- drivers/gpu/drm/panel/panel-leadtek-ltk050h3146w.c | 8 +------- drivers/gpu/drm/panel/panel-leadtek-ltk500hd1829.c | 8 +------- drivers/gpu/drm/panel/panel-sharp-ls043t1le01.c | 7 +------ drivers/gpu/drm/panel/panel-sharp-ls060t1sx01.c | 8 +------- drivers/gpu/drm/panel/panel-sony-td4353-jdi.c | 8 +------- drivers/gpu/drm/panel/panel-sony-tulip-truly-nt35521.c | 8 +------- drivers/gpu/drm/panel/panel-visionox-r66451.c | 8 +------- drivers/gpu/drm/panel/panel-visionox-rm69299.c | 4 +--- 10 files changed, 10 insertions(+), 65 deletions(-) diff --git a/drivers/gpu/drm/panel/panel-jdi-fhd-r63452.c b/drivers/gpu/drm/panel/panel-jdi-fhd-r63452.c index cbe354b51bce..ce299160d3ab 100644 --- a/drivers/gpu/drm/panel/panel-jdi-fhd-r63452.c +++ b/drivers/gpu/drm/panel/panel-jdi-fhd-r63452.c @@ -202,7 +202,7 @@ static int jdi_fhd_r63452_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); return ret; @@ -214,12 +214,6 @@ static int jdi_fhd_r63452_probe(struct mipi_dsi_device *dsi) static void jdi_fhd_r63452_remove(struct mipi_dsi_device *dsi) { struct jdi_fhd_r63452 *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-jdi-lt070me05000.c b/drivers/gpu/drm/panel/panel-jdi-lt070me05000.c index 01bd748aecec..d9cba45eb729 100644 --- a/drivers/gpu/drm/panel/panel-jdi-lt070me05000.c +++ b/drivers/gpu/drm/panel/panel-jdi-lt070me05000.c @@ -380,7 +380,7 @@ static int jdi_panel_probe(struct mipi_dsi_device *dsi) if (ret < 0) return ret; - ret = mipi_dsi_attach(dsi); + ret = devm_mipi_dsi_attach(&dsi->dev, dsi); if (ret < 0) { jdi_panel_del(jdi); return ret; @@ -392,12 +392,6 @@ static int jdi_panel_probe(struct mipi_dsi_device *dsi) static void jdi_panel_remove(struct mipi_dsi_device *dsi) { struct jdi_panel *jdi = 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); jdi_panel_del(jdi); } diff --git a/drivers/gpu/drm/panel/panel-leadtek-ltk050h3146w.c b/drivers/gpu/drm/panel/panel-leadtek-ltk050h3146w.c index 0856df5a6ee2..b660d7055810 100644 --- a/drivers/gpu/drm/panel/panel-leadtek-ltk050h3146w.c +++ b/drivers/gpu/drm/panel/panel-leadtek-ltk050h3146w.c @@ -585,7 +585,7 @@ static int ltk050h3146w_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); @@ -598,12 +598,6 @@ static int ltk050h3146w_probe(struct mipi_dsi_device *dsi) static void ltk050h3146w_remove(struct mipi_dsi_device *dsi) { struct ltk050h3146w *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-leadtek-ltk500hd1829.c b/drivers/gpu/drm/panel/panel-leadtek-ltk500hd1829.c index 7f19fd5b8060..6ec6f81877aa 100644 --- a/drivers/gpu/drm/panel/panel-leadtek-ltk500hd1829.c +++ b/drivers/gpu/drm/panel/panel-leadtek-ltk500hd1829.c @@ -651,7 +651,7 @@ static int ltk500hd1829_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); @@ -664,12 +664,6 @@ static int ltk500hd1829_probe(struct mipi_dsi_device *dsi) static void ltk500hd1829_remove(struct mipi_dsi_device *dsi) { struct ltk500hd1829 *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-sharp-ls043t1le01.c b/drivers/gpu/drm/panel/panel-sharp-ls043t1le01.c index 989b030ea22d..11615551e8a6 100644 --- a/drivers/gpu/drm/panel/panel-sharp-ls043t1le01.c +++ b/drivers/gpu/drm/panel/panel-sharp-ls043t1le01.c @@ -244,7 +244,7 @@ static int sharp_nt_panel_probe(struct mipi_dsi_device *dsi) if (ret < 0) return ret; - ret = mipi_dsi_attach(dsi); + ret = devm_mipi_dsi_attach(&dsi->dev, dsi); if (ret < 0) { sharp_nt_panel_del(sharp_nt); return ret; @@ -256,11 +256,6 @@ static int sharp_nt_panel_probe(struct mipi_dsi_device *dsi) static void sharp_nt_panel_remove(struct mipi_dsi_device *dsi) { struct sharp_nt_panel *sharp_nt = 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); sharp_nt_panel_del(sharp_nt); } diff --git a/drivers/gpu/drm/panel/panel-sharp-ls060t1sx01.c b/drivers/gpu/drm/panel/panel-sharp-ls060t1sx01.c index 0456f3d705e7..236d45121a44 100644 --- a/drivers/gpu/drm/panel/panel-sharp-ls060t1sx01.c +++ b/drivers/gpu/drm/panel/panel-sharp-ls060t1sx01.c @@ -235,7 +235,7 @@ static int sharp_ls060_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); @@ -248,12 +248,6 @@ static int sharp_ls060_probe(struct mipi_dsi_device *dsi) static void sharp_ls060_remove(struct mipi_dsi_device *dsi) { struct sharp_ls060 *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-sony-td4353-jdi.c b/drivers/gpu/drm/panel/panel-sony-td4353-jdi.c index a14c86c60d19..08e4adf9e0f0 100644 --- a/drivers/gpu/drm/panel/panel-sony-td4353-jdi.c +++ b/drivers/gpu/drm/panel/panel-sony-td4353-jdi.c @@ -216,7 +216,7 @@ static int sony_td4353_jdi_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); @@ -229,12 +229,6 @@ static int sony_td4353_jdi_probe(struct mipi_dsi_device *dsi) static void sony_td4353_jdi_remove(struct mipi_dsi_device *dsi) { struct sony_td4353_jdi *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-sony-tulip-truly-nt35521.c b/drivers/gpu/drm/panel/panel-sony-tulip-truly-nt35521.c index 216a6ad8696e..5ce8b1cdf024 100644 --- a/drivers/gpu/drm/panel/panel-sony-tulip-truly-nt35521.c +++ b/drivers/gpu/drm/panel/panel-sony-tulip-truly-nt35521.c @@ -474,7 +474,7 @@ static int truly_nt35521_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); @@ -487,12 +487,6 @@ static int truly_nt35521_probe(struct mipi_dsi_device *dsi) static void truly_nt35521_remove(struct mipi_dsi_device *dsi) { struct truly_nt35521 *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-visionox-r66451.c b/drivers/gpu/drm/panel/panel-visionox-r66451.c index 690cccedd438..40bbc3ea6958 100644 --- a/drivers/gpu/drm/panel/panel-visionox-r66451.c +++ b/drivers/gpu/drm/panel/panel-visionox-r66451.c @@ -306,7 +306,7 @@ static int visionox_r66451_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); @@ -318,12 +318,6 @@ static int visionox_r66451_probe(struct mipi_dsi_device *dsi) static void visionox_r66451_remove(struct mipi_dsi_device *dsi) { struct visionox_r66451 *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-visionox-rm69299.c b/drivers/gpu/drm/panel/panel-visionox-rm69299.c index 50f8a84537ca..7a60b1d436df 100644 --- a/drivers/gpu/drm/panel/panel-visionox-rm69299.c +++ b/drivers/gpu/drm/panel/panel-visionox-rm69299.c @@ -388,7 +388,7 @@ static int visionox_rm69299_probe(struct mipi_dsi_device *dsi) dsi->format = MIPI_DSI_FMT_RGB888; dsi->mode_flags = MIPI_DSI_MODE_VIDEO | MIPI_DSI_MODE_LPM | MIPI_DSI_CLOCK_NON_CONTINUOUS; - ret = mipi_dsi_attach(dsi); + ret = devm_mipi_dsi_attach(&dsi->dev, dsi); if (ret < 0) { dev_err(dev, "dsi attach failed ret = %d\n", ret); goto err_dsi_attach; @@ -404,8 +404,6 @@ static int visionox_rm69299_probe(struct mipi_dsi_device *dsi) static void visionox_rm69299_remove(struct mipi_dsi_device *dsi) { struct visionox_rm69299 *ctx = mipi_dsi_get_drvdata(dsi); - - mipi_dsi_detach(ctx->dsi); drm_panel_remove(&ctx->panel); } -- 2.43.0