mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-10 14:19:09 -04:00
msm: vidc: Fix to add correct superframe buffer timestamps
Avoid adapting driver framerate to camera qbuf rate in superframe enabled case to avoid setting incorrect hfr buffer timestamps. Change-Id: I354e7517b9aeef7f1b01f33089b81bf7122e12e2 Signed-off-by: Akshata Sahukar <asahukar@codeaurora.org>
This commit is contained in:
parent
b14f4c13bc
commit
1fd9cfcf2e
1 changed files with 8 additions and 1 deletions
|
|
@ -2120,6 +2120,7 @@ int msm_venc_store_timestamp(struct msm_vidc_inst *inst, u64 timestamp_us)
|
|||
struct msm_vidc_timestamps *entry, *node, *prev = NULL;
|
||||
int count = 0;
|
||||
int rc = 0;
|
||||
struct v4l2_ctrl *superframe_ctrl = NULL;
|
||||
|
||||
if (!inst || !inst->core) {
|
||||
d_vpr_e("%s: invalid parameters\n", __func__);
|
||||
|
|
@ -2172,7 +2173,13 @@ int msm_venc_store_timestamp(struct msm_vidc_inst *inst, u64 timestamp_us)
|
|||
/* if framerate changed and stable for 2 frames, set to firmware */
|
||||
if (entry->framerate == prev->framerate &&
|
||||
entry->framerate != inst->clk_data.frame_rate) {
|
||||
inst->clk_data.frame_rate = entry->framerate;
|
||||
superframe_ctrl = get_ctrl(inst, V4L2_CID_MPEG_VIDC_SUPERFRAME);
|
||||
if (superframe_ctrl->val > 1)
|
||||
inst->clk_data.frame_rate = entry->framerate * superframe_ctrl->val;
|
||||
else
|
||||
inst->clk_data.frame_rate = entry->framerate;
|
||||
s_vpr_l(inst->sid, "%s: updated fps to %u\n",
|
||||
__func__, (inst->clk_data.frame_rate >> 16));
|
||||
msm_venc_set_frame_rate(inst);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue