lkml.org 
[lkml]   [2018]   [May]   [31]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [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@linaro.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@linaro.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

\
 
 \ /
  Last update: 2018-05-31 10:57    [W:0.417 / U:1.320 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site