From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wm1-f46.google.com (mail-wm1-f46.google.com [209.85.128.46]) (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 B64062BEC4E for ; Tue, 11 Aug 2026 15:10:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.46 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786461058; cv=none; b=I4uQgAkrZCmaejQhwPVANupvYgx+5H36WyVLUzpxT6TbldPcLFD2X1b3itS6LmcTfLrXVrjM+5yQGB6y65zpbxTpcT+4u8KJF2fIKwTXCyRP5Rq7q/ExXq91r8MFu67lMPy+frVKy9xVI+5+PVcN7zh3A62y3IKVOVwkhsR46gE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786461058; c=relaxed/simple; bh=MYjUV7G3TEsaZbkkrMhd65XWrqmDHTKkObVj1anAEQU=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=W9rhZTH3Kc3EEXaAs5AUb7DHENe2ydHm2ahuhDgpJmwUoCRUBodROT+AJMJmAz0GELakzx1B4ohgEo1v4Ob0Ir9eEsYU5CbZYZ9DleHXqZc4ryhxcKPiPaVGM1L/0YXdTLyrmb0R6beDvCK3DUOKKAyvILN0ufHr3uD2w78x6PQ= 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=i57M+C5S; arc=none smtp.client-ip=209.85.128.46 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="i57M+C5S" Received: by mail-wm1-f46.google.com with SMTP id 5b1f17b1804b1-49553515a8bso50910885e9.1 for ; Tue, 11 Aug 2026 08:10:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1786461053; x=1787065853; 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=UEbHzsuEkNRECnH40rELRH3/NmWH1R+swCCqJeMq5nU=; b=i57M+C5SWrqhR1zmv5Z3zjkgFcMFB826KY0j9msM2jUAex/xl5kp6Fuat5YFZP3B/H gXzgV4BOKAVPEr7unG4/Z+qpU9pllXzIXEpdSrJzB4KCXKeplTbHxRV2w2JUuItH7Ex7 licJOfvzmpa64zZViqtUqeRhrGZqED2lyOrRUKXejysyrpYR6Q5asMDwR3+gFgz4EQtl woRiX1yaC00gntbJ06tqMVZsWC/fpmZkuB+MfSZZSa7UERei4ckGpwkx1Q/fMn46r/+0 4rOyNOq+8BjHd7LBdVuUm2Ol+XLBqgDJivIvURU8eET0jcXWSok+DljsuP19KKpqZt3f VBgw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1786461053; x=1787065853; 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=UEbHzsuEkNRECnH40rELRH3/NmWH1R+swCCqJeMq5nU=; b=lqrSzXUdUBGX6SkkxIETjPsa1Q0zponi6Tf7WXwT6dutkP4F3wie0/ObBo+8f8DhYQ bDmUCXn0ZROf8YNQgjtyPr4Xfl6CNBugQVHXa4L9pJBDNlYAfRMUwECSA5+Xm/ZxEyQi Rf5iCTAW0Nb6cyr5Ytdg1u0R6VCnnUWku3rOfAUALUMytOU7iS2JnpuGSME7RqtOTvp9 QT5ZA/clYKt+SG2+5QDAZcbsGFYIco5knXPo+zDwxzBijRlsalNRAkrFxd+kMTGR9sqQ ugpLiidb1HREFyUjng4mn4bpbMhBGjoCcl+n5FiDErgkpPRF1A1DzKgNaG5mjgL0TGOY 94Mg== X-Forwarded-Encrypted: i=1; AHgh+RroGRyiW/yUbdeObLfhp5V1eAGM261pOOQ9n9GDeCfjrzlZ8Q4+RjInM8elhvrk3FpZVb1u72oPfCj2qkw=@vger.kernel.org X-Gm-Message-State: AOJu0YwKVjhjrrqsH/I+UIksuqnFmhxMKy3GIPyg7CBUlUbU7qc8lrEj 93hsBIZoyss6oqVOAfKQb67PJivnYDnpS51HCLHDfm3Iysjk8SF8FnJr X-Gm-Gg: AR+sD12rs3RbJAozE/G6lycsvrz3D1SSrTezXYu6Kb2LT4x4ElvW0h0IzuVtyRTRG/0 JiocJoqQW4asnaELfUWAF4o4HN5qRpmbpEl88cIdcMqs97n3c1d55xyx6bQPhJZoEwHiPkQVrgm CBodJjR9Qn1ofW/YRM3yMYSUnXS3Nmu2YAGe3IVPAEDyoDgWj67M24A2wR01yRG4lKoPQPndJUO Xh/yFpE6BtFpKhEDI90Ue+KbB0lipRyfoaZFbvdHUZJrbJ5dQdz49FiBUv9iMvXFZ+Ine0Q34ak P8bju7fGXWJj/fomvKJ4b/arSAxP7Qb2F4AA6NmNsaanzqMUidHOwGRNNQWZkZLP6JOgBt8aGzN uPLukMjcxvwzWIiZs4QP2O0RPDuaBMmPlA7ePB9O8a6LDEn+OIYTUKNg8BPj5mV5s8dqRnID76G tkiF9aRSNVhgJ4y3cVUhe6JP3AJMkDAgjzKA+2vTua2qNGATT13LV2SCHW0jW5gdNjtGBpYq/CL jQtFIhG82TFh/yrjKGdcdDb X-Received: by 2002:a05:600c:6306:b0:495:779a:ed33 with SMTP id 5b1f17b1804b1-4997843ccbcmr75715785e9.7.1786461053005; Tue, 11 Aug 2026 08:10:53 -0700 (PDT) Received: from osama.. ([2a02:908:185:7e40:b0cf:778:ae86:13b1]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-49977e57785sm54307265e9.2.2026.08.11.08.10.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 11 Aug 2026 08:10:52 -0700 (PDT) From: Osama Abdelkader To: 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 4/6] drm/panel: Use devm_mipi_dsi_attach in Himax and Ilitek panels Date: Tue, 11 Aug 2026 17:09:48 +0200 Message-ID: <20260811151000.75038-5-osama.abdelkader@gmail.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260811151000.75038-1-osama.abdelkader@gmail.com> References: <20260811151000.75038-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. --- 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