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

Commit 3fdc2de8 authored by Ujwal Patel's avatar Ujwal Patel Committed by Gerrit - the friendly Code Review server
Browse files

msm: mdss: rotator: fix synchronization issue with multiple sessions



Current rotator driver allows more sessions than actual number of rotator
hardware. This requires virtualization when number of active sessions are
greater than number of rotators. In the current implementation,
synchronization bug is getting exposed if one rotator has two or more
sessions, all these sessions are actively using shared rotator in
interleave fashion and one of the session is using optimized path where
back to back configuration is same. This leads to unexpected results and
device hang. Fix this by maintaining proper ownership and hand-off when
one session is finished using given rotator and other one picks up.

Change-Id: I1f2e7376a01f248d11253bf5b6153ab236f07b19
Signed-off-by: default avatarUjwal Patel <ujwalp@codeaurora.org>
parent 0cfabb78
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -210,6 +210,12 @@ static struct mdss_mdp_rot_pipe *mdss_mdp_rot_mgr_acquire_pipe(
			rot_pipe->wait_count--;
			mutex_unlock(&rot_mgr->pipe_lock);
			rot_pipe = NULL;
		} else {
			mutex_lock(&rot_mgr->pipe_lock);
			rot_pipe->active_session = rot;
			rot_pipe->context_switched =
				(rot_pipe->previous_session != rot);
			mutex_unlock(&rot_mgr->pipe_lock);
		}
	}