summaryrefslogtreecommitdiff
path: root/drivers/media/platform/qcom/venus/helpers.c
diff options
context:
space:
mode:
authorBryan O'Donoghue <bryan.odonoghue@linaro.org>2021-04-02 13:06:38 +0300
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>2021-04-06 16:51:51 +0300
commit7ed9e0b3393c8720e8a48e98bc88e30112ccb1bc (patch)
treebd93640a87b8dc28353172562006020b4ef628f6 /drivers/media/platform/qcom/venus/helpers.c
parente396e75fc2545f4136c464e97fcbbc9809fef279 (diff)
downloadlinux-7ed9e0b3393c8720e8a48e98bc88e30112ccb1bc.tar.xz
media: venus: hfi, vdec: v6 Add IS_V6() to existing IS_V4() if locations
In various places in the venus codebase we have if (IS_V4()) which takes the code down paths for 4xx silicon. This logic is broadly applicable to 6xx silicon also. In this patch we add IS_V6() to various IS_V4() decision locations. Co-developed-by: Dikshita Agarwal <dikshita@qti.qualcomm.com> Signed-off-by: Dikshita Agarwal <dikshita@qti.qualcomm.com> 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.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/media/platform/qcom/venus/helpers.c b/drivers/media/platform/qcom/venus/helpers.c
index 76ece2ff8d39..2515a2225614 100644
--- a/drivers/media/platform/qcom/venus/helpers.c
+++ b/drivers/media/platform/qcom/venus/helpers.c
@@ -488,7 +488,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);
@@ -1084,11 +1084,10 @@ int venus_helper_set_work_mode(struct venus_inst *inst, u32 mode)
const u32 ptype = HFI_PROPERTY_PARAM_WORK_MODE;
struct hfi_video_work_mode wm;
- if (!IS_V4(inst->core))
+ if (!IS_V4(inst->core) && !IS_V6(inst->core))
return 0;
wm.video_work_mode = mode;
-
return hfi_session_set_property(inst, ptype, &wm);
}
EXPORT_SYMBOL_GPL(venus_helper_set_work_mode);