Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1537391 > unrolled thread

[PATCH v2] drm/bridge: analogix: Don't return -EINVAL when panel not support PSR in PSR functions

Started byzain wang <wzz@rock-chips.com>
First post2016-12-07 02:00 +0100
Last post2016-12-07 04:20 +0100
Articles 2 — 2 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH v2] drm/bridge: analogix: Don't return -EINVAL when panel not support PSR in PSR functions zain wang <wzz@rock-chips.com> - 2016-12-07 02:00 +0100
    Re: [PATCH v2] drm/bridge: analogix: Don't return -EINVAL when panel  not support PSR in PSR functions Archit Taneja <architt@codeaurora.org> - 2016-12-07 04:20 +0100

#1537391 — [PATCH v2] drm/bridge: analogix: Don't return -EINVAL when panel not support PSR in PSR functions

Fromzain wang <wzz@rock-chips.com>
Date2016-12-07 02:00 +0100
Subject[PATCH v2] drm/bridge: analogix: Don't return -EINVAL when panel not support PSR in PSR functions
Message-ID<sLyKy-TK-11@gated-at.bofh.it>
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

[toc] | [next] | [standalone]


#1537440 — Re: [PATCH v2] drm/bridge: analogix: Don't return -EINVAL when panel not support PSR in PSR functions

FromArchit Taneja <architt@codeaurora.org>
Date2016-12-07 04:20 +0100
SubjectRe: [PATCH v2] drm/bridge: analogix: Don't return -EINVAL when panel not support PSR in PSR functions
Message-ID<sLAVY-2xl-9@gated-at.bofh.it>
In reply to#1537391

On 12/07/2016 06:27 AM, zain wang wrote:
> 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().

Thanks. Pushed to drm-misc after wrapping the commit
message text.

Archit

>
> 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));
>

-- 
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web