diff options
author | Alex Shi <alex.shi@linaro.org> | 2018-03-20 02:25:07 +0000 |
---|---|---|
committer | Alex Shi <alex.shi@linaro.org> | 2018-03-20 02:25:07 +0000 |
commit | 031f431679b03ba7e791dd051fc13f51f806fcd7 (patch) | |
tree | 9018f8a4a6c04feaf0180cae915dfe804913ce34 /drivers/gpu/drm/gma500/mdfld_dsi_dpi.c | |
parent | f7901365aa48b20b25f8402e0fd1eea4ac6c55e7 (diff) | |
parent | 91db57e54eb9be1560454d6a370d67847b05735f (diff) |
Merge remote-tracking branch 'rt-stable/v4.4-rt' into linux-linaro-lsk-v4.4-rtlsk-v4.4-18.03-rt
Diffstat (limited to 'drivers/gpu/drm/gma500/mdfld_dsi_dpi.c')
-rw-r--r-- | drivers/gpu/drm/gma500/mdfld_dsi_dpi.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/drivers/gpu/drm/gma500/mdfld_dsi_dpi.c b/drivers/gpu/drm/gma500/mdfld_dsi_dpi.c index d4813e03f5ee..00275c3856ce 100644 --- a/drivers/gpu/drm/gma500/mdfld_dsi_dpi.c +++ b/drivers/gpu/drm/gma500/mdfld_dsi_dpi.c @@ -821,14 +821,18 @@ void mdfld_dsi_dpi_mode_set(struct drm_encoder *encoder, struct drm_device *dev = dsi_config->dev; struct drm_psb_private *dev_priv = dev->dev_private; int pipe = mdfld_dsi_encoder_get_pipe(dsi_encoder); - u32 pipeconf_reg = PIPEACONF; u32 dspcntr_reg = DSPACNTR; + u32 pipeconf, dspcntr; - u32 pipeconf = dev_priv->pipeconf[pipe]; - u32 dspcntr = dev_priv->dspcntr[pipe]; u32 mipi = MIPI_PORT_EN | PASS_FROM_SPHY_TO_AFE | SEL_FLOPPED_HSTX; + if (WARN_ON(pipe < 0)) + return; + + pipeconf = dev_priv->pipeconf[pipe]; + dspcntr = dev_priv->dspcntr[pipe]; + if (pipe) { pipeconf_reg = PIPECCONF; dspcntr_reg = DSPCCNTR; |