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

Commit 3e595599 authored by Benet Clark's avatar Benet Clark
Browse files

msm: mdss: Fix locking error in histogram disable



There is a histogram variable that was missing the spinlock
while it was being read. It has been added.

Change-Id: I2d726ab5b7b0a9a43b8421f8935780c09df752c0
Signed-off-by: default avatarBenet Clark <benetc@codeaurora.org>
parent b22f36a4
Loading
Loading
Loading
Loading
+2 −1
Original line number Original line Diff line number Diff line
@@ -3182,12 +3182,13 @@ static int pp_hist_disable(struct pp_hist_col_info *hist_info)
	u32 intr_mask = is_hist_v2 ? 1 : 3;
	u32 intr_mask = is_hist_v2 ? 1 : 3;


	mutex_lock(&hist_info->hist_mutex);
	mutex_lock(&hist_info->hist_mutex);
	spin_lock_irqsave(&hist_info->hist_lock, flag);
	if (hist_info->col_en == false) {
	if (hist_info->col_en == false) {
		spin_unlock_irqrestore(&hist_info->hist_lock, flag);
		pr_debug("Histogram already disabled (%p)", hist_info->base);
		pr_debug("Histogram already disabled (%p)", hist_info->base);
		ret = -EINVAL;
		ret = -EINVAL;
		goto exit;
		goto exit;
	}
	}
	spin_lock_irqsave(&hist_info->hist_lock, flag);
	hist_info->col_en = false;
	hist_info->col_en = false;
	hist_info->col_state = HIST_UNKNOWN;
	hist_info->col_state = HIST_UNKNOWN;
	spin_unlock_irqrestore(&hist_info->hist_lock, flag);
	spin_unlock_irqrestore(&hist_info->hist_lock, flag);