summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGopikrishnaiah Anandan <agopik@codeaurora.org>2015-06-01 11:47:58 -0700
committerDavid Keitel <dkeitel@codeaurora.org>2016-03-23 20:42:26 -0700
commitf08932c70f33ff6b012b6b6dcae414362bc124fc (patch)
tree5a25f02ce894f982263b2b2ae28b7a9771fa9851
parent4d9b8c2d45e8b6e9bde98c94e72b3d8db1b099dc (diff)
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>
-rw-r--r--drivers/video/fbdev/msm/mdss_mdp_pp.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/drivers/video/fbdev/msm/mdss_mdp_pp.c b/drivers/video/fbdev/msm/mdss_mdp_pp.c
index 1ff6434463e8..ca3693ba32e1 100644
--- a/drivers/video/fbdev/msm/mdss_mdp_pp.c
+++ b/drivers/video/fbdev/msm/mdss_mdp_pp.c
@@ -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;
}