diff mbox

drm: exynos: dsi: fix to return -ENODEV when DSI_PORT_OUT is not found

Message ID 20170616225659.23569-1-shuahkh@osg.samsung.com (mailing list archive)
State New, archived
Headers show

Commit Message

Shuah Khan June 16, 2017, 10:56 p.m. UTC
Fix exynos_dsi_parse_dt() to return -ENODEV when of_graph_get_remote_node()
doesn't find DSI_PORT_OUT. -ENODEV is the correct error code to return and
this change makes exynos behavior consistent with rest of the drm drivers.

Signed-off-by: Shuah Khan <shuahkh@osg.samsung.com>
---
 drivers/gpu/drm/exynos/exynos_drm_dsi.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Inki Dae June 19, 2017, 2:03 a.m. UTC | #1
Hi Shuah,

2017년 06월 17일 07:56에 Shuah Khan 이(가) 쓴 글:
> Fix exynos_dsi_parse_dt() to return -ENODEV when of_graph_get_remote_node()
> doesn't find DSI_PORT_OUT. -ENODEV is the correct error code to return and
> this change makes exynos behavior consistent with rest of the drm drivers.

For this, there is one relevant patch below,
https://patchwork.kernel.org/patch/9785517/

In case of Exynos SoC, bridge node is required optionally - one bridge device such as mDNIe or MIC could be placed between FIMD and MIPI-DSI devices but this pipeline is configurable - user can decide Display hardware pipeline by setting the sysreg register.
So no error should be returned.

Thanks,
Inki Dae

> 
> Signed-off-by: Shuah Khan <shuahkh@osg.samsung.com>
> ---
>  drivers/gpu/drm/exynos/exynos_drm_dsi.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/exynos/exynos_drm_dsi.c b/drivers/gpu/drm/exynos/exynos_drm_dsi.c
> index e337cd2..cb99e82 100644
> --- a/drivers/gpu/drm/exynos/exynos_drm_dsi.c
> +++ b/drivers/gpu/drm/exynos/exynos_drm_dsi.c
> @@ -1652,7 +1652,7 @@ static int exynos_dsi_parse_dt(struct exynos_dsi *dsi)
>  
>  	dsi->bridge_node = of_graph_get_remote_node(node, DSI_PORT_OUT, 0);
>  	if (!dsi->bridge_node)
> -		return -EINVAL;
> +		return -ENODEV;
>  
>  	return 0;
>  }
>
diff mbox

Patch

diff --git a/drivers/gpu/drm/exynos/exynos_drm_dsi.c b/drivers/gpu/drm/exynos/exynos_drm_dsi.c
index e337cd2..cb99e82 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_dsi.c
+++ b/drivers/gpu/drm/exynos/exynos_drm_dsi.c
@@ -1652,7 +1652,7 @@  static int exynos_dsi_parse_dt(struct exynos_dsi *dsi)
 
 	dsi->bridge_node = of_graph_get_remote_node(node, DSI_PORT_OUT, 0);
 	if (!dsi->bridge_node)
-		return -EINVAL;
+		return -ENODEV;
 
 	return 0;
 }