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

Commit c7dfb78f authored by Krishna Manikandan's avatar Krishna Manikandan Committed by Gerrit - the friendly Code Review server
Browse files

drm/msm/sde: add sui blendstage and QoS FL caps for kona



Remove the HW check in post caps and add secure-ui
blendstage and QoS no calc fill-level as capabilities
that can be used later to update the relevant blocks.
This will consolidate all the target specific capabilities
to one place. On top of it add both the capabilities for
Kona target.

Change-Id: Ie3e369bea28065c38ae4555a29de25e4d71db324
Signed-off-by: default avatarVeera Sundaram Sankaran <veeras@codeaurora.org>
Signed-off-by: default avatarKrishna Manikandan <mkrishn@codeaurora.org>
parent 9a3e6582
Loading
Loading
Loading
Loading
+13 −7
Original line number Diff line number Diff line
@@ -3709,6 +3709,8 @@ static int _sde_hardware_pre_caps(struct sde_mdss_cfg *sde_cfg, uint32_t hw_rev)
		sde_cfg->sui_misr_supported = true;
		sde_cfg->sui_block_xin_mask = 0x3F71;
		sde_cfg->has_3d_merge_reset = true;
		sde_cfg->has_sui_blendstage = true;
		sde_cfg->has_qos_fl_nocalc = true;
	} else if (IS_SDMSHRIKE_TARGET(hw_rev)) {
		sde_cfg->has_wb_ubwc = true;
		sde_cfg->perf.min_prefill_lines = 24;
@@ -3728,6 +3730,8 @@ static int _sde_hardware_pre_caps(struct sde_mdss_cfg *sde_cfg, uint32_t hw_rev)
		sde_cfg->sui_misr_supported = true;
		sde_cfg->sui_block_xin_mask = 0x2E61;
		sde_cfg->has_3d_merge_reset = true;
		sde_cfg->has_sui_blendstage = true;
		sde_cfg->has_qos_fl_nocalc = true;
	} else if (IS_SDMMAGPIE_TARGET(hw_rev)) {
		sde_cfg->has_cwb_support = true;
		sde_cfg->has_wb_ubwc = true;
@@ -3741,6 +3745,8 @@ static int _sde_hardware_pre_caps(struct sde_mdss_cfg *sde_cfg, uint32_t hw_rev)
		sde_cfg->sui_misr_supported = true;
		sde_cfg->sui_block_xin_mask = 0xE71;
		sde_cfg->has_3d_merge_reset = true;
		sde_cfg->has_sui_blendstage = true;
		sde_cfg->has_qos_fl_nocalc = true;
	} else if (IS_SDMTRINKET_TARGET(hw_rev)) {
		sde_cfg->has_cwb_support = true;
		sde_cfg->has_qsync = true;
@@ -3752,6 +3758,8 @@ static int _sde_hardware_pre_caps(struct sde_mdss_cfg *sde_cfg, uint32_t hw_rev)
		sde_cfg->sui_ns_allowed = true;
		sde_cfg->sui_misr_supported = true;
		sde_cfg->sui_block_xin_mask = 0xC61;
		sde_cfg->has_sui_blendstage = true;
		sde_cfg->has_qos_fl_nocalc = true;
	} else {
		SDE_ERROR("unsupported chipset id:%X\n", hw_rev);
		sde_cfg->perf.min_prefill_lines = 0xffff;
@@ -3770,16 +3778,10 @@ static int _sde_hardware_post_caps(struct sde_mdss_cfg *sde_cfg,
	if (!sde_cfg)
		return -EINVAL;

	if (IS_SM8150_TARGET(hw_rev) || IS_SM6150_TARGET(hw_rev) ||
		IS_SDMMAGPIE_TARGET(hw_rev) || IS_SDMTRINKET_TARGET(hw_rev)) {
	if (sde_cfg->has_sui_blendstage)
		sde_cfg->sui_supported_blendstage =
			sde_cfg->max_mixer_blendstages - SDE_STAGE_0;

		for (i = 0; i < sde_cfg->sspp_count; i++)
			set_bit(SDE_SSPP_QOS_FL_NOCALC,
					&sde_cfg->sspp[i].features);
	}

	for (i = 0; i < sde_cfg->sspp_count; i++) {
		if (sde_cfg->sspp[i].sblk) {
			max_horz_deci = max(max_horz_deci,
@@ -3788,6 +3790,10 @@ static int _sde_hardware_post_caps(struct sde_mdss_cfg *sde_cfg,
				sde_cfg->sspp[i].sblk->maxvdeciexp);
		}

		if (sde_cfg->has_qos_fl_nocalc)
			set_bit(SDE_SSPP_QOS_FL_NOCALC,
				&sde_cfg->sspp[i].features);

		/*
		 * set sec-ui blocked SSPP feature flag based on blocked
		 * xin-mask if sec-ui-misr feature is enabled;
+4 −0
Original line number Diff line number Diff line
@@ -1101,6 +1101,7 @@ struct sde_perf_cfg {
 * @delay_prg_fetch_start indicates if throttling the fetch start is required
 * @has_qsync	       Supports qsync feature
 * @has_3d_merge_reset Supports 3D merge reset
 * @has_qos_fl_nocalc  flag to indicate QoS fill level needs no calculation
 * @sui_misr_supported  indicate if secure-ui-misr is supported
 * @sui_block_xin_mask  mask of all the xin-clients to be blocked during
 *                         secure-ui when secure-ui-misr feature is supported
@@ -1110,6 +1111,7 @@ struct sde_perf_cfg {
 * @sui_ns_allowed      flag to indicate non-secure context banks are allowed
 *                         during secure-ui session
 * @sui_supported_blendstage  secure-ui supported blendstage
 * @has_sui_blendstage  flag to indicate secure-ui has a blendstage restriction
 */
struct sde_mdss_cfg {
	u32 hwversion;
@@ -1148,6 +1150,7 @@ struct sde_mdss_cfg {
	bool has_qsync;
	bool has_3d_merge_reset;
	bool has_line_insertion;
	bool has_qos_fl_nocalc;

	bool sui_misr_supported;
	u32 sui_block_xin_mask;
@@ -1156,6 +1159,7 @@ struct sde_mdss_cfg {
	u32 sec_sid_mask[MAX_BLOCKS];
	u32 sui_ns_allowed;
	u32 sui_supported_blendstage;
	bool has_sui_blendstage;

	bool has_hdr;
	u32 mdss_count;