summaryrefslogtreecommitdiff
path: root/drivers/media/platform/qcom/venus/helpers.c
diff options
context:
space:
mode:
authorDikshita Agarwal <dikshita@codeaurora.org>2021-04-02 12:06:44 +0200
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>2021-04-06 15:58:14 +0200
commitc934d9d4ca28d8f37f210e26dc88f3d34698114e (patch)
treeb1359031847044dc64530c04a03efa5fb90e64fb /drivers/media/platform/qcom/venus/helpers.c
parentec7ad11740b3b5798c0bd11169170d9572c2e1a2 (diff)
media: venus: helpers: Add internal buffer list for v6
- Internal buffers required by v6 are different than v4, add new list of internal buffers for v6. - Differentiate encoder/decoder buffers for 6xx Signed-off-by: Dikshita Agarwal <dikshita@codeaurora.org> Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.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.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/drivers/media/platform/qcom/venus/helpers.c b/drivers/media/platform/qcom/venus/helpers.c
index 2515a2225614..8b08632b0296 100644
--- a/drivers/media/platform/qcom/venus/helpers.c
+++ b/drivers/media/platform/qcom/venus/helpers.c
@@ -279,13 +279,24 @@ static const unsigned int intbuf_types_4xx[] = {
HFI_BUFFER_INTERNAL_PERSIST_1,
};
+static const unsigned int intbuf_types_6xx[] = {
+ HFI_BUFFER_INTERNAL_SCRATCH(HFI_VERSION_6XX),
+ HFI_BUFFER_INTERNAL_SCRATCH_1(HFI_VERSION_6XX),
+ HFI_BUFFER_INTERNAL_SCRATCH_2(HFI_VERSION_6XX),
+ HFI_BUFFER_INTERNAL_PERSIST,
+ HFI_BUFFER_INTERNAL_PERSIST_1,
+};
+
int venus_helper_intbufs_alloc(struct venus_inst *inst)
{
const unsigned int *intbuf;
size_t arr_sz, i;
int ret;
- if (IS_V4(inst->core)) {
+ if (IS_V6(inst->core)) {
+ arr_sz = ARRAY_SIZE(intbuf_types_6xx);
+ intbuf = intbuf_types_6xx;
+ } else if (IS_V4(inst->core)) {
arr_sz = ARRAY_SIZE(intbuf_types_4xx);
intbuf = intbuf_types_4xx;
} else {