[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAAFQd5B+DH3+2-7VcqJ5J4VxmftUCgS18qmfRJVzNAA+6u1NxQ@mail.gmail.com>
Date: Thu, 31 May 2018 17:56:18 +0900
From: Tomasz Figa <tfiga@...omium.org>
To: Stanimir Varbanov <stanimir.varbanov@...aro.org>
Cc: Mauro Carvalho Chehab <mchehab@...nel.org>,
Hans Verkuil <hverkuil@...all.nl>,
Linux Media Mailing List <linux-media@...r.kernel.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
linux-arm-msm <linux-arm-msm@...r.kernel.org>,
vgarodia@...eaurora.org
Subject: Re: [PATCH v2 16/29] venus: add a helper function to set dynamic
buffer mode
On Tue, May 15, 2018 at 5:05 PM Stanimir Varbanov
<stanimir.varbanov@...aro.org> wrote:
>
> Adds a new helper function to set dynamic buffer mode if it is
> supported by current HFI version.
>
> Signed-off-by: Stanimir Varbanov <stanimir.varbanov@...aro.org>
> ---
> drivers/media/platform/qcom/venus/helpers.c | 22 ++++++++++++++++++++++
> drivers/media/platform/qcom/venus/helpers.h | 1 +
> drivers/media/platform/qcom/venus/vdec.c | 15 +++------------
> 3 files changed, 26 insertions(+), 12 deletions(-)
>
> diff --git a/drivers/media/platform/qcom/venus/helpers.c b/drivers/media/platform/qcom/venus/helpers.c
> index 1eda19adbf28..824ad4d2d064 100644
> --- a/drivers/media/platform/qcom/venus/helpers.c
> +++ b/drivers/media/platform/qcom/venus/helpers.c
> @@ -522,6 +522,28 @@ int venus_helper_set_color_format(struct venus_inst *inst, u32 pixfmt)
> }
> EXPORT_SYMBOL_GPL(venus_helper_set_color_format);
>
> +int venus_helper_set_dyn_bufmode(struct venus_inst *inst)
> +{
> + u32 ptype = HFI_PROPERTY_PARAM_BUFFER_ALLOC_MODE;
> + struct hfi_buffer_alloc_mode mode;
> + int ret;
> +
> + if (!is_dynamic_bufmode(inst))
> + return 0;
> +
> + mode.type = HFI_BUFFER_OUTPUT;
> + mode.mode = HFI_BUFFER_MODE_DYNAMIC;
> +
> + ret = hfi_session_set_property(inst, ptype, &mode);
> + if (ret)
> + return ret;
> +
> + mode.type = HFI_BUFFER_OUTPUT2;
> +
> + return hfi_session_set_property(inst, ptype, &mode);
The function now sets HFI_BUFFER_OUTPUT2 in addition to
HFI_BUFFER_OUTPUT only, as set by orignal code. Is it intentional? I
guess we could have this mentioned in commit message.
Best regards,
Tomasz
Powered by blists - more mailing lists