video: driver: add clock residency calculation support

Add logic to derive clock residency values for each
frequency levels.

Change-Id: Iadad29d2733cb083fce627999a31dd96475b73c1
Signed-off-by: Govindaraj Rajagopal <quic_grajagop@quicinc.com>
This commit is contained in:
Govindaraj Rajagopal
2022-12-23 20:54:53 +05:30
parent 4f297753f7
commit e15f3afabd
5 changed files with 281 additions and 12 deletions

View File

@@ -4726,6 +4726,34 @@ unlock:
return rc;
}
int msm_vidc_print_residency_stats(struct msm_vidc_core *core)
{
int rc = 0;
core_lock(core, __func__);
rc = call_res_op(core, clk_print_residency_stats, core);
if (rc)
goto unlock;
unlock:
core_unlock(core, __func__);
return rc;
}
int msm_vidc_reset_residency_stats(struct msm_vidc_core *core)
{
int rc = 0;
core_lock(core, __func__);
rc = call_res_op(core, clk_reset_residency_stats, core);
if (rc)
goto unlock;
unlock:
core_unlock(core, __func__);
return rc;
}
int msm_vidc_inst_timeout(struct msm_vidc_inst *inst)
{
int rc = 0;