diff options
author | Dikshita Agarwal <dikshita@codeaurora.org> | 2021-08-10 11:47:55 +0200 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab+huawei@kernel.org> | 2021-10-08 11:26:14 +0200 |
commit | 16545aa3dee5a01f3f42aa566a051096c87f4b6f (patch) | |
tree | a6e233d3d925ddef4a812463d897e1ac2e132778 /drivers/media/platform/qcom/venus/helpers.c | |
parent | fa622c3df44190ec52f7c77f9c24f7b4685203d5 (diff) | |
download | linux-next-16545aa3dee5a01f3f42aa566a051096c87f4b6f.tar.gz |
media: venus: Set buffer to FW based on FW min count requirement.
- Get the min buffer count required by FW from source event change
and use the same value to decide actual buffer count and for
buffer size calculation.
- Setup DPB and OPB buffers after session continue incase of
reconfig.
Signed-off-by: Dikshita Agarwal <dikshita@codeaurora.org>
Signed-off-by: Stanimir Varbanov <stanimir.varbanov@linaro.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Diffstat (limited to 'drivers/media/platform/qcom/venus/helpers.c')
-rw-r--r-- | drivers/media/platform/qcom/venus/helpers.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/drivers/media/platform/qcom/venus/helpers.c b/drivers/media/platform/qcom/venus/helpers.c index 196a24892176..7f2f5b91caaa 100644 --- a/drivers/media/platform/qcom/venus/helpers.c +++ b/drivers/media/platform/qcom/venus/helpers.c @@ -623,9 +623,15 @@ int venus_helper_get_bufreq(struct venus_inst *inst, u32 type, if (req) memset(req, 0, sizeof(*req)); + if (type == HFI_BUFFER_OUTPUT || type == HFI_BUFFER_OUTPUT2) + req->count_min = inst->fw_min_cnt; + ret = platform_get_bufreq(inst, type, req); - if (!ret) + if (!ret) { + if (type == HFI_BUFFER_OUTPUT || type == HFI_BUFFER_OUTPUT2) + inst->fw_min_cnt = req->count_min; return 0; + } ret = hfi_session_get_property(inst, ptype, &hprop); if (ret) |