Loading drivers/media/platform/msm/vidc/msm_vidc_common.c +7 −1 Original line number Diff line number Diff line Loading @@ -245,7 +245,8 @@ enum multi_stream msm_comm_get_stream_output_mode(struct msm_vidc_inst *inst) static int msm_comm_get_mbs_per_sec(struct msm_vidc_inst *inst) { int output_port_mbs, capture_port_mbs; int fps, rc; int rc; u32 fps; struct v4l2_control ctrl; output_port_mbs = NUM_MBS_PER_FRAME(inst->prop.width[OUTPUT_PORT], Loading @@ -257,6 +258,11 @@ static int msm_comm_get_mbs_per_sec(struct msm_vidc_inst *inst) rc = msm_comm_g_ctrl(inst, &ctrl); if (!rc && ctrl.value) { fps = (ctrl.value >> 16) ? ctrl.value >> 16 : 1; /* * Check if operating rate is less than fps. * If Yes, then use fps to scale the clocks */ fps = max(fps, inst->prop.fps); return max(output_port_mbs, capture_port_mbs) * fps; } else return max(output_port_mbs, capture_port_mbs) * inst->prop.fps; Loading Loading
drivers/media/platform/msm/vidc/msm_vidc_common.c +7 −1 Original line number Diff line number Diff line Loading @@ -245,7 +245,8 @@ enum multi_stream msm_comm_get_stream_output_mode(struct msm_vidc_inst *inst) static int msm_comm_get_mbs_per_sec(struct msm_vidc_inst *inst) { int output_port_mbs, capture_port_mbs; int fps, rc; int rc; u32 fps; struct v4l2_control ctrl; output_port_mbs = NUM_MBS_PER_FRAME(inst->prop.width[OUTPUT_PORT], Loading @@ -257,6 +258,11 @@ static int msm_comm_get_mbs_per_sec(struct msm_vidc_inst *inst) rc = msm_comm_g_ctrl(inst, &ctrl); if (!rc && ctrl.value) { fps = (ctrl.value >> 16) ? ctrl.value >> 16 : 1; /* * Check if operating rate is less than fps. * If Yes, then use fps to scale the clocks */ fps = max(fps, inst->prop.fps); return max(output_port_mbs, capture_port_mbs) * fps; } else return max(output_port_mbs, capture_port_mbs) * inst->prop.fps; Loading