diff options
| author | Sree Sesha Aravind Vadrevu <svadrevu@codeaurora.org> | 2013-05-06 14:47:38 -0700 |
|---|---|---|
| committer | David Keitel <dkeitel@codeaurora.org> | 2016-03-23 20:17:00 -0700 |
| commit | 8b76a8380ee19ee8d8260658f111d8b3eb4bb87d (patch) | |
| tree | d515a3c0f6ffb286c456a6def876cb27ee982278 | |
| parent | ce073779445b7efd903aa089528ecc5c21028a79 (diff) | |
msm: mdss: Change ctl allocation
Need to assign ctl that is consistent with the type of mixer
allocated. Specifically for writeback mixers so that it can be
separated from interface ctls.
Change-Id: I7ae7316685286eab6202b91d8347bfd128b0a0b3
Signed-off-by: Sree Sesha Aravind Vadrevu <svadrevu@codeaurora.org>
| -rw-r--r-- | drivers/video/fbdev/msm/mdss_mdp_ctl.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/drivers/video/fbdev/msm/mdss_mdp_ctl.c b/drivers/video/fbdev/msm/mdss_mdp_ctl.c index e5f95ac72262..e34608215a02 100644 --- a/drivers/video/fbdev/msm/mdss_mdp_ctl.c +++ b/drivers/video/fbdev/msm/mdss_mdp_ctl.c @@ -248,13 +248,14 @@ static int mdss_mdp_ctl_perf_update(struct mdss_mdp_ctl *ctl) return ret; } -static struct mdss_mdp_ctl *mdss_mdp_ctl_alloc(struct mdss_data_type *mdata) +static struct mdss_mdp_ctl *mdss_mdp_ctl_alloc(struct mdss_data_type *mdata, + u32 off) { struct mdss_mdp_ctl *ctl = NULL; - int cnum; + u32 cnum; mutex_lock(&mdss_mdp_ctl_lock); - for (cnum = 0; cnum < mdata->nctl; cnum++) { + for (cnum = off; cnum < mdata->nctl; cnum++) { ctl = mdata->ctl_off + cnum; if (ctl->ref_cnt == 0) { ctl->ref_cnt++; @@ -391,7 +392,7 @@ struct mdss_mdp_mixer *mdss_mdp_wb_mixer_alloc(int rotator) struct mdss_mdp_ctl *ctl = NULL; struct mdss_mdp_mixer *mixer = NULL; - ctl = mdss_mdp_ctl_alloc(mdss_res); + ctl = mdss_mdp_ctl_alloc(mdss_res, mdss_res->nmixers_intf); if (!ctl) return NULL; @@ -669,7 +670,7 @@ struct mdss_mdp_ctl *mdss_mdp_ctl_init(struct mdss_panel_data *pdata, int ret = 0; struct mdss_data_type *mdata = mfd_to_mdata(mfd); - ctl = mdss_mdp_ctl_alloc(mdata); + ctl = mdss_mdp_ctl_alloc(mdata, MDSS_MDP_CTL0); if (!ctl) { pr_err("unable to allocate ctl\n"); return ERR_PTR(-ENOMEM); |
