From 8e11d5eb8ea1376f2cc530c1a4e12c64a85ed61f Mon Sep 17 00:00:00 2001 From: Jeonghee Kim Date: Wed, 20 Jun 2018 08:03:00 +0900 Subject: [PATCH] [COMMON] media: mfc: modified encoder stop sequence LAST_FRAME command is only needed when in the running state Change-Id: Iff650d9e11092deced7e2511e065dcb5363302b3 Signed-off-by: Jeonghee Kim --- drivers/media/platform/exynos/mfc/s5p_mfc_enc_vb2_ops.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/media/platform/exynos/mfc/s5p_mfc_enc_vb2_ops.c b/drivers/media/platform/exynos/mfc/s5p_mfc_enc_vb2_ops.c index 2917b444a2d0..e0df63d0ca49 100644 --- a/drivers/media/platform/exynos/mfc/s5p_mfc_enc_vb2_ops.c +++ b/drivers/media/platform/exynos/mfc/s5p_mfc_enc_vb2_ops.c @@ -365,9 +365,7 @@ static void s5p_mfc_enc_stop_streaming(struct vb2_queue *q) index++; } } else if (q->type == V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE) { - if (ctx->state == MFCINST_FREE) { - mfc_debug(2, "already closed\n"); - } else { + if (ctx->state == MFCINST_RUNNING) { s5p_mfc_change_state(ctx, MFCINST_FINISHING); s5p_mfc_set_bit(ctx->num, &dev->work_bits); -- 2.20.1