diff options
Diffstat (limited to 'drivers/gpu/drm/bridge/cadence/cdns-dsi-core.c')
| -rw-r--r-- | drivers/gpu/drm/bridge/cadence/cdns-dsi-core.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/drivers/gpu/drm/bridge/cadence/cdns-dsi-core.c b/drivers/gpu/drm/bridge/cadence/cdns-dsi-core.c index b2b6529b1c70..7103878df1e7 100644 --- a/drivers/gpu/drm/bridge/cadence/cdns-dsi-core.c +++ b/drivers/gpu/drm/bridge/cadence/cdns-dsi-core.c @@ -498,6 +498,13 @@ static int cdns_dsi_mode2cfg(struct cdns_dsi *dsi, dsi_cfg->hfp = dpi_to_dsi_timing(mode->hsync_start - mode->hdisplay, bpp, DSI_HFP_FRAME_OVERHEAD); + dsi_cfg->htotal = dsi_cfg->hbp + DSI_HBP_FRAME_OVERHEAD; + if (output->dev->mode_flags & MIPI_DSI_MODE_VIDEO_SYNC_PULSE) + dsi_cfg->htotal += dsi_cfg->hsa + DSI_HSA_FRAME_OVERHEAD; + + dsi_cfg->htotal += dsi_cfg->hact; + dsi_cfg->htotal += dsi_cfg->hfp + DSI_HFP_FRAME_OVERHEAD; + return 0; } @@ -514,12 +521,7 @@ static int cdns_dsi_adjust_phy_config(struct cdns_dsi *dsi, unsigned int dsi_hfp_ext; unsigned int lanes = output->dev->lanes; - dsi_htotal = dsi_cfg->hbp + DSI_HBP_FRAME_OVERHEAD; - if (output->dev->mode_flags & MIPI_DSI_MODE_VIDEO_SYNC_PULSE) - dsi_htotal += dsi_cfg->hsa + DSI_HSA_FRAME_OVERHEAD; - - dsi_htotal += dsi_cfg->hact; - dsi_htotal += dsi_cfg->hfp + DSI_HFP_FRAME_OVERHEAD; + dsi_htotal = dsi_cfg->htotal; /* * Make sure DSI htotal is aligned on a lane boundary when calculating |