From e937ff6a5152e76aaca23b9a75f86e6eea607319 Mon Sep 17 00:00:00 2001 From: Darshana Patil Date: Mon, 21 Oct 2019 13:44:32 -0700 Subject: [PATCH] msm: venc: Bump freq to next level for 1080p@480 Increase vpp cycles by 2% for 1080P@HSR480 encode usecase so that the video core runs at higher frequency(366Mhz) helping to achieve the desired performance. Change-Id: Id81abd36ab79067d52da9371d1dd5bdcfe622389 Signed-off-by: Darshana Patil --- msm/vidc/msm_vidc_clocks.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/msm/vidc/msm_vidc_clocks.c b/msm/vidc/msm_vidc_clocks.c index 891081cd1764..d975672d9159 100644 --- a/msm/vidc/msm_vidc_clocks.c +++ b/msm/vidc/msm_vidc_clocks.c @@ -655,6 +655,13 @@ static unsigned long msm_vidc_calc_freq_iris2(struct msm_vidc_inst *inst, /* 1.01 is multi-pipe overhead */ if (inst->clk_data.work_route > 1) vpp_cycles += vpp_cycles / 100; + /* + * 1080p@480fps usecase needs exactly 338MHz + * without any margin left. Hence, adding 2 percent + * extra to bump it to next level (366MHz). + */ + if (fps == 480) + vpp_cycles += vpp_cycles * 2 / 100; /* VSP */ /* bitrate is based on fps, scale it using operating rate */