diff --git a/mpp/hal/rkdec/h265d/hal_h265d_rkv.c b/mpp/hal/rkdec/h265d/hal_h265d_rkv.c index c3477020..14fc1fab 100644 --- a/mpp/hal/rkdec/h265d/hal_h265d_rkv.c +++ b/mpp/hal/rkdec/h265d/hal_h265d_rkv.c @@ -991,18 +991,18 @@ MPP_RET hal_h265d_rkv_wait(void *hal, HalTaskInfo *task) H265d_REGS_t *hw_regs = NULL; RK_S32 i; - if (task->dec.flags.parse_err || - task->dec.flags.ref_err) { - h265h_dbg(H265H_DBG_TASK_ERR, "%s found task error\n", __FUNCTION__); - goto ERR_PROC; - } - if (reg_ctx->fast_mode) { hw_regs = ( H265d_REGS_t *)reg_ctx->g_buf[index].hw_regs; } else { hw_regs = ( H265d_REGS_t *)reg_ctx->hw_regs; } + if (task->dec.flags.parse_err || + task->dec.flags.ref_err) { + h265h_dbg(H265H_DBG_TASK_ERR, "%s found task error\n", __FUNCTION__); + goto ERR_PROC; + } + ret = mpp_dev_ioctl(reg_ctx->dev, MPP_DEV_CMD_POLL, NULL); if (ret) mpp_err_f("poll cmd failed %d\n", ret); diff --git a/mpp/hal/rkdec/h265d/hal_h265d_vdpu34x.c b/mpp/hal/rkdec/h265d/hal_h265d_vdpu34x.c index a973d9a6..3c130363 100644 --- a/mpp/hal/rkdec/h265d/hal_h265d_vdpu34x.c +++ b/mpp/hal/rkdec/h265d/hal_h265d_vdpu34x.c @@ -1278,12 +1278,6 @@ static MPP_RET hal_h265d_vdpu34x_wait(void *hal, HalTaskInfo *task) Vdpu34xH265dRegSet *hw_regs = NULL; RK_S32 i; - if (task->dec.flags.parse_err || - task->dec.flags.ref_err) { - h265h_dbg(H265H_DBG_TASK_ERR, "%s found task error\n", __FUNCTION__); - goto ERR_PROC; - } - if (reg_ctx->fast_mode) { hw_regs = ( Vdpu34xH265dRegSet *)reg_ctx->g_buf[index].hw_regs; } else { @@ -1292,6 +1286,12 @@ static MPP_RET hal_h265d_vdpu34x_wait(void *hal, HalTaskInfo *task) p = (RK_U8*)hw_regs; + if (task->dec.flags.parse_err || + task->dec.flags.ref_err) { + h265h_dbg(H265H_DBG_TASK_ERR, "%s found task error\n", __FUNCTION__); + goto ERR_PROC; + } + ret = mpp_dev_ioctl(reg_ctx->dev, MPP_DEV_CMD_POLL, NULL); if (ret) mpp_err_f("poll cmd failed %d\n", ret); diff --git a/mpp/hal/rkdec/h265d/hal_h265d_vdpu382.c b/mpp/hal/rkdec/h265d/hal_h265d_vdpu382.c index 18290218..0e7eb348 100644 --- a/mpp/hal/rkdec/h265d/hal_h265d_vdpu382.c +++ b/mpp/hal/rkdec/h265d/hal_h265d_vdpu382.c @@ -1082,12 +1082,6 @@ static MPP_RET hal_h265d_vdpu382_wait(void *hal, HalTaskInfo *task) Vdpu382H265dRegSet *hw_regs = NULL; RK_S32 i; - if (task->dec.flags.parse_err || - task->dec.flags.ref_err) { - h265h_dbg(H265H_DBG_TASK_ERR, "%s found task error\n", __FUNCTION__); - goto ERR_PROC; - } - if (reg_ctx->fast_mode) { hw_regs = ( Vdpu382H265dRegSet *)reg_ctx->g_buf[index].hw_regs; } else { @@ -1096,6 +1090,12 @@ static MPP_RET hal_h265d_vdpu382_wait(void *hal, HalTaskInfo *task) p = (RK_U8*)hw_regs; + if (task->dec.flags.parse_err || + task->dec.flags.ref_err) { + h265h_dbg(H265H_DBG_TASK_ERR, "%s found task error\n", __FUNCTION__); + goto ERR_PROC; + } + ret = mpp_dev_ioctl(reg_ctx->dev, MPP_DEV_CMD_POLL, NULL); if (ret) mpp_err_f("poll cmd failed %d\n", ret); diff --git a/mpp/hal/rkdec/h265d/hal_h265d_vdpu383.c b/mpp/hal/rkdec/h265d/hal_h265d_vdpu383.c index ee7d5836..59bbd964 100644 --- a/mpp/hal/rkdec/h265d/hal_h265d_vdpu383.c +++ b/mpp/hal/rkdec/h265d/hal_h265d_vdpu383.c @@ -1343,12 +1343,6 @@ static MPP_RET hal_h265d_vdpu383_wait(void *hal, HalTaskInfo *task) Vdpu383H265dRegSet *hw_regs = NULL; RK_S32 i; - if (task->dec.flags.parse_err || - task->dec.flags.ref_err) { - h265h_dbg(H265H_DBG_TASK_ERR, "%s found task error\n", __FUNCTION__); - goto ERR_PROC; - } - if (reg_ctx->fast_mode) { hw_regs = ( Vdpu383H265dRegSet *)reg_ctx->g_buf[index].hw_regs; } else { @@ -1357,6 +1351,12 @@ static MPP_RET hal_h265d_vdpu383_wait(void *hal, HalTaskInfo *task) p = (RK_U8*)hw_regs; + if (task->dec.flags.parse_err || + task->dec.flags.ref_err) { + h265h_dbg(H265H_DBG_TASK_ERR, "%s found task error\n", __FUNCTION__); + goto ERR_PROC; + } + ret = mpp_dev_ioctl(reg_ctx->dev, MPP_DEV_CMD_POLL, NULL); if (ret) mpp_err_f("poll cmd failed %d\n", ret);