Loading drivers/media/platform/msm/vidc/msm_vdec.c +29 −3 Original line number Diff line number Diff line Loading @@ -2587,6 +2587,12 @@ static int try_set_ext_ctrl(struct msm_vidc_inst *inst, int rc = 0, i = 0, fourcc = 0; struct v4l2_ext_control *ext_control; struct v4l2_control control; u32 old_mode = 0; bool mode_changed = false; enum mode { PRIMARY = V4L2_CID_MPEG_VIDC_VIDEO_STREAM_OUTPUT_PRIMARY, SECONDARY = V4L2_CID_MPEG_VIDC_VIDEO_STREAM_OUTPUT_SECONDARY }; if (!inst || !inst->core || !ctrl) { dprintk(VIDC_ERR, Loading @@ -2595,19 +2601,21 @@ static int try_set_ext_ctrl(struct msm_vidc_inst *inst, } ext_control = ctrl->controls; control.id = V4L2_CID_MPEG_VIDC_VIDEO_STREAM_OUTPUT_MODE; control.id = V4L2_CID_MPEG_VIDC_VIDEO_STREAM_OUTPUT_MODE; old_mode = msm_comm_g_ctrl_for_id(inst, control.id); for (i = 0; i < ctrl->count; i++) { switch (ext_control[i].id) { case V4L2_CID_MPEG_VIDC_VIDEO_STREAM_OUTPUT_MODE: control.value = ext_control[i].value; rc = msm_comm_s_ctrl(inst, &control); if (rc) dprintk(VIDC_ERR, "%s Failed setting stream output mode : %d\n", __func__, rc); if (old_mode == SECONDARY && control.value == PRIMARY) mode_changed = true; break; case V4L2_CID_MPEG_VIDC_VIDEO_DPB_COLOR_FORMAT: switch (ext_control[i].value) { Loading @@ -2620,6 +2628,24 @@ static int try_set_ext_ctrl(struct msm_vidc_inst *inst, "%s Release output buffers failed\n", __func__); } /* Update buffer reqmt for split to comb mode */ if (mode_changed) { fourcc = inst->fmts[CAPTURE_PORT].fourcc; msm_comm_set_color_format(inst, HAL_BUFFER_OUTPUT, fourcc); if (rc) { dprintk(VIDC_ERR, "%s Failed setting output color format : %d\n", __func__, rc); break; } rc = msm_comm_try_get_bufreqs(inst); if (rc) dprintk(VIDC_ERR, "%s Failed to get buffer requirements : %d\n", __func__, rc); } break; case V4L2_MPEG_VIDC_VIDEO_DPB_COLOR_FMT_UBWC: case V4L2_MPEG_VIDC_VIDEO_DPB_COLOR_FMT_TP10_UBWC: Loading Loading
drivers/media/platform/msm/vidc/msm_vdec.c +29 −3 Original line number Diff line number Diff line Loading @@ -2587,6 +2587,12 @@ static int try_set_ext_ctrl(struct msm_vidc_inst *inst, int rc = 0, i = 0, fourcc = 0; struct v4l2_ext_control *ext_control; struct v4l2_control control; u32 old_mode = 0; bool mode_changed = false; enum mode { PRIMARY = V4L2_CID_MPEG_VIDC_VIDEO_STREAM_OUTPUT_PRIMARY, SECONDARY = V4L2_CID_MPEG_VIDC_VIDEO_STREAM_OUTPUT_SECONDARY }; if (!inst || !inst->core || !ctrl) { dprintk(VIDC_ERR, Loading @@ -2595,19 +2601,21 @@ static int try_set_ext_ctrl(struct msm_vidc_inst *inst, } ext_control = ctrl->controls; control.id = V4L2_CID_MPEG_VIDC_VIDEO_STREAM_OUTPUT_MODE; control.id = V4L2_CID_MPEG_VIDC_VIDEO_STREAM_OUTPUT_MODE; old_mode = msm_comm_g_ctrl_for_id(inst, control.id); for (i = 0; i < ctrl->count; i++) { switch (ext_control[i].id) { case V4L2_CID_MPEG_VIDC_VIDEO_STREAM_OUTPUT_MODE: control.value = ext_control[i].value; rc = msm_comm_s_ctrl(inst, &control); if (rc) dprintk(VIDC_ERR, "%s Failed setting stream output mode : %d\n", __func__, rc); if (old_mode == SECONDARY && control.value == PRIMARY) mode_changed = true; break; case V4L2_CID_MPEG_VIDC_VIDEO_DPB_COLOR_FORMAT: switch (ext_control[i].value) { Loading @@ -2620,6 +2628,24 @@ static int try_set_ext_ctrl(struct msm_vidc_inst *inst, "%s Release output buffers failed\n", __func__); } /* Update buffer reqmt for split to comb mode */ if (mode_changed) { fourcc = inst->fmts[CAPTURE_PORT].fourcc; msm_comm_set_color_format(inst, HAL_BUFFER_OUTPUT, fourcc); if (rc) { dprintk(VIDC_ERR, "%s Failed setting output color format : %d\n", __func__, rc); break; } rc = msm_comm_try_get_bufreqs(inst); if (rc) dprintk(VIDC_ERR, "%s Failed to get buffer requirements : %d\n", __func__, rc); } break; case V4L2_MPEG_VIDC_VIDEO_DPB_COLOR_FMT_UBWC: case V4L2_MPEG_VIDC_VIDEO_DPB_COLOR_FMT_TP10_UBWC: Loading