diff options
| author | Linux Build Service Account <lnxbuild@localhost> | 2016-11-24 06:13:38 -0800 |
|---|---|---|
| committer | Gerrit - the friendly Code Review server <code-review@localhost> | 2016-11-24 06:13:36 -0800 |
| commit | c17ad2a8a7a50f603d003dfb627e1fd6afc72a31 (patch) | |
| tree | 24f8c16105ed89a90efef1594debf4a16102af56 | |
| parent | 4edc6e28992dd1a523721b0b8b391044db71ce98 (diff) | |
| parent | 6ce2d706397d78a7b4e013c3192c4dc33a9364c8 (diff) | |
Merge "msm: vidc: Update mbs per second calculation"
| -rw-r--r-- | drivers/media/platform/msm/vidc/msm_vidc_common.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/media/platform/msm/vidc/msm_vidc_common.c b/drivers/media/platform/msm/vidc/msm_vidc_common.c index 27ee00e0b485..73c52841fd34 100644 --- a/drivers/media/platform/msm/vidc/msm_vidc_common.c +++ b/drivers/media/platform/msm/vidc/msm_vidc_common.c @@ -298,6 +298,11 @@ static int msm_comm_get_mbs_per_sec(struct msm_vidc_inst *inst) rc = msm_comm_g_ctrl(inst, &ctrl); if (!rc && ctrl.value) { fps = (ctrl.value >> 16) ? ctrl.value >> 16 : 1; + /* + * Check if operating rate is less than fps. + * If Yes, then use fps to scale clocks + */ + fps = fps > inst->prop.fps ? fps : inst->prop.fps; return max(output_port_mbs, capture_port_mbs) * fps; } else return max(output_port_mbs, capture_port_mbs) * inst->prop.fps; |
