From 04536e868f8ea0754bf242b559b2d8c39c8322fb Mon Sep 17 00:00:00 2001 From: Anjaneya Prasad Musunuri Date: Wed, 15 Nov 2023 14:07:22 +0530 Subject: [PATCH 1/2] disp: msm: sde: force revalidation of LTM and RC features Currently revalidation of features happening for mode change(like fps change, resolution change). This change limits revalidation of feature only to resolution switch. Change-Id: I3678e0e94eaad51e7b7a342eb451aa6329e8279d Signed-off-by: Anjaneya Prasad Musunuri --- msm/sde/sde_color_processing.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) 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); From 54da6b5312871f918a374c7c158d104b8e6a04f7 Mon Sep 17 00:00:00 2001 From: Anjaneya Prasad Musunuri Date: Mon, 20 Nov 2023 18:06:35 -0800 Subject: [PATCH 2/2] disp: msm: sde: update dither, unsharp along with VLUT Dither, unsharp should not be enable when VLUT is disabled. This change ties dither, unsharp to VLUT enable/disable and not during init property. Change-Id: Idfad899a13252b22104c9746c86f4e158d9b0980 Signed-off-by: Gopikrishnaiah Anandan Signed-off-by: Anjaneya Prasad Musunuri --- msm/sde/sde_hw_reg_dma_v1_color_proc.c | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) 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),