summaryrefslogtreecommitdiff
path: root/drivers/video
diff options
context:
space:
mode:
authorBenet Clark <benetc@codeaurora.org>2015-06-26 16:38:53 -0700
committerDavid Keitel <dkeitel@codeaurora.org>2016-03-23 20:45:41 -0700
commit0fd5ebd158011919a6f436f8790ae5dd885930f0 (patch)
treec9b53b4dee1f94d55d17da091cc860c296eac93c /drivers/video
parentd4b6398600f7b081d1771e339081d2f1b2259040 (diff)
msm: mdss: Sum split-display histograms into left histogram data
For every histogram collect in a split display configuration, a concatenation scratch array was alloced in order to sum the histograms of the multiple DSPPs. This change improves performance by removing the allocation and summing the histograms into the histogram array of the first DSPP in the split display. Change-Id: Id07cdfc2175bdce0f3b662daa70a014986f73eb4 Signed-off-by: Benet Clark <benetc@codeaurora.org>
Diffstat (limited to 'drivers/video')
-rw-r--r--drivers/video/fbdev/msm/mdss_mdp_pp.c14
1 files changed, 3 insertions, 11 deletions
diff --git a/drivers/video/fbdev/msm/mdss_mdp_pp.c b/drivers/video/fbdev/msm/mdss_mdp_pp.c
index 68a28ae9bfbf..412e030e2413 100644
--- a/drivers/video/fbdev/msm/mdss_mdp_pp.c
+++ b/drivers/video/fbdev/msm/mdss_mdp_pp.c
@@ -4601,22 +4601,14 @@ int mdss_mdp_hist_collect(struct mdp_histogram_data *hist)
goto hist_collect_exit;
}
if (hist_cnt > 1) {
- hist_concat = kzalloc(HIST_V_SIZE * sizeof(u32),
- GFP_KERNEL);
- if (!hist_concat) {
- ret = -ENOMEM;
- goto hist_collect_exit;
- }
- for (i = 0; i < hist_cnt; i++) {
+ for (i = 1; i < hist_cnt; i++) {
mutex_lock(&hists[i]->hist_mutex);
for (j = 0; j < HIST_V_SIZE; j++)
- hist_concat[j] += hists[i]->data[j];
+ hists[0]->data[j] += hists[i]->data[j];
mutex_unlock(&hists[i]->hist_mutex);
}
- hist_data_addr = hist_concat;
- } else {
- hist_data_addr = hists[0]->data;
}
+ hist_data_addr = hists[0]->data;
for (i = 0; i < hist_cnt; i++)
hists[i]->hist_cnt_sent++;