drm/msm/dsi: Report PHY errors only when they really occur
authorArchit Taneja <architt@codeaurora.org>
Thu, 25 Jun 2015 05:59:24 +0000 (11:29 +0530)
committerRob Clark <robdclark@gmail.com>
Sat, 15 Aug 2015 22:27:14 +0000 (18:27 -0400)
DSI PHY errors are falsely reported whenever a dsi error occurs. This is
because DSI_DLN0_PHY_ERR isn't only used as a status register, but also
used to mask PHY errors. Currently, we end up reading the mask bits too
and therefore always report errors.

Ignore the register mask bits and check for only the status/clear bits.

Signed-off-by: Archit Taneja <architt@codeaurora.org>
Signed-off-by: Rob Clark <robdclark@gmail.com>
drivers/gpu/drm/msm/dsi/dsi_host.c

index 2d8f194507889da558bfcc4b8a8a678af5f1e1d5..c05a55eca16f5a1d921c53f9af5839e9dae22717 100644 (file)
@@ -1276,7 +1276,11 @@ static void dsi_dln0_phy_err(struct msm_dsi_host *msm_host)
 
        status = dsi_read(msm_host, REG_DSI_DLN0_PHY_ERR);
 
-       if (status) {
+       if (status & (DSI_DLN0_PHY_ERR_DLN0_ERR_ESC |
+                       DSI_DLN0_PHY_ERR_DLN0_ERR_SYNC_ESC |
+                       DSI_DLN0_PHY_ERR_DLN0_ERR_CONTROL |
+                       DSI_DLN0_PHY_ERR_DLN0_ERR_CONTENTION_LP0 |
+                       DSI_DLN0_PHY_ERR_DLN0_ERR_CONTENTION_LP1)) {
                dsi_write(msm_host, REG_DSI_DLN0_PHY_ERR, status);
                msm_host->err_work_state |= DSI_ERR_STATE_DLN0_PHY;
        }