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

Commit fcdad7a6 authored by Raviteja Tamatam's avatar Raviteja Tamatam Committed by Gerrit - the friendly Code Review server
Browse files

drm/msm/sde: program color fill in planes in failure at commit stage



During secure transition, failure in _sde_plane_set_scanout at
atomic commit stage can lead to unsecure buffer address being
programmed to secure pipe and lead to stage 2 smmu faults.
These failure cases are taken care by inducing solid fill color
on such planes.

Change-Id: I3ba19b040b5a71b7d7f3629de650037f6027b656
Signed-off-by: default avatarRaviteja Tamatam <travitej@codeaurora.org>
parent ce74f975
Loading
Loading
Loading
Loading
+8 −2
Original line number Original line Diff line number Diff line
@@ -885,7 +885,6 @@ int sde_plane_wait_input_fence(struct drm_plane *plane, uint32_t wait_ms)
		input_fence = pstate->input_fence;
		input_fence = pstate->input_fence;


		if (input_fence) {
		if (input_fence) {
			psde->is_error = false;
			prefix = sde_sync_get_name_prefix(input_fence);
			prefix = sde_sync_get_name_prefix(input_fence);
			rc = sde_sync_wait(input_fence, wait_ms);
			rc = sde_sync_wait(input_fence, wait_ms);


@@ -1025,8 +1024,15 @@ static inline void _sde_plane_set_scanout(struct drm_plane *plane,
	ret = sde_format_populate_layout(aspace, fb, &pipe_cfg->layout);
	ret = sde_format_populate_layout(aspace, fb, &pipe_cfg->layout);
	if (ret == -EAGAIN)
	if (ret == -EAGAIN)
		SDE_DEBUG_PLANE(psde, "not updating same src addrs\n");
		SDE_DEBUG_PLANE(psde, "not updating same src addrs\n");
	else if (ret)
	else if (ret) {
		SDE_ERROR_PLANE(psde, "failed to get format layout, %d\n", ret);
		SDE_ERROR_PLANE(psde, "failed to get format layout, %d\n", ret);

		/*
		 * Force solid fill color on error. This is to prevent
		 * smmu faults during secure session transition.
		 */
		psde->is_error = true;
	}
	else if (psde->pipe_hw->ops.setup_sourceaddress) {
	else if (psde->pipe_hw->ops.setup_sourceaddress) {
		SDE_EVT32_VERBOSE(psde->pipe_hw->idx,
		SDE_EVT32_VERBOSE(psde->pipe_hw->idx,
				pipe_cfg->layout.width,
				pipe_cfg->layout.width,