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

Commit 2944cd6b authored by Raviteja Tamatam's avatar Raviteja Tamatam Committed by Shubhashree Dhar
Browse files

drm/msm/sde: prevent clearing multirect flags during validate failure



In corner case where crtc->planemask and atomic state->planes[]
do not match, driver clears the multirect_index/multirect_mode
in the plane->state during validate failure case. This can lead
to multirect_index/multirect_mode mismatch for next commits during
failure condition.

Change-Id: Idccaa79431469e185ca46c1e40b040427d02a96d
Signed-off-by: default avatarRaviteja Tamatam <travitej@codeaurora.org>
parent ad71dac9
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -4818,8 +4818,6 @@ static int sde_crtc_atomic_check(struct drm_crtc *crtc,

	for (i = 1; i < SSPP_MAX; i++) {
		if (pipe_staged[i]) {
			sde_plane_clear_multirect(pipe_staged[i]);

			if (is_sde_plane_virtual(pipe_staged[i]->plane)) {
				SDE_ERROR(
					"r1 only virt plane:%d not supported\n",
@@ -4827,6 +4825,7 @@ static int sde_crtc_atomic_check(struct drm_crtc *crtc,
				rc  = -EINVAL;
				goto end;
			}
			sde_plane_clear_multirect(pipe_staged[i]);
		}
	}