mdss: mdp: Update histogram start failure reporting
Userspace clients will enable the histogram and disable it as per the algorithm requirements. If the process under which the client is running crashes and restarts states of histogram between client and driver is not in sync. In case the driver is not in sync with client it should return EBUSY error to client. Client will stop and start the histogram to maintain the sync. Change-Id: I7b3c8d7890d8ca24ecf065e48a9ea5884cc886de Signed-off-by: Gopikrishnaiah Anandan <agopik@codeaurora.org>
This commit is contained in:
parent
4d9b8c2d45
commit
f08932c70f
1 changed files with 7 additions and 1 deletions
|
@ -3846,8 +3846,9 @@ static int pp_hist_enable(struct pp_hist_col_info *hist_info,
|
|||
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\n",
|
||||
pr_err("%s Hist collection has already been enabled %p\n",
|
||||
__func__, hist_info->base);
|
||||
ret = -EBUSY;
|
||||
goto exit;
|
||||
}
|
||||
hist_info->col_state = HIST_IDLE;
|
||||
|
@ -3968,6 +3969,11 @@ int mdss_mdp_hist_start(struct mdp_histogram_start_req *req)
|
|||
hist_info->disp_num = PP_BLOCK(req->block);
|
||||
hist_info->ctl = ctl;
|
||||
ret = pp_hist_enable(hist_info, req);
|
||||
if (ret) {
|
||||
pr_err("failed to enable histogram dspp_num %d ret %d\n",
|
||||
dspp_num, ret);
|
||||
goto hist_stop_clk;
|
||||
}
|
||||
mdss_pp_res->pp_disp_flags[disp_num] |=
|
||||
PP_FLAGS_DIRTY_HIST_COL;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue