diff mbox series

[02/10] venus: helpers: fix dynamic buffer mode for v4

Message ID 20190117162008.25217-3-stanimir.varbanov@linaro.org
State Accepted
Commit bc8c479a5b19bd44f7379e42e627170957985ee9
Headers show
Series [01/10] venus: hfi_cmds: add more not-implemented properties | expand

Commit Message

Stanimir Varbanov Jan. 17, 2019, 4:20 p.m. UTC
Venus v4 doesn't send ALLOC_MODE property and thus parser doesn't
recognize it as dynamic buffer (for OUTPUT/OUTPUT2 type of buffers)
make it obvious in the helper function.

Signed-off-by: Stanimir Varbanov <stanimir.varbanov@linaro.org>

---
 drivers/media/platform/qcom/venus/helpers.c | 7 +++++++
 1 file changed, 7 insertions(+)

-- 
2.17.1
diff mbox series

Patch

diff --git a/drivers/media/platform/qcom/venus/helpers.c b/drivers/media/platform/qcom/venus/helpers.c
index 5cad601d4c57..86105de81af2 100644
--- a/drivers/media/platform/qcom/venus/helpers.c
+++ b/drivers/media/platform/qcom/venus/helpers.c
@@ -467,6 +467,13 @@  static bool is_dynamic_bufmode(struct venus_inst *inst)
 	struct venus_core *core = inst->core;
 	struct venus_caps *caps;
 
+	/*
+	 * v4 doesn't send BUFFER_ALLOC_MODE_SUPPORTED property and supports
+	 * dynamic buffer mode by default for HFI_BUFFER_OUTPUT/OUTPUT2.
+	 */
+	if (IS_V4(core))
+		return true;
+
 	caps = venus_caps_by_codec(core, inst->hfi_codec, inst->session_type);
 	if (!caps)
 		return false;