aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBryan O'Donoghue <bryan.odonoghue@linaro.org>2020-12-07 21:31:30 +0000
committerBryan O'Donoghue <bryan.odonoghue@linaro.org>2020-12-08 03:53:04 +0000
commit4b6b1199c5dc68e891f795b1e4c243abca6f3d83 (patch)
treed851cdfe4fff593ea0f325473d62059202c29441
parent72f522ba9b2eedb452e5810fb3d8c31b17bfe12a (diff)
Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
-rw-r--r--drivers/media/platform/qcom/venus/helpers.c10
-rw-r--r--drivers/media/platform/qcom/venus/hfi_venus.c2
-rw-r--r--drivers/media/platform/qcom/venus/pm_helpers.c1
3 files changed, 10 insertions, 3 deletions
diff --git a/drivers/media/platform/qcom/venus/helpers.c b/drivers/media/platform/qcom/venus/helpers.c
index c5db43f78e32..dcd23c8d6650 100644
--- a/drivers/media/platform/qcom/venus/helpers.c
+++ b/drivers/media/platform/qcom/venus/helpers.c
@@ -283,7 +283,7 @@ int venus_helper_intbufs_alloc(struct venus_inst *inst)
size_t arr_sz, i;
int ret;
- if (IS_V4(inst->core)) {
+ if (IS_V4(inst->core) || IS_V6(inst->core)) {
arr_sz = ARRAY_SIZE(intbuf_types_4xx);
intbuf = intbuf_types_4xx;
} else {
@@ -486,7 +486,7 @@ static bool is_dynamic_bufmode(struct venus_inst *inst)
* 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))
+ if (IS_V4(core) || IS_V6(core))
return true;
caps = venus_caps_by_codec(core, inst->hfi_codec, inst->session_type);
@@ -1041,6 +1041,9 @@ int venus_helper_set_work_mode(struct venus_inst *inst, u32 mode)
if (!IS_V4(inst->core))
return 0;
+ if (!IS_V6(inst->core))
+ return 0;
+
wm.video_work_mode = mode;
return hfi_session_set_property(inst, ptype, &wm);
@@ -1057,6 +1060,9 @@ int venus_helper_init_codec_freq_data(struct venus_inst *inst)
if (!IS_V4(inst->core))
return 0;
+ if (!IS_V6(inst->core))
+ return 0;
+
data = inst->core->res->codec_freq_data;
data_size = inst->core->res->codec_freq_data_size;
pixfmt = inst->session_type == VIDC_SESSION_TYPE_DEC ?
diff --git a/drivers/media/platform/qcom/venus/hfi_venus.c b/drivers/media/platform/qcom/venus/hfi_venus.c
index ff8e86601889..7c66115c26d3 100644
--- a/drivers/media/platform/qcom/venus/hfi_venus.c
+++ b/drivers/media/platform/qcom/venus/hfi_venus.c
@@ -1658,7 +1658,7 @@ power_off:
static int venus_suspend(struct venus_core *core)
{
- if (IS_V3(core) || IS_V4(core))
+ if (IS_V3(core) || IS_V4(core) || IS_V6(core))
return venus_suspend_3xx(core);
return venus_suspend_1xx(core);
diff --git a/drivers/media/platform/qcom/venus/pm_helpers.c b/drivers/media/platform/qcom/venus/pm_helpers.c
index bd272b920c8f..a06b16a2bd0c 100644
--- a/drivers/media/platform/qcom/venus/pm_helpers.c
+++ b/drivers/media/platform/qcom/venus/pm_helpers.c
@@ -1031,6 +1031,7 @@ const struct venus_pm_ops *venus_pm_get(enum hfi_version version)
case HFI_VERSION_3XX:
return &pm_ops_v3;
case HFI_VERSION_4XX:
+ case HFI_VERSION_6XX:
return &pm_ops_v4;
}