public inbox for linux-rockchip@lists.infradead.org
 help / color / mirror / Atom feed
* [PATCH] drm/bridge: analogix: Don't return -EINVAL when panel not support PSR in PSR functions
@ 2016-12-02  2:32 zain wang
  2016-12-02  3:54 ` Archit Taneja
  0 siblings, 1 reply; 6+ messages in thread
From: zain wang @ 2016-12-02  2:32 UTC (permalink / raw)
  To: Sean Paul, Daniel Vetter, Inki Dae, David Airlie
  Cc: Tomeu Vizoso, Mika Kahola, Stéphane Marchesin, Tomasz Figa,
	dianders, Thierry Reding, Krzysztof Kozlowski, Heiko Stuebner,
	Jingoo Han, Javier Martinez Canillas, linux-kernel, dri-devel,
	linux-samsung-soc, linux-rockchip, zain wang

We will ignored PSR setting if panel not support it. So, in this case, we should
return from analogix_dp_enable/disable_psr() without any error code.
Let's retrun 0 instead of -EINVAL when panel not support PSR in
analogix_dp_enable/disable_psr().

Signed-off-by: zain wang <wzz@rock-chips.com>
---
 drivers/gpu/drm/bridge/analogix/analogix_dp_core.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c b/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c
index 6e0447f..0cb3695 100644
--- a/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c
+++ b/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c
@@ -112,7 +112,7 @@ int analogix_dp_enable_psr(struct device *dev)
 	struct edp_vsc_psr psr_vsc;
 
 	if (!dp->psr_support)
-		return -EINVAL;
+		return 0;
 
 	/* Prepare VSC packet as per EDP 1.4 spec, Table 6.9 */
 	memset(&psr_vsc, 0, sizeof(psr_vsc));
@@ -135,7 +135,7 @@ int analogix_dp_disable_psr(struct device *dev)
 	struct edp_vsc_psr psr_vsc;
 
 	if (!dp->psr_support)
-		return -EINVAL;
+		return 0;
 
 	/* Prepare VSC packet as per EDP 1.4 spec, Table 6.9 */
 	memset(&psr_vsc, 0, sizeof(psr_vsc));
@@ -878,6 +878,8 @@ static void analogix_dp_commit(struct analogix_dp_device *dp)
 	dp->psr_support = analogix_dp_detect_sink_psr(dp);
 	if (dp->psr_support)
 		analogix_dp_enable_sink_psr(dp);
+	else
+		dev_warn(dp->dev, "Sink not support PSR\n");
 }
 
 /*
-- 
1.9.1

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

end of thread, other threads:[~2016-12-07  0:45 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-12-02  2:32 [PATCH] drm/bridge: analogix: Don't return -EINVAL when panel not support PSR in PSR functions zain wang
2016-12-02  3:54 ` Archit Taneja
2016-12-02 16:03   ` Sean Paul
2016-12-05  3:13     ` Archit Taneja
2016-12-05 17:28       ` Sean Paul
     [not found]         ` <CAOw6vbLv_q8XPj4_A7Yx1HaVVkdUTeq9=EHAjtJd7bOge2C21Q-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2016-12-07  0:45           ` Zain Wang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox