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

Commit 404054e1 authored by Stanimir Varbanov's avatar Stanimir Varbanov Committed by Mauro Carvalho Chehab
Browse files

media: venus: helpers: add buffer type argument to a helper



This adds one more function argument to pass buffer type to
set_output_resolution() helper function. That is a preparation
to support secondary decoder output.

Signed-off-by: default avatarStanimir Varbanov <stanimir.varbanov@linaro.org>
Reviewed-by: default avatarTomasz Figa <tfiga@chromium.org>
Reviewed-by: default avatarAlexandre Courbot <acourbot@chromium.org>
Tested-by: default avatarAlexandre Courbot <acourbot@chromium.org>
Signed-off-by: default avatarHans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab+samsung@kernel.org>
parent bf26670a
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -458,12 +458,13 @@ int venus_helper_set_input_resolution(struct venus_inst *inst,
EXPORT_SYMBOL_GPL(venus_helper_set_input_resolution);

int venus_helper_set_output_resolution(struct venus_inst *inst,
				       unsigned int width, unsigned int height)
				       unsigned int width, unsigned int height,
				       u32 buftype)
{
	u32 ptype = HFI_PROPERTY_PARAM_FRAME_SIZE;
	struct hfi_framesize fs;

	fs.buffer_type = HFI_BUFFER_OUTPUT;
	fs.buffer_type = buftype;
	fs.width = width;
	fs.height = height;

+2 −1
Original line number Diff line number Diff line
@@ -36,7 +36,8 @@ int venus_helper_get_bufreq(struct venus_inst *inst, u32 type,
int venus_helper_set_input_resolution(struct venus_inst *inst,
				      unsigned int width, unsigned int height);
int venus_helper_set_output_resolution(struct venus_inst *inst,
				       unsigned int width, unsigned int height);
				       unsigned int width, unsigned int height,
				       u32 buftype);
int venus_helper_set_num_bufs(struct venus_inst *inst, unsigned int input_bufs,
			      unsigned int output_bufs);
int venus_helper_set_color_format(struct venus_inst *inst, u32 fmt);
+2 −1
Original line number Diff line number Diff line
@@ -793,7 +793,8 @@ static int venc_init_session(struct venus_inst *inst)
		goto deinit;

	ret = venus_helper_set_output_resolution(inst, inst->width,
						 inst->height);
						 inst->height,
						 HFI_BUFFER_OUTPUT);
	if (ret)
		goto deinit;