diff options
author | Stanimir Varbanov <stanimir.varbanov@linaro.org> | 2018-07-05 09:03:49 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab+samsung@kernel.org> | 2018-07-25 08:51:33 -0400 |
commit | d4a5b0a6657bab12408b792cc111bc3b7c17b39b (patch) | |
tree | c0d6e61485699d9893c09f51f9fa723ed31c6cff /drivers/media/platform/qcom/venus/helpers.c | |
parent | 2b0a8517fbfdbd8a2080404a5fe19ff0eb17e2e0 (diff) | |
download | linux-d4a5b0a6657bab12408b792cc111bc3b7c17b39b.tar.gz linux-d4a5b0a6657bab12408b792cc111bc3b7c17b39b.tar.bz2 linux-d4a5b0a6657bab12408b792cc111bc3b7c17b39b.zip |
media: venus: helpers: add helper function to set actual buffer size
Add and use a helper function to set actual buffer size for
particular buffer type. This is also preparation to use
the second decoder output.
Signed-off-by: Stanimir Varbanov <stanimir.varbanov@linaro.org>
Reviewed-by: Tomasz Figa <tfiga@chromium.org>
Reviewed-by: Alexandre Courbot <acourbot@chromium.org>
Tested-by: Alexandre Courbot <acourbot@chromium.org>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Diffstat (limited to 'drivers/media/platform/qcom/venus/helpers.c')
-rw-r--r-- | drivers/media/platform/qcom/venus/helpers.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/drivers/media/platform/qcom/venus/helpers.c b/drivers/media/platform/qcom/venus/helpers.c index 29cc84777125..6fd7458f390a 100644 --- a/drivers/media/platform/qcom/venus/helpers.c +++ b/drivers/media/platform/qcom/venus/helpers.c @@ -546,6 +546,18 @@ int venus_helper_set_dyn_bufmode(struct venus_inst *inst) } EXPORT_SYMBOL_GPL(venus_helper_set_dyn_bufmode); +int venus_helper_set_bufsize(struct venus_inst *inst, u32 bufsize, u32 buftype) +{ + const u32 ptype = HFI_PROPERTY_PARAM_BUFFER_SIZE_ACTUAL; + struct hfi_buffer_size_actual bufsz; + + bufsz.type = buftype; + bufsz.size = bufsize; + + return hfi_session_set_property(inst, ptype, &bufsz); +} +EXPORT_SYMBOL_GPL(venus_helper_set_bufsize); + static void delayed_process_buf_func(struct work_struct *work) { struct venus_buffer *buf, *n; |