When VTS ComponentHidlTest, otf init function is called at s_fmt.
But it returns error because the repeater is not initialized and makes VTS fail.
So this fixes to return no error.
Change-Id: Ica1a423c8890c076f2fa4ba2b5a87ad97c312c69
Signed-off-by: Sunyoung Kang <sy0816.kang@samsung.com>
mfc_err_ctx("[OTF] only H.264 and HEVC is supported\n");
return -EINVAL;
}
- if (mfc_otf_init(ctx)) {
+ ret = mfc_otf_init(ctx);
+ if (ret) {
mfc_err_ctx("[OTF] otf_init failed\n");
mfc_otf_destroy(ctx);
+ /* This should be no error return when VTS test case */
+ if (ret == -EFAULT)
+ return 0;
return -EINVAL;
}
}
/* request buffers */
if (hwfc_request_buffer(shared_buf_info, 1)) {
mfc_err_dev("[OTF] request_buffer failed\n");
- return -EINVAL;
+ return -EFAULT;
}
#endif
mfc_debug(2, "[OTF] recieved buffer information\n");
int mfc_otf_init(struct mfc_ctx *ctx)
{
+ int ret;
+
mfc_debug_enter();
if (!ctx) {
return -EINVAL;
}
- if (__mfc_otf_init_hwfc_buf(ctx)) {
+ ret = __mfc_otf_init_hwfc_buf(ctx);
+ if (ret) {
mfc_err_dev("[OTF] HWFC init failed\n");
- return -EINVAL;
+ return ret;
}
mfc_debug(2, "[OTF] otf_init is completed\n");