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: <1469110452-8806-1-git-send-email-ykk@rock-chips.com>
Date:	Thu, 21 Jul 2016 22:14:12 +0800
From:	Yakir Yang <ykk@...k-chips.com>
To:	Mark Yao <yzq@...k-chips.com>, Inki Dae <inki.dae@...sung.com>,
	Thierry Reding <treding@...dia.com>,
	Heiko Stuebner <heiko@...ech.de>
Cc:	Jingoo Han <jingoohan1@...il.com>,
	Javier Martinez Canillas <javier@....samsung.com>,
	Stéphane Marchesin <marcheu@...omium.org>,
	Sean Paul <seanpaul@...omium.org>,
	Tomasz Figa <tfiga@...omium.org>, dianders@...omium.org,
	David Airlie <airlied@...ux.ie>, daniel.vetter@...ll.ch,
	Krzysztof Kozlowski <k.kozlowski@...sung.com>,
	emil.l.velikov@...il.com, Yakir Yang <ykk@...k-chips.com>,
	linux-kernel@...r.kernel.org, dri-devel@...ts.freedesktop.org,
	linux-samsung-soc@...r.kernel.org,
	linux-rockchip@...ts.infradead.org
Subject: [PATCH v1.1 2/2] drm/bridge: analogix_dp: turn off the panel when eDP need to disable

Some panels (like Sharp LQ123P1JX31) need to be turn off when eDP
controller stop to send valid video signal, otherwhise panel would
go burn in, and keep flicker and flicker.

So it's better to turn off the panel when eDP need to disable, and
we need to turn on the panel in connector->detect() callback, so
that driver would detect panel status rightly.

Signed-off-by: Yakir Yang <ykk@...k-chips.com>
---

Changes in v1.1:
- unprepare the panel at the end of bridge->disable() function

 drivers/gpu/drm/bridge/analogix/analogix_dp_core.c | 22 +++++++++++++++-------
 1 file changed, 15 insertions(+), 7 deletions(-)

diff --git a/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c b/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c
index 32715da..2e519bd 100644
--- a/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c
+++ b/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c
@@ -961,6 +961,14 @@ analogix_dp_detect(struct drm_connector *connector, bool force)
 {
 	struct analogix_dp_device *dp = to_dp(connector);
 
+	/*
+	 * Panle would prepare for several times here, but don't worry it
+	 * would only enable the hardware at the first prepare time.
+	 */
+	if (dp->plat_data->panel)
+		if (drm_panel_prepare(dp->plat_data->panel))
+			DRM_ERROR("failed to setup the panel\n");
+
 	if (analogix_dp_detect_hpd(dp))
 		return connector_status_disconnected;
 
@@ -1077,6 +1085,13 @@ static void analogix_dp_bridge_disable(struct drm_bridge *bridge)
 
 	pm_runtime_put_sync(dp->dev);
 
+	if (dp->plat_data->panel) {
+		if (drm_panel_unprepare(dp->plat_data->panel)) {
+			DRM_ERROR("failed to turnoff the panel\n");
+			return;
+		}
+	}
+
 	dp->dpms_mode = DRM_MODE_DPMS_OFF;
 }
 
@@ -1333,13 +1348,6 @@ int analogix_dp_bind(struct device *dev, struct drm_device *drm_dev,
 
 	phy_power_on(dp->phy);
 
-	if (dp->plat_data->panel) {
-		if (drm_panel_prepare(dp->plat_data->panel)) {
-			DRM_ERROR("failed to setup the panel\n");
-			return -EBUSY;
-		}
-	}
-
 	analogix_dp_init_dp(dp);
 
 	ret = devm_request_threaded_irq(&pdev->dev, dp->irq,
-- 
1.9.1


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ