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

Commit 9341b9f0 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "msm: vidc: Read capabilities for B-frame" into msm-4.9

parents bf313bcc b11d81c9
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
@@ -1202,6 +1202,16 @@ int msm_venc_s_ctrl(struct msm_vidc_inst *inst, struct v4l2_ctrl *ctrl)
		else if (ctrl->id == V4L2_CID_MPEG_VIDC_VIDEO_NUM_B_FRAMES)
			num_b = ctrl->val;

		if ((num_b < inst->capability.bframe.min) ||
			(num_b > inst->capability.bframe.max)) {
			dprintk(VIDC_ERR,
				"Error setting num b frames %d min, max supported is %d, %d\n",
				num_b, inst->capability.bframe.min,
				inst->capability.bframe.max);
			rc = -ENOTSUPP;
			break;
		}

		property_id = HAL_CONFIG_VENC_INTRA_PERIOD;
		intra_period.pframes = num_p;
		intra_period.bframes = num_b;
+4 −0
Original line number Diff line number Diff line
@@ -168,6 +168,9 @@ int msm_vidc_query_ctrl(void *instance, struct v4l2_queryctrl *ctrl)
	case V4L2_CID_MPEG_VIDC_VIDEO_BLUR_HEIGHT:
		msm_vidc_ctrl_get_range(ctrl, &inst->capability.blur_height);
		break;
	case V4L2_CID_MPEG_VIDC_VIDEO_NUM_B_FRAMES:
		msm_vidc_ctrl_get_range(ctrl, &inst->capability.bframe);
		break;
	default:
		rc = -EINVAL;
	}
@@ -1932,6 +1935,7 @@ static int try_get_ctrl(struct msm_vidc_inst *inst, struct v4l2_ctrl *ctrl)
		ctrl->val = bufreq->buffer_count_min_host;
		break;
	case V4L2_CID_MIN_BUFFERS_FOR_OUTPUT:
		msm_comm_try_get_bufreqs(inst);
		bufreq = get_buff_req_buffer(inst, HAL_BUFFER_INPUT);
		if (!bufreq) {
			dprintk(VIDC_ERR,