From patchwork Thu Nov 10 10:31:22 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Szyprowski X-Patchwork-Id: 81619 Delivered-To: patch@linaro.org Received: by 10.140.97.165 with SMTP id m34csp650314qge; Thu, 10 Nov 2016 02:31:55 -0800 (PST) X-Received: by 10.98.10.3 with SMTP id s3mr8829078pfi.78.1478773915553; Thu, 10 Nov 2016 02:31:55 -0800 (PST) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f90si4157858pfj.5.2016.11.10.02.31.55; Thu, 10 Nov 2016 02:31:55 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-media-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-media-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-media-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932375AbcKJKbt (ORCPT + 4 others); Thu, 10 Nov 2016 05:31:49 -0500 Received: from mailout2.w1.samsung.com ([210.118.77.12]:42737 "EHLO mailout2.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755043AbcKJKbk (ORCPT ); Thu, 10 Nov 2016 05:31:40 -0500 Received: from eucas1p1.samsung.com (unknown [182.198.249.206]) by mailout2.w1.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTP id <0OGF00EJ698PS580@mailout2.w1.samsung.com>; Thu, 10 Nov 2016 10:31:37 +0000 (GMT) Received: from eusmges3.samsung.com (unknown [203.254.199.242]) by eucas1p1.samsung.com (KnoxPortal) with ESMTP id 20161110103136eucas1p1c400df1ee2e84bd4b33f9b29a95676d3~FqQYyWQoB2359823598eucas1p1T; Thu, 10 Nov 2016 10:31:36 +0000 (GMT) Received: from eucas1p1.samsung.com ( [182.198.249.206]) by eusmges3.samsung.com (EUCPMTA) with SMTP id 69.86.11330.88C44285; Thu, 10 Nov 2016 10:31:36 +0000 (GMT) Received: from eusmgms1.samsung.com (unknown [182.198.249.179]) by eucas1p1.samsung.com (KnoxPortal) with ESMTP id 20161110103136eucas1p1e219ba97c554f47b1afee92a2da294b8~FqQYLT0nQ1928519285eucas1p1t; Thu, 10 Nov 2016 10:31:36 +0000 (GMT) X-AuditID: cbfec7f2-f79556d000002c42-91-58244c88074a Received: from eusync2.samsung.com ( [203.254.199.212]) by eusmgms1.samsung.com (EUCPMTA) with SMTP id E7.CD.07726.88C44285; Thu, 10 Nov 2016 10:31:36 +0000 (GMT) Received: from AMDC2765.digital.local ([106.116.147.25]) by eusync2.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTPA id <0OGF00DAR98IFU80@eusync2.samsung.com>; Thu, 10 Nov 2016 10:31:36 +0000 (GMT) From: Marek Szyprowski To: linux-media@vger.kernel.org, linux-samsung-soc@vger.kernel.org Cc: Marek Szyprowski , Sylwester Nawrocki , Krzysztof Kozlowski , Seung-Woo Kim , Bartlomiej Zolnierkiewicz , Javier Martinez Canillas , Donghwa Lee Subject: [PATCH 3/4] s5p-mfc: Skip incomeplete frame Date: Thu, 10 Nov 2016 11:31:22 +0100 Message-id: <1478773883-12083-4-git-send-email-m.szyprowski@samsung.com> X-Mailer: git-send-email 1.9.1 In-reply-to: <1478773883-12083-1-git-send-email-m.szyprowski@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFrrOIsWRmVeSWpSXmKPExsWy7djPc7odPioRBp+myVrcWneO1WLjjPWs FtfP21nsuPmFzeLN2zVMFufPb2C36NmwldVixvl9TBZrj9xltzj8ph3InfySzYHbY9OqTjaP Lf132T36tqxi9Pi8SS6AJYrLJiU1J7MstUjfLoEr4+vla2wFjQIVax4+Ym5gPM3bxcjJISFg IjF70ycmCFtM4sK99WxdjFwcQgJLGSWO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5LHJrCA2p4CnRMvmmWALhIBq PuzqZ5nAyLuAkWEVo0hqaXFuem6xoV5xYm5xaV66XnJ+7iZGYKhvO/Zz8w7GSxuDDzEKcDAq 8fB2aCpHCLEmlhVX5h5ilOBgVhLh7fdSiRDiTUmsrEotyo8vKs1JLT7EaAp01ERmKdHkfGAc 5pXEG5oYmlsaGhlbWJgbGSmJ85Z8uBIuJJCeWJKanZpakFoE08fEwSnVwDjjyfXFwum7GI9q LyuPfXBWc1Kya+bcKGchs6nTJIXTZ3xNN3HiDLxVOM0hU4o7/KbQjw92P3Yr7Yq/8/632nzW G0/1u3z5VdV3XDXLL1dYy2FYLKXSc77xmsUvf6N1s6P3cSRs487WSVPezCk6keWJ5Dv1PYs3 KMc4+jR4qghdXuq+d8qB5UosxRmJhlrMRcWJAFrDFAeLAgAA X-MTR: 20000000000000000@CPGS X-CMS-MailID: 20161110103136eucas1p1e219ba97c554f47b1afee92a2da294b8 X-Msg-Generator: CA X-Sender-IP: 182.198.249.179 X-Local-Sender: =?UTF-8?B?TWFyZWsgU3p5cHJvd3NraRtTUlBPTC1LZXJuZWwgKFRQKRs=?= =?UTF-8?B?7IK87ISx7KCE7J6QG1NlbmlvciBTb2Z0d2FyZSBFbmdpbmVlcg==?= X-Global-Sender: =?UTF-8?B?TWFyZWsgU3p5cHJvd3NraRtTUlBPTC1LZXJuZWwgKFRQKRtT?= =?UTF-8?B?YW1zdW5nIEVsZWN0cm9uaWNzG1NlbmlvciBTb2Z0d2FyZSBFbmdpbmVlcg==?= X-Sender-Code: =?UTF-8?B?QzEwG0VIURtDMTBDRDAyQ0QwMjczOTI=?= CMS-TYPE: 201P X-HopCount: 7 X-CMS-RootMailID: 20161110103136eucas1p1e219ba97c554f47b1afee92a2da294b8 X-RootMTR: 20161110103136eucas1p1e219ba97c554f47b1afee92a2da294b8 References: <1478773883-12083-1-git-send-email-m.szyprowski@samsung.com> Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org From: Donghwa Lee 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. Signed-off-by: Donghwa Lee Signed-off-by: Seung-Woo Kim Signed-off-by: Marek Szyprowski --- drivers/media/platform/s5p-mfc/regs-mfc.h | 3 +++ drivers/media/platform/s5p-mfc/s5p_mfc.c | 7 +++++-- 2 files changed, 8 insertions(+), 2 deletions(-) -- 1.9.1 -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/media/platform/s5p-mfc/regs-mfc.h b/drivers/media/platform/s5p-mfc/regs-mfc.h index 6ccc3f8..57b7e0b 100644 --- a/drivers/media/platform/s5p-mfc/regs-mfc.h +++ b/drivers/media/platform/s5p-mfc/regs-mfc.h @@ -393,6 +393,9 @@ #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 diff --git a/drivers/media/platform/s5p-mfc/s5p_mfc.c b/drivers/media/platform/s5p-mfc/s5p_mfc.c index 0a5b8f5..994a27b 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);