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: 9420913 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 1C90360720 for ; Thu, 10 Nov 2016 10:31:56 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 06EC42961E for ; Thu, 10 Nov 2016 10:31:56 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id EEDC02961B; Thu, 10 Nov 2016 10:31:55 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=unavailable version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A50D429616 for ; Thu, 10 Nov 2016 10:31:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932267AbcKJKbt (ORCPT ); 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 FtfP21nsuPmFzeLN2zVMFufPb2C36NmwldVixvl9TBZrj9xlt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7awQdhi EhfurQeyuTiEBJYwSsx/sp8Rwmlikji67xUjSBWbgKFE19susA4RASeJhbP+soMUMQscYpK4 f3w/O0hCGGjsmxeXwYpYBFQl+k7/AbN5BTwkzr1ZxAyxTk7i5LHJrCA2p4CnRMvmmWALhIBq 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-samsung-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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(-) 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);