[COMMON] media: mfc: modified encoder stop sequence
authorJeonghee Kim <jhhhh.kim@samsung.com>
Tue, 19 Jun 2018 23:03:00 +0000 (08:03 +0900)
committerYoungmin Nam <youngmin.nam@samsung.com>
Tue, 3 Jul 2018 07:00:38 +0000 (16:00 +0900)
LAST_FRAME command is only needed when in the running state

Change-Id: Iff650d9e11092deced7e2511e065dcb5363302b3
Signed-off-by: Jeonghee Kim <jhhhh.kim@samsung.com>
drivers/media/platform/exynos/mfc/s5p_mfc_enc_vb2_ops.c

index 2917b444a2d00bc0d7a97779e2f543ee7f5897ce..e0df63d0ca49c080bcc3f0f346c4a8cd9527aa77 100644 (file)
@@ -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);