dri-devel.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/1] drm/bridge: analogix_dp: Add PSR toggle
@ 2020-06-26  3:30 Shawn Anastasio
  2020-06-26  3:30 ` [PATCH 1/1] drm/bridge: analogix_dp: Add enable_psr param Shawn Anastasio
  0 siblings, 1 reply; 2+ messages in thread
From: Shawn Anastasio @ 2020-06-26  3:30 UTC (permalink / raw)
  To: dri-devel; +Cc: airlied, a.hajda, linux-kernel, narmstrong

This patch adds a commandline toggle for the Panel Self-Refresh feature
to the analogix_dp bridge driver, much like the one in i915.

This is required to work around a hardware fault in some Pinebook Pro units
from the May 2020 batch whose display panels seem to behave sporadically
when PSR is enabled.

Shawn Anastasio (1):
  drm/bridge: analogix_dp: Add enable_psr param

 drivers/gpu/drm/bridge/analogix/analogix_dp_core.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

-- 
2.26.2

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 2+ messages in thread

* [PATCH 1/1] drm/bridge: analogix_dp: Add enable_psr param
  2020-06-26  3:30 [PATCH 0/1] drm/bridge: analogix_dp: Add PSR toggle Shawn Anastasio
@ 2020-06-26  3:30 ` Shawn Anastasio
  0 siblings, 0 replies; 2+ messages in thread
From: Shawn Anastasio @ 2020-06-26  3:30 UTC (permalink / raw)
  To: dri-devel; +Cc: airlied, a.hajda, linux-kernel, narmstrong

Add a toggle to enable/disable PSR from the kernel commandline.
This is useful in situations where PSR is supported by the hardware
but is not desired by the user. One such use case is working around
hardware errata.

Signed-off-by: Shawn Anastasio <shawn@anastas.io>
---
 drivers/gpu/drm/bridge/analogix/analogix_dp_core.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c b/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c
index 76736fb8ed94..9735ab71fca7 100644
--- a/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c
+++ b/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c
@@ -35,6 +35,10 @@
 
 static const bool verify_fast_training;
 
+static bool enable_psr = true;
+module_param(enable_psr, bool, 0644);
+MODULE_PARM_DESC(enable_psr, "PSR support (1 = enabled (default), 0 = disabled)");
+
 struct bridge_init {
 	struct i2c_client *client;
 	struct device_node *node;
@@ -979,7 +983,7 @@ static int analogix_dp_commit(struct analogix_dp_device *dp)
 	if (ret)
 		return ret;
 
-	if (analogix_dp_detect_sink_psr(dp)) {
+	if (enable_psr && analogix_dp_detect_sink_psr(dp)) {
 		ret = analogix_dp_enable_sink_psr(dp);
 		if (ret)
 			return ret;
-- 
2.26.2

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-06-26  7:36 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-26  3:30 [PATCH 0/1] drm/bridge: analogix_dp: Add PSR toggle Shawn Anastasio
2020-06-26  3:30 ` [PATCH 1/1] drm/bridge: analogix_dp: Add enable_psr param Shawn Anastasio

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).