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

Commit 4c048f47 authored by Benet Clark's avatar Benet Clark
Browse files

msm: mdss: Move histogram completion initialization to pp_init



The histogram completion structures are initialized in pp_init, in
order to avoid the wait_queue initialization being called multiple times.
The init_completion in hist_enable has been replaced with a safer
function that does not modify the wait_queue.

Change-Id: If4dfc6a74069d9adc867131201e6f74c3c81c1ac
Signed-off-by: default avatarBenet Clark <benetc@codeaurora.org>
parent 7f8225d0
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -1899,6 +1899,7 @@ int mdss_mdp_pp_init(struct device *dev)
					hist[i].base =
						mdss_mdp_get_dspp_addr_off(i) +
						MDSS_MDP_REG_DSPP_HIST_CTL_BASE;
					init_completion(&hist[i].comp);
				}
				mdss_pp_res->dspp_hist = hist;
			}
@@ -1912,6 +1913,7 @@ int mdss_mdp_pp_init(struct device *dev)
			vig[i].pp_res.hist.intr_shift = (vig[i].num * 4);
			vig[i].pp_res.hist.base = vig[i].base +
				MDSS_MDP_REG_VIG_HIST_CTL_BASE;
			init_completion(&vig[i].pp_res.hist.comp);
		}
		if (!mdata->pp_bus_hdl) {
			pp_bus_pdata = &mdp_pp_bus_scale_table;
@@ -3057,7 +3059,7 @@ static int pp_hist_enable(struct pp_hist_col_info *hist_info,
		goto exit;
	}
	hist_info->frame_cnt = req->frame_cnt;
	init_completion(&hist_info->comp);
	INIT_COMPLETION(hist_info->comp);
	hist_info->hist_cnt_read = 0;
	hist_info->hist_cnt_sent = 0;
	hist_info->hist_cnt_time = 0;