Эх сурвалжийг харах

disp: msm: sde: determine rotation capabilities from version

Determine inline rotation capabilities and parameter values
from the inline rotator revision. This reduces the number of
capabilities required to be added for each new target.

Change-Id: I3ae02938d51be5a5419b50303c1f244be12b8c47
Signed-off-by: Steve Cohen <[email protected]>
Steve Cohen 5 жил өмнө
parent
commit
1579af15fc

+ 16 - 28
msm/sde/sde_hw_catalog.c

@@ -1258,27 +1258,33 @@ static void _sde_sspp_setup_vig(struct sde_mdss_cfg *sde_cfg,
 
 	sblk->format_list = sde_cfg->vig_formats;
 	sblk->virt_format_list = sde_cfg->virt_vig_formats;
-	if (IS_SDE_INLINE_ROT_REV_100(sde_cfg->true_inline_rot_rev) ||
-			IS_SDE_INLINE_ROT_REV_200(
-			sde_cfg->true_inline_rot_rev)) {
+
+	if (sde_cfg->true_inline_rot_rev > 0) {
 		set_bit(SDE_SSPP_TRUE_INLINE_ROT, &sspp->features);
 		sblk->in_rot_format_list = sde_cfg->inline_rot_formats;
-		sblk->in_rot_maxdwnscale_rt_num =
-			sde_cfg->true_inline_dwnscale_rt_num;
-		sblk->in_rot_maxdwnscale_rt_denom =
-			sde_cfg->true_inline_dwnscale_rt_denom;
-		sblk->in_rot_maxdwnscale_nrt =
-			sde_cfg->true_inline_dwnscale_nrt;
 		sblk->in_rot_maxheight =
-			MAX_PRE_ROT_HEIGHT_INLINE_ROT_DEFAULT;
+				MAX_PRE_ROT_HEIGHT_INLINE_ROT_DEFAULT;
 	}
 
 	if (IS_SDE_INLINE_ROT_REV_200(sde_cfg->true_inline_rot_rev)) {
 		set_bit(SDE_SSPP_PREDOWNSCALE, &sspp->features);
+		sblk->in_rot_maxdwnscale_rt_num =
+				MAX_DOWNSCALE_RATIO_INROT_PD_RT_NUMERATOR;
+		sblk->in_rot_maxdwnscale_rt_denom =
+				MAX_DOWNSCALE_RATIO_INROT_PD_RT_DENOMINATOR;
+		sblk->in_rot_maxdwnscale_nrt =
+				MAX_DOWNSCALE_RATIO_INROT_NRT_DEFAULT;
 		sblk->in_rot_minpredwnscale_num =
 				MAX_DOWNSCALE_RATIO_INROT_NOPD_RT_NUMERATOR;
 		sblk->in_rot_minpredwnscale_denom =
 				MAX_DOWNSCALE_RATIO_INROT_NOPD_RT_DENOMINATOR;
+	} else if (IS_SDE_INLINE_ROT_REV_100(sde_cfg->true_inline_rot_rev)) {
+		sblk->in_rot_maxdwnscale_rt_num =
+				MAX_DOWNSCALE_RATIO_INROT_NOPD_RT_NUMERATOR;
+		sblk->in_rot_maxdwnscale_rt_denom =
+				MAX_DOWNSCALE_RATIO_INROT_NOPD_RT_DENOMINATOR;
+		sblk->in_rot_maxdwnscale_nrt =
+				MAX_DOWNSCALE_RATIO_INROT_NRT_DEFAULT;
 	}
 
 	if (sde_cfg->sc_cfg.has_sys_cache) {
@@ -4315,12 +4321,6 @@ static int _sde_hardware_pre_caps(struct sde_mdss_cfg *sde_cfg, uint32_t hw_rev)
 		set_bit(SDE_MDP_DHDR_MEMPOOL, &sde_cfg->mdp[0].features);
 		sde_cfg->has_vig_p010 = true;
 		sde_cfg->true_inline_rot_rev = SDE_INLINE_ROT_VERSION_1_0_0;
-		sde_cfg->true_inline_dwnscale_rt_num =
-			MAX_DOWNSCALE_RATIO_INROT_NOPD_RT_NUMERATOR;
-		sde_cfg->true_inline_dwnscale_rt_denom =
-			MAX_DOWNSCALE_RATIO_INROT_NOPD_RT_DENOMINATOR;
-		sde_cfg->true_inline_dwnscale_nrt =
-			MAX_DOWNSCALE_RATIO_INROT_NRT_DEFAULT;
 		sde_cfg->uidle_cfg.uidle_rev = SDE_UIDLE_VERSION_1_0_0;
 		sde_cfg->inline_disable_const_clr = true;
 	} else if (IS_SAIPAN_TARGET(hw_rev)) {
@@ -4343,12 +4343,6 @@ static int _sde_hardware_pre_caps(struct sde_mdss_cfg *sde_cfg, uint32_t hw_rev)
 		set_bit(SDE_MDP_DHDR_MEMPOOL, &sde_cfg->mdp[0].features);
 		sde_cfg->has_vig_p010 = true;
 		sde_cfg->true_inline_rot_rev = SDE_INLINE_ROT_VERSION_1_0_0;
-		sde_cfg->true_inline_dwnscale_rt_num =
-			MAX_DOWNSCALE_RATIO_INROT_NOPD_RT_NUMERATOR;
-		sde_cfg->true_inline_dwnscale_rt_denom =
-			MAX_DOWNSCALE_RATIO_INROT_NOPD_RT_DENOMINATOR;
-		sde_cfg->true_inline_dwnscale_nrt =
-			MAX_DOWNSCALE_RATIO_INROT_NRT_DEFAULT;
 		sde_cfg->inline_disable_const_clr = true;
 	} else if (IS_SDMTRINKET_TARGET(hw_rev)) {
 		sde_cfg->has_cwb_support = true;
@@ -4396,12 +4390,6 @@ static int _sde_hardware_pre_caps(struct sde_mdss_cfg *sde_cfg, uint32_t hw_rev)
 		set_bit(SDE_MDP_DHDR_MEMPOOL, &sde_cfg->mdp[0].features);
 		sde_cfg->has_vig_p010 = true;
 		sde_cfg->true_inline_rot_rev = SDE_INLINE_ROT_VERSION_2_0_0;
-		sde_cfg->true_inline_dwnscale_rt_num =
-				MAX_DOWNSCALE_RATIO_INROT_PD_RT_NUMERATOR;
-		sde_cfg->true_inline_dwnscale_rt_denom =
-				MAX_DOWNSCALE_RATIO_INROT_PD_RT_DENOMINATOR;
-		sde_cfg->true_inline_dwnscale_nrt =
-				MAX_DOWNSCALE_RATIO_INROT_NRT_DEFAULT;
 		sde_cfg->uidle_cfg.uidle_rev = SDE_UIDLE_VERSION_1_0_0;
 		sde_cfg->vbif_disable_inner_outer_shareable = true;
 	} else {

+ 0 - 8
msm/sde/sde_hw_catalog.h

@@ -1271,11 +1271,6 @@ struct sde_limit_cfg {
  * @vbif_qos_nlvl      number of vbif QoS priority level
  * @ts_prefill_rev     prefill traffic shaper feature revision
  * @true_inline_rot_rev	inline rotator feature revision
- * @true_inline_dwnscale_rt_num    true inline rotator downscale ratio for rt
- *                                       - numerator
- * @true_inline_dwnscale_rt_denom    true inline rot downscale ratio for rt
- *                                       - denominator
- * @true_inline_dwnscale_nrt    true inline rotator downscale ratio for nrt
  * @macrotile_mode     UBWC parameter for macro tile channel distribution
  * @pipe_order_type    indicate if it is required to specify pipe order
  * @delay_prg_fetch_start indicates if throttling the fetch start is required
@@ -1333,9 +1328,6 @@ struct sde_mdss_cfg {
 	u32 vbif_qos_nlvl;
 	u32 ts_prefill_rev;
 	u32 true_inline_rot_rev;
-	u32 true_inline_dwnscale_rt_num;
-	u32 true_inline_dwnscale_rt_denom;
-	u32 true_inline_dwnscale_nrt;
 	u32 macrotile_mode;
 	u32 pipe_order_type;
 	bool delay_prg_fetch_start;