|
@@ -524,6 +524,28 @@ int venus_helper_set_color_format(struct venus_inst *inst, u32 pixfmt)
|
|
|
}
|
|
|
EXPORT_SYMBOL_GPL(venus_helper_set_color_format);
|
|
|
|
|
|
+int venus_helper_set_dyn_bufmode(struct venus_inst *inst)
|
|
|
+{
|
|
|
+ const u32 ptype = HFI_PROPERTY_PARAM_BUFFER_ALLOC_MODE;
|
|
|
+ struct hfi_buffer_alloc_mode mode;
|
|
|
+ int ret;
|
|
|
+
|
|
|
+ if (!is_dynamic_bufmode(inst))
|
|
|
+ return 0;
|
|
|
+
|
|
|
+ mode.type = HFI_BUFFER_OUTPUT;
|
|
|
+ mode.mode = HFI_BUFFER_MODE_DYNAMIC;
|
|
|
+
|
|
|
+ ret = hfi_session_set_property(inst, ptype, &mode);
|
|
|
+ if (ret)
|
|
|
+ return ret;
|
|
|
+
|
|
|
+ mode.type = HFI_BUFFER_OUTPUT2;
|
|
|
+
|
|
|
+ return hfi_session_set_property(inst, ptype, &mode);
|
|
|
+}
|
|
|
+EXPORT_SYMBOL_GPL(venus_helper_set_dyn_bufmode);
|
|
|
+
|
|
|
static void delayed_process_buf_func(struct work_struct *work)
|
|
|
{
|
|
|
struct venus_buffer *buf, *n;
|