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

Commit 4d9c2bb2 authored by Vaibhav Deshu Venkatesh's avatar Vaibhav Deshu Venkatesh
Browse files

msm: vidc: Calculate internal buffer sizes within driver



Right now we get internal buffer requirements from fw. The
call to get these requirements is a blocking call and takes
a lot of time. This change calculates all the internal
buffer requirement within driver and this removes the
necessity for get buffer requirements call.

CRs-Fixed: 2368458
Change-Id: Ib0e6feb800be74891eb3ecbc3cf854348f2f19f7
Signed-off-by: default avatarVaibhav Deshu Venkatesh <vdeshuve@codeaurora.org>
parent 630c85e8
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -19,7 +19,8 @@ msm-vidc-objs := msm_v4l2_vidc.o \
                vidc_hfi.o \
                msm_vidc_clocks.o \
                msm_vidc_ar50_dyn_gov.o \
                msm_vidc_dyn_gov.o
                msm_vidc_dyn_gov.o \
                msm_vidc_buffer_calculations.o

obj-$(CONFIG_MSM_VIDC_V4L2) := msm-vidc.o
+1 −0
Original line number Diff line number Diff line
@@ -906,6 +906,7 @@ int msm_vdec_inst_init(struct msm_vidc_inst *inst)
	inst->buff_req.buffer[11].buffer_type = HAL_BUFFER_INTERNAL_PERSIST_1;
	inst->buff_req.buffer[12].buffer_type = HAL_BUFFER_INTERNAL_CMD_QUEUE;
	inst->buff_req.buffer[13].buffer_type = HAL_BUFFER_INTERNAL_RECON;
	msm_vidc_init_buffer_size_calculators(inst);

	/* By default, initialize OUTPUT port to H264 decoder */
	fmt = msm_comm_get_pixel_fmt_fourcc(vdec_formats,
+1 −0
Original line number Diff line number Diff line
@@ -1194,6 +1194,7 @@ int msm_venc_inst_init(struct msm_vidc_inst *inst)
	inst->buff_req.buffer[11].buffer_type = HAL_BUFFER_INTERNAL_PERSIST_1;
	inst->buff_req.buffer[12].buffer_type = HAL_BUFFER_INTERNAL_CMD_QUEUE;
	inst->buff_req.buffer[13].buffer_type = HAL_BUFFER_INTERNAL_RECON;
	msm_vidc_init_buffer_size_calculators(inst);

	/* By default, initialize OUTPUT port to UBWC YUV format */
	fmt = msm_comm_get_pixel_fmt_fourcc(venc_formats,
Loading