Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 850be3ca authored by Maheshwar Ajja's avatar Maheshwar Ajja
Browse files

msm: vidc: Update controls and output buffers list check



Update V4l2 controls with appropriate default values and
add output buffers list check to avoid unnecessary logging.

CRs-Fixed: 2004899
Change-Id: I5cdc18a8b3b806091dd498e2756ac87bf10ae444
Signed-off-by: default avatarMaheshwar Ajja <majja@codeaurora.org>
parent aebe5ecd
Loading
Loading
Loading
Loading
+17 −0
Original line number Diff line number Diff line
@@ -1897,6 +1897,23 @@ int msm_venc_s_ctrl(struct msm_vidc_inst *inst, struct v4l2_ctrl *ctrl)
		vui_timing_info.time_scale = NSEC_PER_SEC;
		break;
	}
	case V4L2_CID_MPEG_VIDC_VIDEO_LTRMODE:
	case V4L2_CID_MPEG_VIDC_VIDEO_LTRCOUNT:
	case V4L2_CID_MPEG_VIDC_VENC_PARAM_SAR_WIDTH:
	case V4L2_CID_MPEG_VIDC_VENC_PARAM_SAR_HEIGHT:
	case V4L2_CID_MPEG_VIDC_VIDEO_BLUR_WIDTH:
	case V4L2_CID_MPEG_VIDC_VIDEO_BLUR_HEIGHT:
	case V4L2_CID_MPEG_VIDC_VIDEO_LAYER_ID:
	case V4L2_CID_MPEG_VIDC_VENC_PARAM_LAYER_BITRATE:
	case V4L2_CID_MPEG_VIDC_VIDEO_I_FRAME_QP_MIN:
	case V4L2_CID_MPEG_VIDC_VIDEO_P_FRAME_QP_MIN:
	case V4L2_CID_MPEG_VIDC_VIDEO_B_FRAME_QP_MIN:
	case V4L2_CID_MPEG_VIDC_VIDEO_I_FRAME_QP_MAX:
	case V4L2_CID_MPEG_VIDC_VIDEO_P_FRAME_QP_MAX:
	case V4L2_CID_MPEG_VIDC_VIDEO_B_FRAME_QP_MAX:
		dprintk(VIDC_DBG, "Set the control : %#x using ext ctrl\n",
			ctrl->id);
		break;
	default:
		dprintk(VIDC_ERR, "Unsupported index: %x\n", ctrl->id);
		rc = -ENOTSUPP;
+7 −1
Original line number Diff line number Diff line
@@ -1246,7 +1246,7 @@ static int msm_vidc_comm_update_ctrl(struct msm_vidc_inst *inst,
	if (ctrl) {
		v4l2_ctrl_modify_range(ctrl, capability->min,
				capability->max, ctrl->step,
				capability->min);
				ctrl->default_value);
		dprintk(VIDC_DBG,
			"%s: Updated Range = %lld --> %lld Def value = %lld\n",
			ctrl->name, ctrl->minimum, ctrl->maximum,
@@ -1783,6 +1783,12 @@ void msm_comm_validate_output_buffers(struct msm_vidc_inst *inst)
		return;
	}
	mutex_lock(&inst->outputbufs.lock);
	if (list_empty(&inst->outputbufs.list)) {
		dprintk(VIDC_DBG, "%s: no OUTPUT buffers allocated\n",
			__func__);
		mutex_unlock(&inst->outputbufs.lock);
		return;
	}
	list_for_each_entry(binfo, &inst->outputbufs.list, list) {
		if (binfo->buffer_ownership != DRIVER) {
			dprintk(VIDC_DBG,