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

Commit 101fc9eb authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "msm: mdss: Fix locking error in histogram enable"

parents 89a5bcf2 80bd3897
Loading
Loading
Loading
Loading
+7 −6
Original line number Diff line number Diff line
@@ -3131,18 +3131,14 @@ static int pp_hist_enable(struct pp_hist_col_info *hist_info,

	mutex_lock(&hist_info->hist_mutex);
	/* check if it is idle */
	spin_lock_irqsave(&hist_info->hist_lock, flag);
	if (hist_info->col_en) {
		spin_unlock_irqrestore(&hist_info->hist_lock, flag);
		pr_info("%s Hist collection has already been enabled %p",
			__func__, hist_info->base);
		ret = -EINVAL;
		goto exit;
	}
	hist_info->frame_cnt = req->frame_cnt;
	INIT_COMPLETION(hist_info->comp);
	hist_info->hist_cnt_read = 0;
	hist_info->hist_cnt_sent = 0;
	hist_info->hist_cnt_time = 0;
	spin_lock_irqsave(&hist_info->hist_lock, flag);
	hist_info->read_request = 0;
	if (is_hist_v2)
		hist_info->col_state = HIST_IDLE;
@@ -3150,6 +3146,11 @@ static int pp_hist_enable(struct pp_hist_col_info *hist_info,
		hist_info->col_state = HIST_RESET;
	hist_info->col_en = true;
	spin_unlock_irqrestore(&hist_info->hist_lock, flag);
	hist_info->frame_cnt = req->frame_cnt;
	INIT_COMPLETION(hist_info->comp);
	hist_info->hist_cnt_read = 0;
	hist_info->hist_cnt_sent = 0;
	hist_info->hist_cnt_time = 0;
	mdss_mdp_hist_intr_req(&mdata->hist_intr,
				intr_mask << hist_info->intr_shift, true);
	if (is_hist_v2) {