2021-10-30 17:11:11

by Philip Chen

[permalink] [raw]
Subject: [PATCH] drm/msm/dsi: set default num_data_lanes

If "data_lanes" property of the dsi output endpoint is missing in
the DT, num_data_lanes would be 0 by default, which could cause
dsi_host_attach() to fail if dsi->lanes is set to a non-zero value
by the bridge driver.

According to the binding document of msm dsi controller, the
input/output endpoint of the controller is expected to have 4 lanes.
So let's set num_data_lanes to 4 by default.

Signed-off-by: Philip Chen <[email protected]>
---

drivers/gpu/drm/msm/dsi/dsi_host.c | 2 ++
1 file changed, 2 insertions(+)

diff --git a/drivers/gpu/drm/msm/dsi/dsi_host.c b/drivers/gpu/drm/msm/dsi/dsi_host.c
index c86b5090fae6..a32eb33dfc14 100644
--- a/drivers/gpu/drm/msm/dsi/dsi_host.c
+++ b/drivers/gpu/drm/msm/dsi/dsi_host.c
@@ -1696,6 +1696,8 @@ static int dsi_host_parse_lane_data(struct msm_dsi_host *msm_host,
if (!prop) {
DRM_DEV_DEBUG(dev,
"failed to find data lane mapping, using default\n");
+ /* Set the number of date lanes to 4 by default. */
+ msm_host->num_data_lanes = 4;
return 0;
}

--
2.33.1.1089.g2158813163f-goog


2021-11-01 18:21:43

by Stephen Boyd

[permalink] [raw]
Subject: Re: [PATCH] drm/msm/dsi: set default num_data_lanes

Quoting Philip Chen (2021-10-30 10:08:50)
> If "data_lanes" property of the dsi output endpoint is missing in
> the DT, num_data_lanes would be 0 by default, which could cause
> dsi_host_attach() to fail if dsi->lanes is set to a non-zero value
> by the bridge driver.
>
> According to the binding document of msm dsi controller, the
> input/output endpoint of the controller is expected to have 4 lanes.
> So let's set num_data_lanes to 4 by default.
>
> Signed-off-by: Philip Chen <[email protected]>
> ---

Reviewed-by: Stephen Boyd <[email protected]>

2021-11-01 18:21:55

by Doug Anderson

[permalink] [raw]
Subject: Re: [PATCH] drm/msm/dsi: set default num_data_lanes

Hi,

On Sat, Oct 30, 2021 at 10:08 AM Philip Chen <[email protected]> wrote:
>
> If "data_lanes" property of the dsi output endpoint is missing in
> the DT, num_data_lanes would be 0 by default, which could cause
> dsi_host_attach() to fail if dsi->lanes is set to a non-zero value
> by the bridge driver.
>
> According to the binding document of msm dsi controller, the
> input/output endpoint of the controller is expected to have 4 lanes.
> So let's set num_data_lanes to 4 by default.
>
> Signed-off-by: Philip Chen <[email protected]>
> ---
>
> drivers/gpu/drm/msm/dsi/dsi_host.c | 2 ++
> 1 file changed, 2 insertions(+)

Reviewed-by: Douglas Anderson <[email protected]>