drm/bridge: ti-sn65dsi83: Handle dsi_lanes == 0 as invalid
Subsystems (3)
PATCH 1/1 drm/bridge: ti-sn65dsi83: Handle dsi_lanes == 0 as invalid
Handle empty data-lanes = < >; property, which translates to dsi_lanes = 0 as invalid.
--- drivers/gpu/drm/bridge/ti-sn65dsi83.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/bridge/ti-sn65dsi83.c +1 -1
@@ -585,7 +585,7 @@ static int sn65dsi83_parse_dt(struct sn65dsi83 *ctx, enum sn65dsi83_model model) ctx->host_node =of_graph_get_remote_port_parent (endpoint);of_node_put (endpoint); -if (ctx->dsi_lanes <0 || ctx->dsi_lanes >4 ) { +if (ctx->dsi_lanes <=0 || ctx->dsi_lanes >4 ) { ret = -EINVAL ; goto err_put_node; }
Signature · 1 line
2.35.1
Quoted 13 lines · Marek Vasut
Handle empty data-lanes = < >; property, which translates to
dsi_lanes= 0 as invalid.Fixes ceb515ba29ba6 ("drm/bridge: ti-sn65dsi83: Add TI SN65DSI83 and SN65DSI84 driver")Signed-off-by Marek Vasut <[email protected]>Cc Jonas Karlman <[email protected]>Cc Laurent Pinchart <[email protected]>Cc Lucas Stach <[email protected]>Cc Marek Vasut <[email protected]>Cc Maxime Ripard <[email protected]>Cc Neil Armstrong <[email protected]>Cc Robert Foss <[email protected]>Cc Sam Ravnborg <[email protected]>
I wonder if you could not make common helper to get number of lanes with checks included, quite trivial, but maybe worth to standardize it.
Regards
Andrzej
Quoted 17 lines
--- drivers/gpu/drm/bridge/ti-sn65dsi83.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/gpu/drm/bridge/ti-sn65dsi83.c +1
-1@@ -585,7 +585,7 @@ static int sn65dsi83_parse_dt(struct sn65dsi83 *ctx, enum sn65dsi83_model model) ctx->host_node =of_graph_get_remote_port_parent (endpoint);of_node_put (endpoint); -if (ctx->dsi_lanes <0 || ctx->dsi_lanes >4 ) { +if (ctx->dsi_lanes <=0 || ctx->dsi_lanes >4 ) { ret = -EINVAL ; goto err_put_node; }
Am Donnerstag, dem 19.05.2022 um 01:38 +0200 schrieb Marek Vasut:
Quoted 13 lines
Handle empty data-lanes = < >; property, which translates to
dsi_lanes= 0 as invalid.Fixes ceb515ba29ba6 ("drm/bridge: ti-sn65dsi83: Add TI SN65DSI83 and SN65DSI84 driver")Signed-off-by Marek Vasut <[email protected]>Cc Jonas Karlman <[email protected]>Cc Laurent Pinchart <[email protected]>Cc Lucas Stach <[email protected]>Cc Marek Vasut <[email protected]>Cc Maxime Ripard <[email protected]>Cc Neil Armstrong <[email protected]>Cc Robert Foss <[email protected]>Cc Sam Ravnborg <[email protected]>
Quoted 17 lines
--- drivers/gpu/drm/bridge/ti-sn65dsi83.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/gpu/drm/bridge/ti-sn65dsi83.c +1
-1@@ -585,7 +585,7 @@ static int sn65dsi83_parse_dt(struct sn65dsi83 *ctx, enum sn65dsi83_model model) ctx->host_node =of_graph_get_remote_port_parent (endpoint);of_node_put (endpoint); -if (ctx->dsi_lanes <0 || ctx->dsi_lanes >4 ) { +if (ctx->dsi_lanes <=0 || ctx->dsi_lanes >4 ) { ret = -EINVAL ; goto err_put_node; }
Robert Foss
AppliedQuoted 30 lines · Lucas Stach
Am Donnerstag, dem 19.05.2022 um 01:38 +0200 schrieb Marek Vasut:
Quoted 13 lines
Handle empty data-lanes = < >; property, which translates to
dsi_lanes= 0 as invalid.Fixes ceb515ba29ba6 ("drm/bridge: ti-sn65dsi83: Add TI SN65DSI83 and SN65DSI84 driver")Signed-off-by Marek Vasut <[email protected]>Cc Jonas Karlman <[email protected]>Cc Laurent Pinchart <[email protected]>Cc Lucas Stach <[email protected]>Cc Marek Vasut <[email protected]>Cc Maxime Ripard <[email protected]>Cc Neil Armstrong <[email protected]>Cc Robert Foss <[email protected]>Cc Sam Ravnborg <[email protected]>Reviewed-by Lucas Stach <[email protected]>Quoted 12 lines
--- drivers/gpu/drm/bridge/ti-sn65dsi83.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/gpu/drm/bridge/ti-sn65dsi83.c +0
-0@@ -585,7 +585,7 @@ static int sn65dsi83_parse_dt(struct sn65dsi83 *ctx, enum sn65dsi83_model model) ctx->host_node =of_graph_get_remote_port_parent (endpoint);of_node_put (endpoint);
Quoted 7 lines
drivers/gpu/drm/bridge/ti-sn65dsi83.c static int sn65dsi83_parse_dt(struct sn65dsi83 *ctx, enum sn65dsi83_model model) · line 591
Quoted 5 lines
drivers/gpu/drm/bridge/ti-sn65dsi83.c +1
-1-if (ctx->dsi_lanes <0 || ctx->dsi_lanes >4 ) { +if (ctx->dsi_lanes <=0 || ctx->dsi_lanes >4 ) { ret = -EINVAL ; goto err_put_node; }
Applied to drm-misc-next.
Quoted 5 lines · Robert Foss
Quoted 4 lines · Lucas Stach
Am Donnerstag, dem 19.05.2022 um 01:38 +0200 schrieb Marek Vasut:
Quoted 2 lines
Handle empty data-lanes = < >; property, which translates to
dsi_lanes= 0 as invalid.
[...]
Quoted 16 lines
Quoted 8 lines
Quoted 8 lines
drivers/gpu/drm/bridge/ti-sn65dsi83.c +0
-0@@ -585,7 +585,7 @@ static int sn65dsi83_parse_dt(struct sn65dsi83 *ctx, enum sn65dsi83_model model) ctx->host_node =of_graph_get_remote_port_parent (endpoint);of_node_put (endpoint);Quoted 7 lines
drivers/gpu/drm/bridge/ti-sn65dsi83.c static int sn65dsi83_parse_dt(struct sn65dsi83 *ctx, enum sn65dsi83_model model) · line 591
Quoted 5 lines
drivers/gpu/drm/bridge/ti-sn65dsi83.c +1
-1-if (ctx->dsi_lanes <0 || ctx->dsi_lanes >4 ) { +if (ctx->dsi_lanes <=0 || ctx->dsi_lanes >4 ) { ret = -EINVAL ; goto err_put_node; }
Quoted 1 line
Applied to drm-misc-next.
This was already applied to drm-misc-next-fixes , since this is a fix for something that was already in release . The conflict will resolve itself easily though ?
Quoted 26 lines · Marek Vasut
Quoted 5 lines · Robert Foss
Quoted 4 lines · Lucas Stach
Am Donnerstag, dem 19.05.2022 um 01:38 +0200 schrieb Marek Vasut:
Quoted 2 lines
Handle empty data-lanes = < >; property, which translates to
dsi_lanes= 0 as invalid.[...]
Quoted 16 lines
Quoted 15 lines
Quoted 13 lines
drivers/gpu/drm/bridge/ti-sn65dsi83.c +1
-1@@ -585,7 +585,7 @@ static int sn65dsi83_parse_dt(struct sn65dsi83 *ctx, enum sn65dsi83_model model) ctx->host_node =of_graph_get_remote_port_parent (endpoint);of_node_put (endpoint); -if (ctx->dsi_lanes <0 || ctx->dsi_lanes >4 ) { +if (ctx->dsi_lanes <=0 || ctx->dsi_lanes >4 ) { ret = -EINVAL ; goto err_put_node; }
Quoted 5 lines
Quoted 1 line
Applied to drm-misc-next.
This was already applied to drm-misc-next-fixes , since this is a fix for something that was already in release . The conflict will resolve itself easily though ?
Ah, I didn't realize. I'm not sure if it will resolve itself or not. But I think either it is reverted in drm-misc-next now, or we wait for an issue to crop up. I think either way is acceptable, but waiting maybe causes less churn. So unless someone has another preference, let's wait and see if a conflict arises.
Quoted 33 lines · Robert Foss
Quoted 26 lines · Marek Vasut
Quoted 5 lines · Robert Foss
Quoted 4 lines · Lucas Stach
Am Donnerstag, dem 19.05.2022 um 01:38 +0200 schrieb Marek Vasut:
Quoted 2 lines
Handle empty data-lanes = < >; property, which translates to
dsi_lanes= 0 as invalid.[...]
Quoted 16 lines
Quoted 15 lines
Quoted 13 lines
drivers/gpu/drm/bridge/ti-sn65dsi83.c +1
-1@@ -585,7 +585,7 @@ static int sn65dsi83_parse_dt(struct sn65dsi83 *ctx, enum sn65dsi83_model model) ctx->host_node =of_graph_get_remote_port_parent (endpoint);of_node_put (endpoint); -if (ctx->dsi_lanes <0 || ctx->dsi_lanes >4 ) { +if (ctx->dsi_lanes <=0 || ctx->dsi_lanes >4 ) { ret = -EINVAL ; goto err_put_node; }Quoted 5 lines
Quoted 1 line
Applied to drm-misc-next.
This was already applied to drm-misc-next-fixes , since this is a fix for something that was already in release . The conflict will resolve itself easily though ?
Quoted 5 lines
Ah, I didn't realize. I'm not sure if it will resolve itself or not. But I think either it is reverted in drm-misc-next now, or we wait for an issue to crop up. I think either way is acceptable, but waiting maybe causes less churn. So unless someone has another preference, let's wait and see if a conflict arises.
I agree, we wait.