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

Commit 56362507 authored by Veera Sundaram Sankaran's avatar Veera Sundaram Sankaran Committed by Gerrit - the friendly Code Review server
Browse files

drm/msm/sde: expose secure-ui blocked SSPP to user-mode



Currently, the secure-ui allowed SSPP are exposed through
the plane capability. Expose the secure-ui blocked sspp
instead, and modify the other catalog entries and validations
based on it.

Change-Id: Ic1bdd9c638adc1476554e04cbe069ff14b691ad2
Signed-off-by: default avatarVeera Sundaram Sankaran <veeras@codeaurora.org>
parent 5616c9b9
Loading
Loading
Loading
Loading
+5 −7
Original line number Diff line number Diff line
@@ -3278,15 +3278,13 @@ static int _sde_hardware_post_caps(struct sde_mdss_cfg *sde_cfg,
		}

		/*
		 * set sec-ui allowed SSPP feature flag based on allowed
		 * set sec-ui blocked SSPP feature flag based on blocked
		 * xin-mask if sec-ui-misr feature is enabled;
		 * otherwise allow for all SSPP
		 */
		if (!sde_cfg->sui_misr_supported
			|| (sde_cfg->sui_misr_supported
				&& (sde_cfg->sui_allow_xin_mask
					& BIT(sde_cfg->sspp[i].xin_id))))
			set_bit(SDE_SSPP_SEC_UI_ALLOWED,
		if (sde_cfg->sui_misr_supported
				&& (sde_cfg->sui_block_xin_mask
					& BIT(sde_cfg->sspp[i].xin_id)))
			set_bit(SDE_SSPP_BLOCK_SEC_UI,
					&sde_cfg->sspp[i].features);
	}

+2 −5
Original line number Diff line number Diff line
@@ -120,7 +120,7 @@ enum {
 * @SDE_SSPP_TS_PREFILL      Supports prefill with traffic shaper
 * @SDE_SSPP_TS_PREFILL_REC1 Supports prefill with traffic shaper multirec
 * @SDE_SSPP_CDP             Supports client driven prefetch
 * @SDE_SSPP_SEC_UI_ALLOWED   Allows secure-ui layers
 * @SDE_SSPP_BLOCK_SEC_UI    Blocks secure-ui layers
 * @SDE_SSPP_MAX             maximum value
 */
enum {
@@ -144,7 +144,7 @@ enum {
	SDE_SSPP_TS_PREFILL,
	SDE_SSPP_TS_PREFILL_REC1,
	SDE_SSPP_CDP,
	SDE_SSPP_SEC_UI_ALLOWED,
	SDE_SSPP_BLOCK_SEC_UI,
	SDE_SSPP_MAX
};

@@ -935,8 +935,6 @@ struct sde_perf_cfg {
 * @vbif_qos_nlvl      number of vbif QoS priority level
 * @ts_prefill_rev     prefill traffic shaper feature revision
 * @sui_misr_supported  indicate if secure-ui-misr is supported
 * @sui_allow_xin_mask  mask of all the xin-clients allowed during secure-ui
 *                         when secure-ui-misr feature 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
 */
@@ -970,7 +968,6 @@ struct sde_mdss_cfg {
	u32 ts_prefill_rev;

	bool sui_misr_supported;
	u32 sui_allow_xin_mask;
	u32 sui_block_xin_mask;

	bool has_hdr;
+8 −7
Original line number Diff line number Diff line
@@ -213,7 +213,7 @@ bool sde_plane_is_sec_ui_allowed(struct drm_plane *plane)

	psde = to_sde_plane(plane);

	return (psde->features & BIT(SDE_SSPP_SEC_UI_ALLOWED));
	return !(psde->features & BIT(SDE_SSPP_BLOCK_SEC_UI));
}

/**
@@ -2588,12 +2588,13 @@ void sde_plane_secure_ctrl_xin_client(struct drm_plane *plane,
	}
	psde = to_sde_plane(plane);

	if (psde->features & BIT(SDE_SSPP_BLOCK_SEC_UI))
		return;

	/* do all VBIF programming for the sec-ui allowed SSPP */
	if (psde->features & BIT(SDE_SSPP_SEC_UI_ALLOWED)) {
	_sde_plane_set_qos_remap(plane);
	_sde_plane_set_ot_limit(plane, crtc);
}
}

int sde_plane_reset_rot(struct drm_plane *plane, struct drm_plane_state *state)
{
@@ -4400,8 +4401,8 @@ static void _sde_plane_install_properties(struct drm_plane *plane,
			psde->pipe_sblk->maxvdeciexp);
	sde_kms_info_add_keyint(info, "max_per_pipe_bw",
			psde->pipe_sblk->max_per_pipe_bw * 1000LL);
	if (psde->features & BIT(SDE_SSPP_SEC_UI_ALLOWED))
		sde_kms_info_add_keyint(info, "sec_ui_allowed", 1);
	if (psde->features & BIT(SDE_SSPP_BLOCK_SEC_UI))
		sde_kms_info_add_keyint(info, "block_sec_ui", 1);
	msm_property_set_blob(&psde->property_info, &psde->blob_info,
			info->data, SDE_KMS_INFO_DATALEN(info),
			PLANE_PROP_INFO);