summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDhaval Patel <pdhaval@quicinc.com>2016-10-25 21:11:59 -0700
committerGerrit - the friendly Code Review server <code-review@localhost>2016-10-25 21:11:59 -0700
commitaf41aede332cd655acd53af31df4fd89686eb301 (patch)
tree1603dcbd8d2793852aca2e0148b6bdb245228509
parent840efdeae13cbc70ff3ba78fe264e8c26e259db6 (diff)
parent90dbd643da89ba72c6b059d47f3a242bc32f86df (diff)
Merge "drm/msm/sde: update mixer op mode config bit fields correctly" into dev/msm-4.4-drm_kms
-rw-r--r--drivers/gpu/drm/msm/sde/sde_hw_lm.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/drivers/gpu/drm/msm/sde/sde_hw_lm.c b/drivers/gpu/drm/msm/sde/sde_hw_lm.c
index 995eaf43085d..365b9b17715d 100644
--- a/drivers/gpu/drm/msm/sde/sde_hw_lm.c
+++ b/drivers/gpu/drm/msm/sde/sde_hw_lm.c
@@ -72,16 +72,19 @@ static void sde_hw_lm_setup_out(struct sde_hw_mixer *ctx,
{
struct sde_hw_blk_reg_map *c = &ctx->hw;
u32 outsize;
- u32 opmode;
+ u32 op_mode;
- opmode = SDE_REG_READ(c, LM_OP_MODE);
+ op_mode = SDE_REG_READ(c, LM_OP_MODE);
outsize = mixer->out_height << 16 | mixer->out_width;
SDE_REG_WRITE(c, LM_OUT_SIZE, outsize);
/* SPLIT_LEFT_RIGHT */
- opmode = (opmode & ~(1 << 31)) | ((mixer->right_mixer) ? (1 << 31) : 0);
- SDE_REG_WRITE(c, LM_OP_MODE, opmode);
+ if (mixer->right_mixer)
+ op_mode |= BIT(31);
+ else
+ op_mode &= ~BIT(31);
+ SDE_REG_WRITE(c, LM_OP_MODE, op_mode);
}
static void sde_hw_lm_setup_border_color(struct sde_hw_mixer *ctx,
@@ -146,7 +149,7 @@ static void sde_hw_lm_setup_color3(struct sde_hw_mixer *ctx,
/* read the existing op_mode configuration */
op_mode = SDE_REG_READ(c, LM_OP_MODE);
- op_mode |= mixer_op_mode;
+ op_mode = (op_mode & (BIT(31) | BIT(30))) | mixer_op_mode;
SDE_REG_WRITE(c, LM_OP_MODE, op_mode);
}