diff mbox

drm/msm/dsi: Fix bug in dsi_mgr_phy_enable

Message ID 20170216105904.4478-1-architt@codeaurora.org (mailing list archive)
State New, archived
Headers show

Commit Message

Archit Taneja Feb. 16, 2017, 10:59 a.m. UTC
A recent commit introduces a bug in dsi_mgr_phy_enable. In the non
dual DSI mode, we reset the mdsi (master DSI) PHY. This isn't right
since master and slave DSI exist only in dual DSI mode. For the normal
mode of operation, we should simply reset the PHY of the DSI device
(i.e. msm_dsi) corresponding to the current bridge.

Usage of the wrong DSI pointer also resulted in a static checker
warning. That too is resolved with this fix.

Fixes: b62aa70a98c5 (drm/msm/dsi: Move PHY operations out of host)

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Archit Taneja <architt@codeaurora.org>
---
 drivers/gpu/drm/msm/dsi/dsi_manager.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Rob Clark Feb. 16, 2017, 12:16 p.m. UTC | #1
On Thu, Feb 16, 2017 at 5:59 AM, Archit Taneja <architt@codeaurora.org> wrote:
> A recent commit introduces a bug in dsi_mgr_phy_enable. In the non
> dual DSI mode, we reset the mdsi (master DSI) PHY. This isn't right
> since master and slave DSI exist only in dual DSI mode. For the normal
> mode of operation, we should simply reset the PHY of the DSI device
> (i.e. msm_dsi) corresponding to the current bridge.
>
> Usage of the wrong DSI pointer also resulted in a static checker
> warning. That too is resolved with this fix.
>
> Fixes: b62aa70a98c5 (drm/msm/dsi: Move PHY operations out of host)
>
> Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
> Signed-off-by: Archit Taneja <architt@codeaurora.org>

Reviewed-by: Rob Clark <robdclark@gmail.com>

> ---
>  drivers/gpu/drm/msm/dsi/dsi_manager.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/msm/dsi/dsi_manager.c b/drivers/gpu/drm/msm/dsi/dsi_manager.c
> index 921270ea6059..a879ffa534b4 100644
> --- a/drivers/gpu/drm/msm/dsi/dsi_manager.c
> +++ b/drivers/gpu/drm/msm/dsi/dsi_manager.c
> @@ -171,7 +171,7 @@ dsi_mgr_phy_enable(int id,
>                         }
>                 }
>         } else {
> -               msm_dsi_host_reset_phy(mdsi->host);
> +               msm_dsi_host_reset_phy(msm_dsi->host);
>                 ret = enable_phy(msm_dsi, src_pll_id, &shared_timings[id]);
>                 if (ret)
>                         return ret;
> --
> The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
> hosted by The Linux Foundation
>
diff mbox

Patch

diff --git a/drivers/gpu/drm/msm/dsi/dsi_manager.c b/drivers/gpu/drm/msm/dsi/dsi_manager.c
index 921270ea6059..a879ffa534b4 100644
--- a/drivers/gpu/drm/msm/dsi/dsi_manager.c
+++ b/drivers/gpu/drm/msm/dsi/dsi_manager.c
@@ -171,7 +171,7 @@  dsi_mgr_phy_enable(int id,
 			}
 		}
 	} else {
-		msm_dsi_host_reset_phy(mdsi->host);
+		msm_dsi_host_reset_phy(msm_dsi->host);
 		ret = enable_phy(msm_dsi, src_pll_id, &shared_timings[id]);
 		if (ret)
 			return ret;