Loading drivers/media/platform/msm/vidc/msm_vidc_clocks.c +8 −2 Original line number Diff line number Diff line Loading @@ -685,7 +685,7 @@ static unsigned long msm_vidc_calc_freq(struct msm_vidc_inst *inst, u32 filled_len) { unsigned long freq = 0; unsigned long vpp_cycles = 0, vsp_cycles = 0; unsigned long vpp_cycles = 0, vsp_cycles = 0, fw_cycles = 0; u32 vpp_cycles_per_mb; u32 mbs_per_second; struct msm_vidc_core *core = NULL; Loading @@ -704,7 +704,7 @@ static unsigned long msm_vidc_calc_freq(struct msm_vidc_inst *inst, fps = msm_vidc_get_fps(inst); /* * Calculate vpp, vsp cycles separately for encoder and decoder. * Calculate vpp, vsp, fw cycles separately for encoder and decoder. * Even though, most part is common now, in future it may change * between them. */ Loading @@ -729,6 +729,9 @@ static unsigned long msm_vidc_calc_freq(struct msm_vidc_inst *inst, } vsp_cycles += ((u64)inst->clk_data.bitrate * vsp_factor_num) / vsp_factor_den; fw_cycles = fps * inst->core->resources.fw_cycles; } else if (inst->session_type == MSM_VIDC_DECODER) { vpp_cycles = mbs_per_second * inst->clk_data.entry->vpp_cycles; /* 21 / 20 is overhead factor */ Loading @@ -740,12 +743,15 @@ static unsigned long msm_vidc_calc_freq(struct msm_vidc_inst *inst, /* 10 / 7 is overhead factor */ vsp_cycles += ((fps * filled_len * 8) * 10) / 7; fw_cycles = fps * inst->core->resources.fw_cycles; } else { dprintk(VIDC_ERR, "Unknown session type = %s\n", __func__); return msm_vidc_max_freq(inst->core); } freq = max(vpp_cycles, vsp_cycles); freq = max(freq, fw_cycles); dprintk(VIDC_DBG, "Update DCVS Load\n"); allowed_clks_tbl = core->resources.allowed_clks_tbl; Loading drivers/media/platform/msm/vidc/msm_vidc_platform.c +4 −0 Original line number Diff line number Diff line Loading @@ -243,6 +243,10 @@ static struct msm_vidc_common_data sm8150_common_data[] = { .key = "qcom,dcvs", .value = 1, }, { .key = "qcom,fw-cycles", .value = 760000, }, }; static struct msm_vidc_common_data sdm845_common_data[] = { Loading drivers/media/platform/msm/vidc/msm_vidc_res_parse.c +2 −0 Original line number Diff line number Diff line Loading @@ -791,6 +791,8 @@ int read_platform_resources_from_drv_data( "qcom,decode-batching"); res->dcvs = find_key_value(platform_data, "qcom,dcvs"); res->fw_cycles = find_key_value(platform_data, "qcom,fw-cycles"); res->csc_coeff_data = &platform_data->csc_data; Loading drivers/media/platform/msm/vidc/msm_vidc_resources.h +1 −0 Original line number Diff line number Diff line Loading @@ -199,6 +199,7 @@ struct msm_vidc_platform_resources { struct msm_vidc_csc_coeff *csc_coeff_data; struct msm_vidc_mem_cdsp mem_cdsp; uint32_t vpu_ver; uint32_t fw_cycles; }; static inline bool is_iommu_present(struct msm_vidc_platform_resources *res) Loading Loading
drivers/media/platform/msm/vidc/msm_vidc_clocks.c +8 −2 Original line number Diff line number Diff line Loading @@ -685,7 +685,7 @@ static unsigned long msm_vidc_calc_freq(struct msm_vidc_inst *inst, u32 filled_len) { unsigned long freq = 0; unsigned long vpp_cycles = 0, vsp_cycles = 0; unsigned long vpp_cycles = 0, vsp_cycles = 0, fw_cycles = 0; u32 vpp_cycles_per_mb; u32 mbs_per_second; struct msm_vidc_core *core = NULL; Loading @@ -704,7 +704,7 @@ static unsigned long msm_vidc_calc_freq(struct msm_vidc_inst *inst, fps = msm_vidc_get_fps(inst); /* * Calculate vpp, vsp cycles separately for encoder and decoder. * Calculate vpp, vsp, fw cycles separately for encoder and decoder. * Even though, most part is common now, in future it may change * between them. */ Loading @@ -729,6 +729,9 @@ static unsigned long msm_vidc_calc_freq(struct msm_vidc_inst *inst, } vsp_cycles += ((u64)inst->clk_data.bitrate * vsp_factor_num) / vsp_factor_den; fw_cycles = fps * inst->core->resources.fw_cycles; } else if (inst->session_type == MSM_VIDC_DECODER) { vpp_cycles = mbs_per_second * inst->clk_data.entry->vpp_cycles; /* 21 / 20 is overhead factor */ Loading @@ -740,12 +743,15 @@ static unsigned long msm_vidc_calc_freq(struct msm_vidc_inst *inst, /* 10 / 7 is overhead factor */ vsp_cycles += ((fps * filled_len * 8) * 10) / 7; fw_cycles = fps * inst->core->resources.fw_cycles; } else { dprintk(VIDC_ERR, "Unknown session type = %s\n", __func__); return msm_vidc_max_freq(inst->core); } freq = max(vpp_cycles, vsp_cycles); freq = max(freq, fw_cycles); dprintk(VIDC_DBG, "Update DCVS Load\n"); allowed_clks_tbl = core->resources.allowed_clks_tbl; Loading
drivers/media/platform/msm/vidc/msm_vidc_platform.c +4 −0 Original line number Diff line number Diff line Loading @@ -243,6 +243,10 @@ static struct msm_vidc_common_data sm8150_common_data[] = { .key = "qcom,dcvs", .value = 1, }, { .key = "qcom,fw-cycles", .value = 760000, }, }; static struct msm_vidc_common_data sdm845_common_data[] = { Loading
drivers/media/platform/msm/vidc/msm_vidc_res_parse.c +2 −0 Original line number Diff line number Diff line Loading @@ -791,6 +791,8 @@ int read_platform_resources_from_drv_data( "qcom,decode-batching"); res->dcvs = find_key_value(platform_data, "qcom,dcvs"); res->fw_cycles = find_key_value(platform_data, "qcom,fw-cycles"); res->csc_coeff_data = &platform_data->csc_data; Loading
drivers/media/platform/msm/vidc/msm_vidc_resources.h +1 −0 Original line number Diff line number Diff line Loading @@ -199,6 +199,7 @@ struct msm_vidc_platform_resources { struct msm_vidc_csc_coeff *csc_coeff_data; struct msm_vidc_mem_cdsp mem_cdsp; uint32_t vpu_ver; uint32_t fw_cycles; }; static inline bool is_iommu_present(struct msm_vidc_platform_resources *res) Loading