Commit 5d1ec731 authored by Donghwa Lee's avatar Donghwa Lee Committed by Mauro Carvalho Chehab

[media] s5p-mfc: Skip incomplete frame

Currently, when incomplete frame is received in the middle of
decoding, driver treats it as an error, so src/dst queue and
clock are cleaned. Although it is obviously error case, it is
needed to maintain video decoding in case of necessity. This
patch supports skip incomplete frame to next.
Signed-off-by: default avatarDonghwa Lee <dh09.lee@samsung.com>
Signed-off-by: default avatarSeung-Woo Kim <sw0312.kim@samsung.com>
Signed-off-by: default avatarMarek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: default avatarSylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@s-opensource.com>
parent dd62b8f1
...@@ -393,6 +393,9 @@ ...@@ -393,6 +393,9 @@
#define S5P_FIMV_REG_CLEAR_COUNT 0 #define S5P_FIMV_REG_CLEAR_COUNT 0
/* Error handling defines */ /* 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_WARNINGS_START 145
#define S5P_FIMV_ERR_DEC_MASK 0xFFFF #define S5P_FIMV_ERR_DEC_MASK 0xFFFF
#define S5P_FIMV_ERR_DEC_SHIFT 0 #define S5P_FIMV_ERR_DEC_SHIFT 0
......
...@@ -641,8 +641,11 @@ static irqreturn_t s5p_mfc_irq(int irq, void *priv) ...@@ -641,8 +641,11 @@ static irqreturn_t s5p_mfc_irq(int irq, void *priv)
case S5P_MFC_R2H_CMD_ERR_RET: case S5P_MFC_R2H_CMD_ERR_RET:
/* An error has occurred */ /* An error has occurred */
if (ctx->state == MFCINST_RUNNING && if (ctx->state == MFCINST_RUNNING &&
s5p_mfc_hw_call(dev->mfc_ops, err_dec, err) >= (s5p_mfc_hw_call(dev->mfc_ops, err_dec, err) >=
dev->warn_start) 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); s5p_mfc_handle_frame(ctx, reason, err);
else else
s5p_mfc_handle_error(dev, ctx, reason, err); s5p_mfc_handle_error(dev, ctx, reason, err);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment