Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5495ca1c authored by Ch Ganesh Kumar's avatar Ch Ganesh Kumar
Browse files

msm: mdss: Clear pp dirty flags based on program stage



Clear PP features dirty flags only when they are programmed, based on
programming stage, i.e. clear dirty flags of features programmed in
early stage after early stage programming and clear dirty flags of
features programmed in deferred stage after their actual programming
is complete.

Clearing the flags in one go is resulting in missing programming of
features designated to be programmed in early stage, if the dirty flags
are updated in between the stages.

Change-Id: If65a5982254a7421c6f0ec32018361c651964e4e
Signed-off-by: default avatarCh Ganesh Kumar <chganesh@codeaurora.org>
parent 2842372b
Loading
Loading
Loading
Loading
+13 −1
Original line number Diff line number Diff line
@@ -453,6 +453,13 @@ static u32 igc_limited[IGC_LUT_ENTRIES] = {
#define PP_FLAGS_DIRTY_SHARP	0x200
#define PP_FLAGS_DIRTY_PA_DITHER 0x400

#define PP_EARLY_PROGRAM_DIRTY_MASK (PP_FLAGS_DIRTY_PCC | \
		PP_FLAGS_DIRTY_ENHIST | PP_FLAGS_DIRTY_HIST_COL)
#define PP_DEFERRED_PROGRAM_DIRTY_MASK (PP_FLAGS_DIRTY_IGC | \
		PP_FLAGS_DIRTY_PGC | PP_FLAGS_DIRTY_ARGC | \
		PP_FLAGS_DIRTY_GAMUT | PP_FLAGS_DIRTY_PA | \
		PP_FLAGS_DIRTY_DITHER | PP_FLAGS_DIRTY_PA_DITHER)

/* Leave space for future features */
#define PP_FLAGS_RESUME_COMMIT	0x10000000

@@ -2853,10 +2860,15 @@ int mdss_mdp_pp_setup_locked(struct mdss_mdp_ctl *ctl,
		}
	}

	if (info->pp_program_mask & PP_NORMAL_PROGRAM_MASK) {
		mdss_pp_res->pp_disp_flags[disp_num] &=
				~PP_EARLY_PROGRAM_DIRTY_MASK;
	}
	if (info->pp_program_mask & PP_DEFER_PROGRAM_MASK) {
		/* clear dirty flag */
		if (disp_num < MDSS_BLOCK_DISP_NUM) {
			mdss_pp_res->pp_disp_flags[disp_num] = 0;
			mdss_pp_res->pp_disp_flags[disp_num] &=
				~PP_DEFERRED_PROGRAM_DIRTY_MASK;
			if (disp_num < mdata->nad_cfgs)
				mdata->ad_cfgs[disp_num].reg_sts = 0;
		}