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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20241028102559.1451383-7-dario.binacchi@amarulasolutions.com>
Date: Mon, 28 Oct 2024 11:25:29 +0100
From: Dario Binacchi <dario.binacchi@...rulasolutions.com>
To: linux-kernel@...r.kernel.org
Cc: linux-amarula@...rulasolutions.com,
	Dario Binacchi <dario.binacchi@...rulasolutions.com>,
	Michael Trimarchi <michael@...rulasolutions.com>,
	David Airlie <airlied@...il.com>,
	Jessica Zhang <quic_jesszhan@...cinc.com>,
	Maarten Lankhorst <maarten.lankhorst@...ux.intel.com>,
	Maxime Ripard <mripard@...nel.org>,
	Neil Armstrong <neil.armstrong@...aro.org>,
	Simona Vetter <simona@...ll.ch>,
	Thomas Zimmermann <tzimmermann@...e.de>,
	dri-devel@...ts.freedesktop.org
Subject: [RFC PATCH 06/10] drm/panel: synaptics-r63353: don't re-activate the panel if already setup

The patch does not re-execute the hardware initialization/activation
procedure for the panel if it is already operational.
This feature is crucial when supporting the simple framebuffer, as the
controller has already been initialized by the bootloader.

Co-developed-by: Michael Trimarchi <michael@...rulasolutions.com>
Signed-off-by: Michael Trimarchi <michael@...rulasolutions.com>
Signed-off-by: Dario Binacchi <dario.binacchi@...rulasolutions.com>
---

 drivers/gpu/drm/panel/panel-synaptics-r63353.c | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/panel/panel-synaptics-r63353.c b/drivers/gpu/drm/panel/panel-synaptics-r63353.c
index 169c629746c7..93e3ed545b34 100644
--- a/drivers/gpu/drm/panel/panel-synaptics-r63353.c
+++ b/drivers/gpu/drm/panel/panel-synaptics-r63353.c
@@ -258,6 +258,8 @@ static int r63353_panel_probe(struct mipi_dsi_device *dsi)
 	int ret = 0;
 	struct device *dev = &dsi->dev;
 	struct r63353_panel *panel;
+	bool initialized;
+	enum gpiod_flags rflags;
 
 	panel = devm_kzalloc(&dsi->dev, sizeof(*panel), GFP_KERNEL);
 	if (!panel)
@@ -282,7 +284,9 @@ static int r63353_panel_probe(struct mipi_dsi_device *dsi)
 	if (IS_ERR(panel->avdd))
 		return PTR_ERR(panel->avdd);
 
-	panel->reset_gpio = devm_gpiod_get(dev, "reset", GPIOD_OUT_LOW);
+	initialized = of_property_read_bool(dev->of_node, "syna,boot-on");
+	rflags = initialized ? GPIOD_ASIS : GPIOD_OUT_LOW;
+	panel->reset_gpio = devm_gpiod_get(dev, "reset", rflags);
 	if (IS_ERR(panel->reset_gpio)) {
 		dev_err(dev, "failed to get RESET GPIO\n");
 		return PTR_ERR(panel->reset_gpio);
@@ -297,6 +301,10 @@ static int r63353_panel_probe(struct mipi_dsi_device *dsi)
 		return ret;
 
 	drm_panel_add(&panel->base);
+	if (initialized) {
+		r63353_panel_power_on(panel);
+		panel->base.prepared = true;
+	}
 
 	ret = mipi_dsi_attach(dsi);
 	if (ret < 0) {
-- 
2.43.0


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ