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

Commit fe918226 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: Check session properties in set format"

parents c2282725 3cff01f4
Loading
Loading
Loading
Loading
+13 −0
Original line number Diff line number Diff line
@@ -581,6 +581,13 @@ int msm_vdec_s_fmt(struct msm_vidc_inst *inst, struct v4l2_format *f)

		inst->prop.width[CAPTURE_PORT] = f->fmt.pix_mp.width;
		inst->prop.height[CAPTURE_PORT] = f->fmt.pix_mp.height;
		rc = msm_vidc_check_session_supported(inst);
		if (rc) {
			dprintk(VIDC_ERR,
				"%s: session not supported\n", __func__);
			goto err_invalid_fmt;
		}

		msm_comm_set_color_format(inst,
				msm_comm_get_hal_output_buffer(inst),
				f->fmt.pix_mp.pixelformat);
@@ -648,6 +655,12 @@ int msm_vdec_s_fmt(struct msm_vidc_inst *inst, struct v4l2_format *f)
		}
		inst->prop.width[OUTPUT_PORT] = f->fmt.pix_mp.width;
		inst->prop.height[OUTPUT_PORT] = f->fmt.pix_mp.height;
		rc = msm_vidc_check_session_supported(inst);
		if (rc) {
			dprintk(VIDC_ERR,
				"%s: session not supported\n", __func__);
			goto err_invalid_fmt;
		}

		frame_sz.buffer_type = HAL_BUFFER_INPUT;
		frame_sz.width = inst->prop.width[OUTPUT_PORT];
+12 −0
Original line number Diff line number Diff line
@@ -2385,6 +2385,12 @@ int msm_venc_s_fmt(struct msm_vidc_inst *inst, struct v4l2_format *f)

		inst->prop.width[CAPTURE_PORT] = f->fmt.pix_mp.width;
		inst->prop.height[CAPTURE_PORT] = f->fmt.pix_mp.height;
		rc = msm_vidc_check_session_supported(inst);
		if (rc) {
			dprintk(VIDC_ERR,
				"%s: session not supported\n", __func__);
			goto exit;
		}

		frame_sz.buffer_type = HAL_BUFFER_OUTPUT;
		frame_sz.width = inst->prop.width[CAPTURE_PORT];
@@ -2443,6 +2449,12 @@ int msm_venc_s_fmt(struct msm_vidc_inst *inst, struct v4l2_format *f)

		inst->prop.width[OUTPUT_PORT] = f->fmt.pix_mp.width;
		inst->prop.height[OUTPUT_PORT] = f->fmt.pix_mp.height;
		rc = msm_vidc_check_session_supported(inst);
		if (rc) {
			dprintk(VIDC_ERR,
				"%s: session not supported\n", __func__);
			goto exit;
		}

		frame_sz.buffer_type = HAL_BUFFER_INPUT;
		frame_sz.width = inst->prop.width[OUTPUT_PORT];
+7 −0
Original line number Diff line number Diff line
@@ -883,6 +883,13 @@ static inline int start_streaming(struct msm_vidc_inst *inst)
		goto fail_start;
	}

	rc = msm_vidc_check_scaling_supported(inst);
	if (rc) {
		dprintk(VIDC_ERR,
			"This session scaling is not supported %pK\n", inst);
		goto fail_start;
	}

	/* Decide work mode for current session */
	rc = msm_vidc_decide_work_mode(inst);
	if (rc) {
+0 −4
Original line number Diff line number Diff line
@@ -5472,10 +5472,6 @@ int msm_vidc_check_session_supported(struct msm_vidc_inst *inst)
			capability->width.max, capability->height.max);
			rc = -ENOTSUPP;
		}

		if (!rc && msm_vidc_check_scaling_supported(inst)) {
			rc = -ENOTSUPP;
		}
	}
	if (rc) {
		dprintk(VIDC_ERR,