mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH v2] drm/bridge: analogix: Don't return -EINVAL when panel not support PSR in PSR functions
@ 2016-12-07  0:57 zain wang
  2016-12-07  3:16 ` Archit Taneja
  0 siblings, 1 reply; 2+ messages in thread
From: zain wang @ 2016-12-07  0:57 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, 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>
---

Changes in v2:
- Remove dev_warn if panel not support PSR.

 drivers/gpu/drm/bridge/analogix/analogix_dp_core.c | 4 ++--
 1 file changed, 2 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..eb9bf87 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));
-- 
1.9.1

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

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

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-12-07  0:57 [PATCH v2] drm/bridge: analogix: Don't return -EINVAL when panel not support PSR in PSR functions zain wang
2016-12-07  3:16 ` Archit Taneja

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

all inboxes | Powered by JetHome®