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

Commit 9a096218 authored by Adrian Salido-Moreno's avatar Adrian Salido-Moreno Committed by Gerrit - the friendly Code Review server
Browse files

msm: mdss: remove extra lock for ctl calls



Some ctl functions need only protection for mixer programming changes,
since all of these calls are made within ov_lock there is no need for
additional protection. Specially since ctl->lock is still held when
mixer configuration is safe to be changed.

Change-Id: I4f39e28f40ef18789a653d02346358b7ca7590c6
Signed-off-by: default avatarAdrian Salido-Moreno <adrianm@codeaurora.org>
parent ac8cc583
Loading
Loading
Loading
Loading
+0 −8
Original line number Diff line number Diff line
@@ -1499,13 +1499,9 @@ struct mdss_mdp_pipe *mdss_mdp_mixer_stage_pipe(struct mdss_mdp_ctl *ctl,
	if (!ctl)
		return NULL;

	if (mutex_lock_interruptible(&ctl->lock))
		return NULL;

	mixer = mdss_mdp_mixer_get(ctl, mux);
	if (mixer)
		pipe = mixer->stage_pipe[stage];
	mutex_unlock(&ctl->lock);

	return pipe;
}
@@ -1576,14 +1572,10 @@ int mdss_mdp_mixer_pipe_unstage(struct mdss_mdp_pipe *pipe)
	pr_debug("unstage pnum=%d stage=%d mixer=%d\n", pipe->num,
			pipe->mixer_stage, mixer->num);

	if (mutex_lock_interruptible(&ctl->lock))
		return -EINTR;

	if (pipe == mixer->stage_pipe[pipe->mixer_stage]) {
		mixer->params_changed++;
		mixer->stage_pipe[pipe->mixer_stage] = NULL;
	}
	mutex_unlock(&ctl->lock);

	return 0;
}