|
@@ -486,6 +486,34 @@ int venus_helper_set_output_resolution(struct venus_inst *inst,
|
|
|
}
|
|
|
EXPORT_SYMBOL_GPL(venus_helper_set_output_resolution);
|
|
|
|
|
|
+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))
|
|
|
+ return 0;
|
|
|
+
|
|
|
+ wm.video_work_mode = mode;
|
|
|
+
|
|
|
+ return hfi_session_set_property(inst, ptype, &wm);
|
|
|
+}
|
|
|
+EXPORT_SYMBOL_GPL(venus_helper_set_work_mode);
|
|
|
+
|
|
|
+int venus_helper_set_core_usage(struct venus_inst *inst, u32 usage)
|
|
|
+{
|
|
|
+ const u32 ptype = HFI_PROPERTY_CONFIG_VIDEOCORES_USAGE;
|
|
|
+ struct hfi_videocores_usage_type cu;
|
|
|
+
|
|
|
+ if (!IS_V4(inst->core))
|
|
|
+ return 0;
|
|
|
+
|
|
|
+ cu.video_core_enable_mask = usage;
|
|
|
+
|
|
|
+ return hfi_session_set_property(inst, ptype, &cu);
|
|
|
+}
|
|
|
+EXPORT_SYMBOL_GPL(venus_helper_set_core_usage);
|
|
|
+
|
|
|
int venus_helper_set_num_bufs(struct venus_inst *inst, unsigned int input_bufs,
|
|
|
unsigned int output_bufs)
|
|
|
{
|