Loading msm/vidc/msm_vidc.c +3 −3 Original line number Diff line number Diff line Loading @@ -946,7 +946,7 @@ static inline int start_streaming(struct msm_vidc_inst *inst) if (rc) goto fail_start; msm_comm_scale_clocks_and_bus(inst); msm_comm_scale_clocks_and_bus(inst, 1); rc = msm_comm_try_state(inst, MSM_VIDC_START_DONE); if (rc) { Loading Loading @@ -1138,7 +1138,7 @@ static void msm_vidc_stop_streaming(struct vb2_queue *q) break; } msm_comm_scale_clocks_and_bus(inst); msm_comm_scale_clocks_and_bus(inst, 1); if (rc) dprintk(VIDC_ERR, Loading Loading @@ -1601,7 +1601,7 @@ void *msm_vidc_open(int core_id, int session_type) goto fail_init; } msm_comm_scale_clocks_and_bus(inst); msm_comm_scale_clocks_and_bus(inst, 1); inst->debugfs_root = msm_vidc_debugfs_init_inst(inst, core->debugfs_root); Loading msm/vidc/msm_vidc_clocks.c +11 −8 Original line number Diff line number Diff line Loading @@ -1034,7 +1034,7 @@ int msm_comm_scale_clocks(struct msm_vidc_inst *inst) return 0; } int msm_comm_scale_clocks_and_bus(struct msm_vidc_inst *inst) int msm_comm_scale_clocks_and_bus(struct msm_vidc_inst *inst, bool do_bw_calc) { struct msm_vidc_core *core; struct hfi_device *hdev; Loading @@ -1048,11 +1048,14 @@ int msm_comm_scale_clocks_and_bus(struct msm_vidc_inst *inst) if (msm_comm_scale_clocks(inst)) { dprintk(VIDC_ERR, "Failed to scale clocks. Performance might be impacted\n"); "Failed to scale clocks. May impact performance\n"); } if (do_bw_calc) { if (msm_comm_vote_bus(core)) { dprintk(VIDC_ERR, "Failed to scale DDR bus. Performance might be impacted\n"); "Failed to scale DDR bus. May impact perf\n"); } } return 0; } Loading Loading @@ -1185,7 +1188,7 @@ void msm_clock_data_reset(struct msm_vidc_inst *inst) msm_dcvs_print_dcvs_stats(dcvs); rc = msm_comm_scale_clocks_and_bus(inst); rc = msm_comm_scale_clocks_and_bus(inst, 1); if (rc) dprintk(VIDC_ERR, "%s Failed to scale Clocks and Bus\n", Loading Loading @@ -1390,7 +1393,7 @@ static int msm_vidc_decide_work_mode_ar50(struct msm_vidc_inst *inst) (void *)&latency, sizeof(latency)); } rc = msm_comm_scale_clocks_and_bus(inst); rc = msm_comm_scale_clocks_and_bus(inst, 1); return rc; } Loading Loading @@ -1723,7 +1726,7 @@ int msm_vidc_decide_core_and_power_mode_iris1(struct msm_vidc_inst *inst) } inst->clk_data.core_id = VIDC_CORE_ID_1; rc = msm_comm_scale_clocks_and_bus(inst); rc = msm_comm_scale_clocks_and_bus(inst, 1); msm_print_core_status(core, VIDC_CORE_ID_1); return rc; } Loading msm/vidc/msm_vidc_clocks.h +1 −1 Original line number Diff line number Diff line Loading @@ -19,7 +19,7 @@ bool res_is_greater_than_or_equal_to(u32 width, u32 height, u32 ref_width, u32 ref_height); int msm_vidc_get_mbs_per_frame(struct msm_vidc_inst *inst); int msm_vidc_get_fps(struct msm_vidc_inst *inst); int msm_comm_scale_clocks_and_bus(struct msm_vidc_inst *inst); int msm_comm_scale_clocks_and_bus(struct msm_vidc_inst *inst, bool do_bw_calc); int msm_comm_init_clocks_and_bus_data(struct msm_vidc_inst *inst); void msm_comm_free_freq_table(struct msm_vidc_inst *inst); int msm_vidc_decide_work_route_iris1(struct msm_vidc_inst *inst); Loading msm/vidc/msm_vidc_common.c +12 −8 Original line number Diff line number Diff line Loading @@ -3052,7 +3052,7 @@ static int msm_comm_init_core(struct msm_vidc_inst *inst) change_inst_state(inst, MSM_VIDC_CORE_INIT); mutex_unlock(&core->lock); rc = msm_comm_scale_clocks_and_bus(inst); rc = msm_comm_scale_clocks_and_bus(inst, 1); return rc; fail_core_init: Loading Loading @@ -3082,7 +3082,7 @@ static int msm_vidc_deinit_core(struct msm_vidc_inst *inst) } mutex_unlock(&core->lock); msm_comm_scale_clocks_and_bus(inst); msm_comm_scale_clocks_and_bus(inst, 1); mutex_lock(&core->lock); Loading Loading @@ -4454,9 +4454,9 @@ static int msm_comm_qbuf_in_rbr(struct msm_vidc_inst *inst, return -EINVAL; } rc = msm_comm_scale_clocks_and_bus(inst); rc = msm_comm_scale_clocks_and_bus(inst, 0); if (rc) dprintk(VIDC_ERR, "%s: scale clocks failed\n", __func__); dprintk(VIDC_ERR, "%s: scale clock failed\n", __func__); print_vidc_buffer(VIDC_HIGH|VIDC_PERF, "qbuf in rbr", inst, mbuf); rc = msm_comm_qbuf_to_hfi(inst, mbuf); Loading @@ -4470,6 +4470,7 @@ int msm_comm_qbuf(struct msm_vidc_inst *inst, struct msm_vidc_buffer *mbuf) { int rc = 0; struct v4l2_ctrl *ctrl; int do_bw_calc = 0; if (!inst || !mbuf) { dprintk(VIDC_ERR, "%s: Invalid arguments\n", __func__); Loading @@ -4491,9 +4492,10 @@ int msm_comm_qbuf(struct msm_vidc_inst *inst, struct msm_vidc_buffer *mbuf) if (rc) return rc; rc = msm_comm_scale_clocks_and_bus(inst); do_bw_calc = mbuf->vvb.vb2_buf.type == INPUT_MPLANE; rc = msm_comm_scale_clocks_and_bus(inst, do_bw_calc); if (rc) dprintk(VIDC_ERR, "%s: scale clocks failed\n", __func__); dprintk(VIDC_ERR, "%s: scale clock & bw failed\n", __func__); print_vidc_buffer(VIDC_HIGH|VIDC_PERF, "qbuf", inst, mbuf); ctrl = get_ctrl(inst, V4L2_CID_MPEG_VIDC_SUPERFRAME); Loading Loading @@ -4563,10 +4565,12 @@ int msm_comm_qbufs_batch(struct msm_vidc_inst *inst, { int rc = 0; struct msm_vidc_buffer *buf; int do_bw_calc = 0; rc = msm_comm_scale_clocks_and_bus(inst); do_bw_calc = mbuf->vvb.vb2_buf.type == INPUT_MPLANE; rc = msm_comm_scale_clocks_and_bus(inst, do_bw_calc); if (rc) dprintk(VIDC_ERR, "%s: scale clocks failed\n", __func__); dprintk(VIDC_ERR, "%s: scale clock & bw failed\n", __func__); mutex_lock(&inst->registeredbufs.lock); list_for_each_entry(buf, &inst->registeredbufs.list, list) { Loading Loading
msm/vidc/msm_vidc.c +3 −3 Original line number Diff line number Diff line Loading @@ -946,7 +946,7 @@ static inline int start_streaming(struct msm_vidc_inst *inst) if (rc) goto fail_start; msm_comm_scale_clocks_and_bus(inst); msm_comm_scale_clocks_and_bus(inst, 1); rc = msm_comm_try_state(inst, MSM_VIDC_START_DONE); if (rc) { Loading Loading @@ -1138,7 +1138,7 @@ static void msm_vidc_stop_streaming(struct vb2_queue *q) break; } msm_comm_scale_clocks_and_bus(inst); msm_comm_scale_clocks_and_bus(inst, 1); if (rc) dprintk(VIDC_ERR, Loading Loading @@ -1601,7 +1601,7 @@ void *msm_vidc_open(int core_id, int session_type) goto fail_init; } msm_comm_scale_clocks_and_bus(inst); msm_comm_scale_clocks_and_bus(inst, 1); inst->debugfs_root = msm_vidc_debugfs_init_inst(inst, core->debugfs_root); Loading
msm/vidc/msm_vidc_clocks.c +11 −8 Original line number Diff line number Diff line Loading @@ -1034,7 +1034,7 @@ int msm_comm_scale_clocks(struct msm_vidc_inst *inst) return 0; } int msm_comm_scale_clocks_and_bus(struct msm_vidc_inst *inst) int msm_comm_scale_clocks_and_bus(struct msm_vidc_inst *inst, bool do_bw_calc) { struct msm_vidc_core *core; struct hfi_device *hdev; Loading @@ -1048,11 +1048,14 @@ int msm_comm_scale_clocks_and_bus(struct msm_vidc_inst *inst) if (msm_comm_scale_clocks(inst)) { dprintk(VIDC_ERR, "Failed to scale clocks. Performance might be impacted\n"); "Failed to scale clocks. May impact performance\n"); } if (do_bw_calc) { if (msm_comm_vote_bus(core)) { dprintk(VIDC_ERR, "Failed to scale DDR bus. Performance might be impacted\n"); "Failed to scale DDR bus. May impact perf\n"); } } return 0; } Loading Loading @@ -1185,7 +1188,7 @@ void msm_clock_data_reset(struct msm_vidc_inst *inst) msm_dcvs_print_dcvs_stats(dcvs); rc = msm_comm_scale_clocks_and_bus(inst); rc = msm_comm_scale_clocks_and_bus(inst, 1); if (rc) dprintk(VIDC_ERR, "%s Failed to scale Clocks and Bus\n", Loading Loading @@ -1390,7 +1393,7 @@ static int msm_vidc_decide_work_mode_ar50(struct msm_vidc_inst *inst) (void *)&latency, sizeof(latency)); } rc = msm_comm_scale_clocks_and_bus(inst); rc = msm_comm_scale_clocks_and_bus(inst, 1); return rc; } Loading Loading @@ -1723,7 +1726,7 @@ int msm_vidc_decide_core_and_power_mode_iris1(struct msm_vidc_inst *inst) } inst->clk_data.core_id = VIDC_CORE_ID_1; rc = msm_comm_scale_clocks_and_bus(inst); rc = msm_comm_scale_clocks_and_bus(inst, 1); msm_print_core_status(core, VIDC_CORE_ID_1); return rc; } Loading
msm/vidc/msm_vidc_clocks.h +1 −1 Original line number Diff line number Diff line Loading @@ -19,7 +19,7 @@ bool res_is_greater_than_or_equal_to(u32 width, u32 height, u32 ref_width, u32 ref_height); int msm_vidc_get_mbs_per_frame(struct msm_vidc_inst *inst); int msm_vidc_get_fps(struct msm_vidc_inst *inst); int msm_comm_scale_clocks_and_bus(struct msm_vidc_inst *inst); int msm_comm_scale_clocks_and_bus(struct msm_vidc_inst *inst, bool do_bw_calc); int msm_comm_init_clocks_and_bus_data(struct msm_vidc_inst *inst); void msm_comm_free_freq_table(struct msm_vidc_inst *inst); int msm_vidc_decide_work_route_iris1(struct msm_vidc_inst *inst); Loading
msm/vidc/msm_vidc_common.c +12 −8 Original line number Diff line number Diff line Loading @@ -3052,7 +3052,7 @@ static int msm_comm_init_core(struct msm_vidc_inst *inst) change_inst_state(inst, MSM_VIDC_CORE_INIT); mutex_unlock(&core->lock); rc = msm_comm_scale_clocks_and_bus(inst); rc = msm_comm_scale_clocks_and_bus(inst, 1); return rc; fail_core_init: Loading Loading @@ -3082,7 +3082,7 @@ static int msm_vidc_deinit_core(struct msm_vidc_inst *inst) } mutex_unlock(&core->lock); msm_comm_scale_clocks_and_bus(inst); msm_comm_scale_clocks_and_bus(inst, 1); mutex_lock(&core->lock); Loading Loading @@ -4454,9 +4454,9 @@ static int msm_comm_qbuf_in_rbr(struct msm_vidc_inst *inst, return -EINVAL; } rc = msm_comm_scale_clocks_and_bus(inst); rc = msm_comm_scale_clocks_and_bus(inst, 0); if (rc) dprintk(VIDC_ERR, "%s: scale clocks failed\n", __func__); dprintk(VIDC_ERR, "%s: scale clock failed\n", __func__); print_vidc_buffer(VIDC_HIGH|VIDC_PERF, "qbuf in rbr", inst, mbuf); rc = msm_comm_qbuf_to_hfi(inst, mbuf); Loading @@ -4470,6 +4470,7 @@ int msm_comm_qbuf(struct msm_vidc_inst *inst, struct msm_vidc_buffer *mbuf) { int rc = 0; struct v4l2_ctrl *ctrl; int do_bw_calc = 0; if (!inst || !mbuf) { dprintk(VIDC_ERR, "%s: Invalid arguments\n", __func__); Loading @@ -4491,9 +4492,10 @@ int msm_comm_qbuf(struct msm_vidc_inst *inst, struct msm_vidc_buffer *mbuf) if (rc) return rc; rc = msm_comm_scale_clocks_and_bus(inst); do_bw_calc = mbuf->vvb.vb2_buf.type == INPUT_MPLANE; rc = msm_comm_scale_clocks_and_bus(inst, do_bw_calc); if (rc) dprintk(VIDC_ERR, "%s: scale clocks failed\n", __func__); dprintk(VIDC_ERR, "%s: scale clock & bw failed\n", __func__); print_vidc_buffer(VIDC_HIGH|VIDC_PERF, "qbuf", inst, mbuf); ctrl = get_ctrl(inst, V4L2_CID_MPEG_VIDC_SUPERFRAME); Loading Loading @@ -4563,10 +4565,12 @@ int msm_comm_qbufs_batch(struct msm_vidc_inst *inst, { int rc = 0; struct msm_vidc_buffer *buf; int do_bw_calc = 0; rc = msm_comm_scale_clocks_and_bus(inst); do_bw_calc = mbuf->vvb.vb2_buf.type == INPUT_MPLANE; rc = msm_comm_scale_clocks_and_bus(inst, do_bw_calc); if (rc) dprintk(VIDC_ERR, "%s: scale clocks failed\n", __func__); dprintk(VIDC_ERR, "%s: scale clock & bw failed\n", __func__); mutex_lock(&inst->registeredbufs.lock); list_for_each_entry(buf, &inst->registeredbufs.list, list) { Loading