|
@@ -991,24 +991,35 @@ static int s5p_mfc_stop_streaming(struct vb2_queue *q)
|
|
|
S5P_MFC_R2H_CMD_FRAME_DONE_RET, 0);
|
|
|
aborted = 1;
|
|
|
}
|
|
|
- spin_lock_irqsave(&dev->irqlock, flags);
|
|
|
if (q->type == V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE) {
|
|
|
+ spin_lock_irqsave(&dev->irqlock, flags);
|
|
|
s5p_mfc_hw_call(dev->mfc_ops, cleanup_queue, &ctx->dst_queue,
|
|
|
&ctx->vq_dst);
|
|
|
INIT_LIST_HEAD(&ctx->dst_queue);
|
|
|
ctx->dst_queue_cnt = 0;
|
|
|
ctx->dpb_flush_flag = 1;
|
|
|
ctx->dec_dst_flag = 0;
|
|
|
+ spin_unlock_irqrestore(&dev->irqlock, flags);
|
|
|
+ if (IS_MFCV6(dev) && (ctx->state == MFCINST_RUNNING)) {
|
|
|
+ ctx->state = MFCINST_FLUSH;
|
|
|
+ set_work_bit_irqsave(ctx);
|
|
|
+ s5p_mfc_clean_ctx_int_flags(ctx);
|
|
|
+ s5p_mfc_hw_call(dev->mfc_ops, try_run, dev);
|
|
|
+ if (s5p_mfc_wait_for_done_ctx(ctx,
|
|
|
+ S5P_MFC_R2H_CMD_DPB_FLUSH_RET, 0))
|
|
|
+ mfc_err("Err flushing buffers\n");
|
|
|
+ }
|
|
|
}
|
|
|
if (q->type == V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE) {
|
|
|
+ spin_lock_irqsave(&dev->irqlock, flags);
|
|
|
s5p_mfc_hw_call(dev->mfc_ops, cleanup_queue, &ctx->src_queue,
|
|
|
&ctx->vq_src);
|
|
|
INIT_LIST_HEAD(&ctx->src_queue);
|
|
|
ctx->src_queue_cnt = 0;
|
|
|
+ spin_unlock_irqrestore(&dev->irqlock, flags);
|
|
|
}
|
|
|
if (aborted)
|
|
|
ctx->state = MFCINST_RUNNING;
|
|
|
- spin_unlock_irqrestore(&dev->irqlock, flags);
|
|
|
return 0;
|
|
|
}
|
|
|
|