diff --git a/msm/sde/sde_color_processing.c b/msm/sde/sde_color_processing.c index 04ae2335..5f368e04 100644 --- a/msm/sde/sde_color_processing.c +++ b/msm/sde/sde_color_processing.c @@ -2003,6 +2003,7 @@ int sde_cp_crtc_check_properties(struct drm_crtc *crtc, { struct sde_crtc *sde_crtc = NULL; struct sde_crtc_state *sde_crtc_state = NULL; + struct drm_display_mode *old_mode, *new_mode; int i, ret = 0; if (!crtc || !crtc->dev || !state) { @@ -2023,8 +2024,11 @@ int sde_cp_crtc_check_properties(struct drm_crtc *crtc, return -EINVAL; } - /* force revalidation of some properties when there is a mode switch */ - if (state->mode_changed) + /* force revalidation of some properties when there is a resolution switch */ + old_mode = &crtc->state->adjusted_mode; + new_mode = &state->adjusted_mode; + if ((old_mode->hdisplay != new_mode->hdisplay) || + (old_mode->vdisplay != new_mode->vdisplay)) sde_cp_crtc_res_change(crtc); mutex_lock(&sde_crtc->crtc_cp_lock); diff --git a/msm/sde/sde_hw_reg_dma_v1_color_proc.c b/msm/sde/sde_hw_reg_dma_v1_color_proc.c index 8b4ebe0f..4a0d19f4 100644 --- a/msm/sde/sde_hw_reg_dma_v1_color_proc.c +++ b/msm/sde/sde_hw_reg_dma_v1_color_proc.c @@ -32,7 +32,7 @@ * When disabling INIT property, we don't want to reset those bits since * they are needed for both LTM histogram and VLUT. */ -#define REG_DMA_LTM_INIT_ENABLE_OP_MASK 0xFFFF8CAB +#define REG_DMA_LTM_INIT_ENABLE_OP_MASK 0x1100153 #define REG_DMA_LTM_INIT_DISABLE_OP_MASK 0xFFFF8CAF #define REG_DMA_LTM_ROI_OP_MASK 0xFEFFFFFF /** @@ -3794,22 +3794,16 @@ void reg_dmav1_setup_ltm_initv1(struct sde_hw_dspp *ctx, void *cfg) } if (init_param->init_param_01) { - if (ltm_vlut_ops_mask[dspp_idx[i]] & ltm_vlut) - opmode |= BIT(6); ltm_vlut_ops_mask[dspp_idx[i]] |= ltm_dither; opmode |= ((init_param->init_param_02 & 0x7) << 12); } else { - opmode &= ~BIT(6); ltm_vlut_ops_mask[dspp_idx[i]] &= ~ltm_dither; } if (init_param->init_param_03) { - if (ltm_vlut_ops_mask[dspp_idx[i]] & ltm_vlut) - opmode |= BIT(4); ltm_vlut_ops_mask[dspp_idx[i]] |= ltm_unsharp; opmode |= ((init_param->init_param_04 & 0x3) << 8); } else { - opmode &= ~BIT(4); ltm_vlut_ops_mask[dspp_idx[i]] &= ~ltm_unsharp; } @@ -3988,8 +3982,6 @@ void reg_dmav1_setup_ltm_roiv1(struct sde_hw_dspp *ctx, void *cfg) return; } - if (ltm_vlut_ops_mask[dspp_idx[i]] & ltm_vlut) - opmode |= BIT(24); ltm_vlut_ops_mask[dspp_idx[i]] |= ltm_roi; REG_DMA_SETUP_OPS(dma_write_cfg, 0x04, &opmode, sizeof(opmode),