aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/platform/s5p-mfc/s5p_mfc.c
diff options
context:
space:
mode:
authorDonghwa Lee <dh09.lee@samsung.com>2016-11-10 08:31:22 -0200
committerMauro Carvalho Chehab <mchehab@s-opensource.com>2016-11-16 16:39:35 -0200
commit5d1ec73184e657fb2b429f8742cd7cb42336bc45 (patch)
treec43c77772ea441fb1f8680527967f59eb7bf70c4 /drivers/media/platform/s5p-mfc/s5p_mfc.c
parent[media] s5p-mfc: Fix MFC context buffer size (diff)
downloadlinux-dev-5d1ec73184e657fb2b429f8742cd7cb42336bc45.tar.xz
linux-dev-5d1ec73184e657fb2b429f8742cd7cb42336bc45.zip
[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: Donghwa Lee <dh09.lee@samsung.com> Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com> Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com> Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Diffstat (limited to 'drivers/media/platform/s5p-mfc/s5p_mfc.c')
-rw-r--r--drivers/media/platform/s5p-mfc/s5p_mfc.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/media/platform/s5p-mfc/s5p_mfc.c b/drivers/media/platform/s5p-mfc/s5p_mfc.c
index 3436eda58855..9f73ba1cc9c3 100644
--- a/drivers/media/platform/s5p-mfc/s5p_mfc.c
+++ b/drivers/media/platform/s5p-mfc/s5p_mfc.c
@@ -641,8 +641,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);