{
struct mfc_ctx *ctx = fh_to_mfc_ctx(file->private_data);
struct mfc_dec *dec = ctx->dec_priv;
+ struct mfc_dev *dev = ctx->dev;
struct v4l2_pix_format_mplane *pix_fmt_mp = &f->fmt.pix_mp;
struct mfc_raw_info *raw;
int i;
mfc_debug_enter();
mfc_debug(2, "dec dst g_fmt, state: %d\n", ctx->state);
+ MFC_TRACE_CTX("** DEC g_fmt(state:%d wait_state:%d)\n",
+ ctx->state, ctx->wait_state);
if (ctx->state == MFCINST_GOT_INST ||
+ ctx->state == MFCINST_RES_CHANGE_INIT ||
ctx->state == MFCINST_RES_CHANGE_FLUSH ||
ctx->state == MFCINST_RES_CHANGE_END) {
/* If there is no source buffer to parsing, we can't SEQ_START */
if ((ctx->wait_state & WAIT_G_FMT) != 0) {
ctx->wait_state &= ~(WAIT_G_FMT);
mfc_debug(2, "clear WAIT_G_FMT %d\n", ctx->wait_state);
+ MFC_TRACE_CTX("** DEC clear WAIT_G_FMT(wait_state %d)\n", ctx->wait_state);
}
mfc_debug_leave();
static void __mfc_dec_dst_stop_streaming(struct mfc_ctx *ctx)
{
struct mfc_dec *dec = ctx->dec_priv;
+ struct mfc_dev *dev = ctx->dev;
int index = 0;
mfc_cleanup_assigned_fd(ctx);
if (ctx->wait_state & WAIT_STOP) {
ctx->wait_state &= ~(WAIT_STOP);
mfc_debug(2, "clear WAIT_STOP %d\n", ctx->wait_state);
+ MFC_TRACE_CTX("** DEC clear WAIT_STOP(wait_state %d)\n", ctx->wait_state);
}
}
ret = -EAGAIN;
break;
}
+ if (ctx->wait_state != WAIT_NONE) {
+ mfc_err_ctx("wait_state(%d) is not ready\n", ctx->wait_state);
+ ret = -EAGAIN;
+ break;
+ }
ret = mfc_cmd_dec_init_buffers(ctx);
break;
case MFCINST_RES_CHANGE_INIT: