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

Commit 02f8f85a authored by Chinmay Sawarkar's avatar Chinmay Sawarkar
Browse files

msm: vidc: Fix buffer requirement negotiations



Call buffer requirements before setting the min buffer size to
FW. Otherwise, in the case of event Sufficient, FW will
use outdated buffer size and error out. While at it, additional
buffer requirement call is added to get Output2 buffer requirement
in 10-bit case.

CRs-Fixed: 2066658
Change-Id: Iaa61aa550faa926f337c4a3f9e353c6396fe80c7
Signed-off-by: default avatarChinmay Sawarkar <chinmays@codeaurora.org>
parent 84cf4451
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -1115,6 +1115,13 @@ int msm_vdec_s_ext_ctrl(struct msm_vidc_inst *inst,
							__func__, rc);
						break;
					}
					rc = msm_comm_try_get_bufreqs(inst);
					if (rc) {
						dprintk(VIDC_ERR,
							"%s Failed to get buffer requirements : %d\n",
							__func__, rc);
						break;
					}
				}
				inst->clk_data.dpb_fourcc = fourcc;
				break;
+2 −2
Original line number Diff line number Diff line
@@ -837,13 +837,13 @@ static inline int start_streaming(struct msm_vidc_inst *inst)
		b.buffer_type = HAL_BUFFER_OUTPUT;
	}

	rc = msm_comm_try_get_bufreqs(inst);

	b.buffer_size = inst->bufq[CAPTURE_PORT].plane_sizes[0];
	rc = call_hfi_op(hdev, session_set_property,
			inst->session, HAL_PARAM_BUFFER_SIZE_MINIMUM,
			&b);

	rc = msm_comm_try_get_bufreqs(inst);

	/* Verify if buffer counts are correct */
	rc = msm_vidc_verify_buffer_counts(inst);
	if (rc) {
+1 −1
Original line number Diff line number Diff line
@@ -20,7 +20,7 @@
#include <linux/msm_ion.h>
#include <uapi/media/msm_vidc.h>

#define HAL_BUFFER_MAX 0xb
#define HAL_BUFFER_MAX 0xd

enum smem_type {
	SMEM_ION,