lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20250625-drm-dsi-host-no-device-ptr-v1-5-e36bc258a7c5@bootlin.com>
Date: Wed, 25 Jun 2025 18:45:09 +0200
From: Luca Ceresoli <luca.ceresoli@...tlin.com>
To: Maarten Lankhorst <maarten.lankhorst@...ux.intel.com>, 
 Maxime Ripard <mripard@...nel.org>, Thomas Zimmermann <tzimmermann@...e.de>, 
 David Airlie <airlied@...il.com>, Simona Vetter <simona@...ll.ch>, 
 Andrzej Hajda <andrzej.hajda@...el.com>, 
 Neil Armstrong <neil.armstrong@...aro.org>, Robert Foss <rfoss@...nel.org>, 
 Laurent Pinchart <Laurent.pinchart@...asonboard.com>, 
 Jonas Karlman <jonas@...boo.se>, Jernej Skrabec <jernej.skrabec@...il.com>, 
 Inki Dae <inki.dae@...sung.com>, Jagan Teki <jagan@...rulasolutions.com>, 
 Marek Szyprowski <m.szyprowski@...sung.com>, 
 Jani Nikula <jani.nikula@...ux.intel.com>, 
 Dmitry Baryshkov <lumag@...nel.org>
Cc: Hui Pu <Hui.Pu@...ealthcare.com>, 
 Thomas Petazzoni <thomas.petazzoni@...tlin.com>, 
 dri-devel@...ts.freedesktop.org, linux-kernel@...r.kernel.org, 
 linux-sunxi@...ts.linux.dev, Luca Ceresoli <luca.ceresoli@...tlin.com>
Subject: [PATCH 05/32] drm/mipi-dsi: log DSI device attach and detach

Some MIPI DSI host drivers log a line on attach success, failure, or
attempt. These log lines are inconsistent and sparse across
drivers. Moreover most of them use the "info" logging level, but drivers
should be mostly or totally silent when successful.

Add logging in the DSI core, so that it is consistent across drivers and
not redundant. Log for both attach success and failure, and while there
also log on detach. Print the main format parameters on each line (lanes,
bpp and mode flags). Finally, use "debug" logging level (except for the
"error" logging level in case of failure).

Later commits will remove the now-redundant logging in individual drivers.

Signed-off-by: Luca Ceresoli <luca.ceresoli@...tlin.com>
---
 drivers/gpu/drm/drm_mipi_dsi.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/drm_mipi_dsi.c b/drivers/gpu/drm/drm_mipi_dsi.c
index 82d4f9c1de5fbc60f32d0b0baf41e1bd2991ebe4..f16f70c70c87988a95f959d0b8b18a6941dd2808 100644
--- a/drivers/gpu/drm/drm_mipi_dsi.c
+++ b/drivers/gpu/drm/drm_mipi_dsi.c
@@ -383,11 +383,19 @@ int mipi_dsi_attach(struct mipi_dsi_device *dsi)
 		return dev_err_probe(&dsi->dev, -EINVAL, "Incorrect lanes number\n");
 
 	ret = ops->attach(dsi->host, dsi);
-	if (ret)
+	if (ret) {
+		dev_err(dsi->host->dev,
+			"Failed to attach %s device (lanes:%d bpp:%d mode-flags:0x%lx) (%d)\n",
+			dsi->name, dsi->lanes, mipi_dsi_pixel_format_to_bpp(dsi->format),
+			dsi->mode_flags, ret);
 		return ret;
+	}
 
 	dsi->attached = true;
 
+	dev_dbg(dsi->host->dev, "Attached %s device (lanes:%d bpp:%d mode-flags:0x%lx)\n",
+		dsi->name, dsi->lanes, mipi_dsi_pixel_format_to_bpp(dsi->format), dsi->mode_flags);
+
 	return 0;
 }
 EXPORT_SYMBOL(mipi_dsi_attach);
@@ -406,6 +414,10 @@ int mipi_dsi_detach(struct mipi_dsi_device *dsi)
 	if (!ops || !ops->detach)
 		return -ENOSYS;
 
+	dev_dbg(dsi->host->dev, "Detaching %s device (lanes:%d bpp:%d mode-flags:0x%lx)\n",
+		dsi->name, dsi->lanes, mipi_dsi_pixel_format_to_bpp(dsi->format),
+		dsi->mode_flags);
+
 	dsi->attached = false;
 
 	return ops->detach(dsi->host, dsi);

-- 
2.49.0


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ