drm/bridge: analogix: Don't return -EINVAL when panel not support PSR in PSR functions
Subsystems (5)
PATCH v2 1/1 drm/bridge: analogix: Don't return -EINVAL when panel not support PSR in PSR functions
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().
---
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(-)
drivers/gpu/drm/bridge/analogix/analogix_dp_core.c +2 -2
@@ -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));
Signature · 1 line
1.9.1
Quoted 4 lines · 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
-EINVALwhen panel not support PSR in analogix_dp_enable/disable_psr().
Thanks. Pushed to drm-misc after wrapping the commit message text.
Archit
Quoted 33 lines
Signed-off-by zain wang <[email protected]>---
Changes in v2:
- Removedev_warnif panel not support PSR.drivers/gpu/drm/bridge/analogix/analogix_dp_core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)drivers/gpu/drm/bridge/analogix/analogix_dp_core.c +2
-2@@ -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));
Signature · 2 lines
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux Foundation Collaborative Project