소스 검색

disp: msm: sde: Secondary display lm preference with lm pair

When secondary display preference is determined and 2 layer
mixers are required, the preference must check LM pair mask
to meet hw restrictions.

Change-Id: I22845be84f95659a58be98ff11afa4e652fb16e3
Signed-off-by: Nilaan Gunabalachandran <[email protected]>
Nilaan Gunabalachandran 6 년 전
부모
커밋
e87d8f7cc5
1개의 변경된 파일19개의 추가작업 그리고 0개의 파일을 삭제
  1. 19 0
      msm/sde/sde_hw_catalog.c

+ 19 - 0
msm/sde/sde_hw_catalog.c

@@ -1656,6 +1656,16 @@ void sde_hw_mixer_set_preference(struct sde_mdss_cfg *sde_cfg, u32 num_lm,
 				cnt++;
 			}
 
+			/*
+			 * When all primary prefs have been set,
+			 * and if 2 lms are required for secondary
+			 * preference must be set with an lm pair
+			 */
+			if (cnt == num_lm && sec_cnt > 1 &&
+					!test_bit(sde_cfg->mixer[i+1].id,
+					&sde_cfg->mixer[i].lm_pair_mask))
+				continue;
+
 			/* After primary pref is set, now re apply secondary */
 			if (cnt >= num_lm && cnt < (num_lm + sec_cnt)) {
 				set_bit(SDE_DISP_SECONDARY_PREF,
@@ -1668,6 +1678,15 @@ void sde_hw_mixer_set_preference(struct sde_mdss_cfg *sde_cfg, u32 num_lm,
 			clear_bit(SDE_DISP_SECONDARY_PREF,
 					&sde_cfg->mixer[i].features);
 
+			/*
+			 * If 2 lms are required for secondary
+			 * preference must be set with an lm pair
+			 */
+			if (cnt == 0 && num_lm > 1 &&
+					!test_bit(sde_cfg->mixer[i+1].id,
+					&sde_cfg->mixer[i].lm_pair_mask))
+				continue;
+
 			if (cnt < num_lm && !(sde_cfg->mixer[i].features &
 					BIT(SDE_DISP_PRIMARY_PREF))) {
 				set_bit(SDE_DISP_SECONDARY_PREF,