msm: mdss: Initialize ad_info completion during dt probe only
Previously, the ad_info completion structure was initialized every time ad_input was called, which reset the completion wait_queue. A completion structure should only be initialized once, in order to prevent any corruptions of the wait_queue. Instead, we initialize the completion during dt probe so that the wait_queue is only initialized once, and during ad_input, we use a safer INIT_COMPLETION for resetting complete count. Change-Id: If1fb7c9a9dec2ad1ec1f07b022bdeabe1af41b22 Signed-off-by: Benet Clark <benetc@codeaurora.org>
This commit is contained in:
parent
c02df0f77f
commit
dde9a17306
1 changed files with 2 additions and 1 deletions
|
@ -4375,7 +4375,7 @@ error:
|
|||
if (!ret) {
|
||||
if (wait) {
|
||||
mutex_lock(&ad->lock);
|
||||
init_completion(&ad->comp);
|
||||
INIT_COMPLETION(ad->comp);
|
||||
mutex_unlock(&ad->lock);
|
||||
}
|
||||
if (wait) {
|
||||
|
@ -4948,6 +4948,7 @@ int mdss_mdp_ad_addr_setup(struct mdss_data_type *mdata, u32 *ad_offsets)
|
|||
mdata->ad_cfgs[i].last_str = 0xFFFFFFFF;
|
||||
mdata->ad_cfgs[i].last_bl = 0;
|
||||
mutex_init(&mdata->ad_cfgs[i].lock);
|
||||
init_completion(&mdata->ad_cfgs[i].comp);
|
||||
mdata->ad_cfgs[i].handle.vsync_handler = pp_ad_vsync_handler;
|
||||
mdata->ad_cfgs[i].handle.cmd_post_flush = true;
|
||||
INIT_WORK(&mdata->ad_cfgs[i].calc_work, pp_ad_calc_worker);
|
||||
|
|
Loading…
Add table
Reference in a new issue