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

Commit 306a8c47 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: Query the core on VIDIOC_G_FMT"

parents 3ed72169 9f3087f5
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -922,11 +922,20 @@ int msm_vdec_g_fmt(struct msm_vidc_inst *inst, struct v4l2_format *f)
	int rc = 0;
	int i;
	struct hal_buffer_requirements *buff_req_buffer;

	if (!inst || !f || !inst->core || !inst->core->device) {
		dprintk(VIDC_ERR,
			"Invalid input, inst = %p, format = %p\n", inst, f);
		return -EINVAL;
	}

	rc = msm_comm_try_get_bufreqs(inst);
	if (rc) {
		dprintk(VIDC_ERR, "Getting buffer requirements failed: %d\n",
				rc);
		return rc;
	}

	hdev = inst->core->device;
	if (f->type == V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE)
		fmt = inst->fmts[CAPTURE_PORT];
+8 −0
Original line number Diff line number Diff line
@@ -2757,6 +2757,14 @@ int msm_venc_g_fmt(struct msm_vidc_inst *inst, struct v4l2_format *f)
			"Invalid input, inst = %p, format = %p\n", inst, f);
		return -EINVAL;
	}

	rc = msm_comm_try_get_bufreqs(inst);
	if (rc) {
		dprintk(VIDC_WARN, "Getting buffer requirements failed: %d\n",
				rc);
		return rc;
	}

	if (f->type == V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE) {
		fmt = inst->fmts[CAPTURE_PORT];
		height = inst->prop.height[CAPTURE_PORT];