media: s5p-mfc: skip incomeplete frame
authorDonghwa Lee <dh09.lee@samsung.com>
Thu, 31 Jul 2014 06:01:59 +0000 (15:01 +0900)
committerSeung-Woo Kim <sw0312.kim@samsung.com>
Thu, 31 Mar 2016 07:59:18 +0000 (16:59 +0900)
Currently, when incomplete frame is recieved in the middle of
decoding, driver have treated it to error, so src/dst queue and
clock are cleaned. Although it is obviously error case, it is need
to maintain video decoding in case of necessity. This patch
supports skip incomplete frame to next.

Change-Id: I328275a01d9f4bdfda55daf08a0e8b238ed7da5d
Signed-off-by: Donghwa Lee <dh09.lee@samsung.com>
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
drivers/media/platform/s5p-mfc/regs-mfc.h
drivers/media/platform/s5p-mfc/s5p_mfc.c

index 6ccc3f8c122add705d7338d0656ac744331823fb..57b7e0be0596fecedc5b5a8c6264c6eef51cd107 100644 (file)
 #define S5P_FIMV_REG_CLEAR_COUNT               0
 
 /* Error handling defines */
+#define S5P_FIMV_ERR_NO_VALID_SEQ_HDR          67
+#define S5P_FIMV_ERR_INCOMPLETE_FRAME          124
+#define S5P_FIMV_ERR_TIMEOUT                   140
 #define S5P_FIMV_ERR_WARNINGS_START            145
 #define S5P_FIMV_ERR_DEC_MASK                  0xFFFF
 #define S5P_FIMV_ERR_DEC_SHIFT                 0
index fa680cd9c6e9a16349afa817f02afb4732eafd3e..e189f2c5ffdca7319eda2576f28d6e8e7c3ec4a5 100644 (file)
@@ -625,8 +625,11 @@ static irqreturn_t s5p_mfc_irq(int irq, void *priv)
        case S5P_MFC_R2H_CMD_ERR_RET:
                /* An error has occurred */
                if (ctx->state == MFCINST_RUNNING &&
-                       s5p_mfc_hw_call(dev->mfc_ops, err_dec, err) >=
-                               dev->warn_start)
+                       (s5p_mfc_hw_call(dev->mfc_ops, err_dec, err) >=
+                               dev->warn_start ||
+                               err == S5P_FIMV_ERR_NO_VALID_SEQ_HDR ||
+                               err == S5P_FIMV_ERR_INCOMPLETE_FRAME ||
+                               err == S5P_FIMV_ERR_TIMEOUT))
                        s5p_mfc_handle_frame(ctx, reason, err);
                else
                        s5p_mfc_handle_error(dev, ctx, reason, err);