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

Commit 0637a0ed authored by qctecmdr Service's avatar qctecmdr Service Committed by Gerrit - the friendly Code Review server
Browse files

Merge "msm: vidc: Fix blur resolution configuration"

parents 1e4652c2 a6ab5778
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -1903,20 +1903,20 @@ int create_pkt_cmd_session_set_property(
	case HAL_CONFIG_VENC_BLUR_RESOLUTION:
	{
		struct hfi_frame_size *hfi;
		struct hal_frame_size *prop = (struct hal_frame_size *) pdata;
		u32 *prop = (u32 *) pdata;
		u32 buffer_type;

		pkt->rg_property_data[0] =
			HFI_PROPERTY_CONFIG_VENC_BLUR_FRAME_SIZE;
		hfi = (struct hfi_frame_size *) &pkt->rg_property_data[1];
		buffer_type = get_hfi_buffer(prop->buffer_type);
		buffer_type = get_hfi_buffer(HAL_BUFFER_INPUT);
		if (buffer_type)
			hfi->buffer_type = buffer_type;
		else
			return -EINVAL;

		hfi->height = prop->height;
		hfi->width = prop->width;
		hfi->height = *prop & 0xFFFF;
		hfi->width = (*prop & 0xFFFF0000) >> 16;
		pkt->size += sizeof(struct hfi_frame_size);
		break;
	}
+4 −11
Original line number Diff line number Diff line
@@ -3210,7 +3210,6 @@ int msm_venc_set_blur_resolution(struct msm_vidc_inst *inst)
	int rc = 0;
	struct hfi_device *hdev;
	struct v4l2_ctrl *ctrl;
	struct hal_frame_size blur_res;

	if (!inst || !inst->core) {
		dprintk(VIDC_ERR, "%s: invalid params\n", __func__);
@@ -3221,20 +3220,14 @@ int msm_venc_set_blur_resolution(struct msm_vidc_inst *inst)
	ctrl = msm_venc_get_ctrl(inst,
		V4L2_CID_MPEG_VIDC_VIDEO_BLUR_DIMENSIONS);
	if (!ctrl) {
		dprintk(VIDC_ERR, "%s: get blur width failed\n", __func__);
		dprintk(VIDC_ERR,
				"%s: Failed to get blur dimentions\n",
				__func__);
		return -EINVAL;
	}
	if (!ctrl->val)
		return 0;

	blur_res.width = (0xFFFF & ctrl->val);
	blur_res.height = (0xFFFF0000 & ctrl->val) >> 16;
	blur_res.buffer_type = HAL_BUFFER_INPUT;

	dprintk(VIDC_DBG, "%s: %d %d\n", __func__,
			blur_res.width, blur_res.height);
	rc = call_hfi_op(hdev, session_set_property, inst->session,
			HAL_CONFIG_VENC_BLUR_RESOLUTION, &blur_res);
			HAL_CONFIG_VENC_BLUR_RESOLUTION, &ctrl->val);
	if (rc)
		dprintk(VIDC_ERR, "%s: set property failed\n", __func__);