From patchwork Thu Nov 10 10:31:21 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Szyprowski X-Patchwork-Id: 81620 Delivered-To: patch@linaro.org Received: by 10.140.97.165 with SMTP id m34csp650317qge; Thu, 10 Nov 2016 02:31:56 -0800 (PST) X-Received: by 10.98.211.135 with SMTP id z7mr8728323pfk.109.1478773916124; Thu, 10 Nov 2016 02:31:56 -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:56 -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 S932398AbcKJKbv (ORCPT + 4 others); Thu, 10 Nov 2016 05:31:51 -0500 Received: from mailout4.w1.samsung.com ([210.118.77.14]:46070 "EHLO mailout4.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755037AbcKJKbk (ORCPT ); Thu, 10 Nov 2016 05:31:40 -0500 Received: from eucas1p2.samsung.com (unknown [182.198.249.207]) by mailout4.w1.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTP id <0OGF00L9Y98O0Q80@mailout4.w1.samsung.com>; Thu, 10 Nov 2016 10:31:37 +0000 (GMT) Received: from eusmges4.samsung.com (unknown [203.254.199.244]) by eucas1p2.samsung.com (KnoxPortal) with ESMTP id 20161110103136eucas1p2c14b5a9da0ec234cbd066d86e4b337dc~FqQYpgSGu2314023140eucas1p2R; Thu, 10 Nov 2016 10:31:36 +0000 (GMT) Received: from eucas1p2.samsung.com ( [182.198.249.207]) by eusmges4.samsung.com (EUCPMTA) with SMTP id 72.CA.28332.88C44285; Thu, 10 Nov 2016 10:31:36 +0000 (GMT) Received: from eusmgms2.samsung.com (unknown [182.198.249.180]) by eucas1p1.samsung.com (KnoxPortal) with ESMTP id 20161110103135eucas1p19c34152fc71576793beab5a818a6bdf5~FqQX55AfK2356623566eucas1p1S; Thu, 10 Nov 2016 10:31:35 +0000 (GMT) X-AuditID: cbfec7f4-f791c6d000006eac-48-58244c88d4c6 Received: from eusync2.samsung.com ( [203.254.199.212]) by eusmgms2.samsung.com (EUCPMTA) with SMTP id 0C.1D.10494.B6C44285; Thu, 10 Nov 2016 10:31:07 +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:35 +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 , Ingi Kim Subject: [PATCH 2/4] s5p-mfc: Fix MFC context buffer size Date: Thu, 10 Nov 2016 11:31:21 +0100 Message-id: <1478773883-12083-3-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+NgFrrKIsWRmVeSWpSXmKPExsWy7djP87odPioRBk9WiFjcWneO1WLjjPWs FtfP21nsuPmFzeLN2zVMFufPb2C36NmwldVixvl9TBZrj9xltzj8ph3InfySzYHbY9OqTjaP Lf132T36tqxi9Pi8SS6AJYrLJiU1J7MstUjfLoErY/nenywFW/Qr+idKNDDe1+hi5OSQEDCR +P/xBTOELSZx4d56ti5GLg4hga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B1LDIqAqcX71EyYQm1fAQ+Lp/sdQ2+QkTh6bzApicwp4SrRsnskI YgsB1XzY1c8ygZF3ASPDKkaR1NLi3PTcYiO94sTc4tK8dL3k/NxNjMAw33bs55YdjF3vgg8x CnAwKvHwdmgqRwixJpYVV+YeYpTgYFYS4e33UokQ4k1JrKxKLcqPLyrNSS0+xGgKdNREZinR 5HxgDOaVxBuaGJpbGhoZW1iYGxkpifNO/XAlXEggPbEkNTs1tSC1CKaPiYNTqoGx0mMim3Y3 W+rx37OWmLay3dHbuiNR/2yM+M7LH3/MX/P/pdOW2NVtCe5vIj/+iPk+WZX/ZNrZL2p5L5Zc vXJ/2deN1XP4Lp0P/eptrdcV+/br7K2VMtq6d5ckT4ltYjD6abwt5/qliRt7J6bH/Fp2t9HU dXGc7opXbbJ/V9XlGIjNXuMQ4MF4U4mlOCPRUIu5qDgRAJinSOuJAgAA X-MTR: 20000000000000000@CPGS X-CMS-MailID: 20161110103135eucas1p19c34152fc71576793beab5a818a6bdf5 X-Msg-Generator: CA X-Sender-IP: 182.198.249.180 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: 20161110103135eucas1p19c34152fc71576793beab5a818a6bdf5 X-RootMTR: 20161110103135eucas1p19c34152fc71576793beab5a818a6bdf5 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: Ingi Kim When video file was decoded by H/W MFCv8. It occured IOMMU page fault because of accessing abnormal memory of mfc ctx buf So this patch supports buffer size of mfc context more. Relevant page fault error is below. [ 3524.617147] PAGE FAULT occurred at 0x10108000 by 11200000.sysmmu(Page table base: 0x6d86c000) [ 3524.624192] Lv1 entry: 0x6c27d001 [ 3524.627567] Lv2 entry: 0x0 [ 3524.630482] ------------[ cut here ]------------ [ 3524.635020] kernel BUG at drivers/iommu/exynos-iommu.c:358! [ 3524.640567] Internal error: Oops - BUG: 0 [#1] PREEMPT SMP ARM [ 3524.646373] Modules linked in: [ 3524.649410] CPU: 0 PID: 0 Comm: swapper/0 Not tainted 4.0.0-00001-g0ff9b87-dirty #18 [ 3524.657117] Hardware name: SAMSUNG EXYNOS (Flattened Device Tree) [ 3524.663184] task: c0e4aff0 ti: c0e3c000 task.ti: c0e3c000 [ 3524.668566] PC is at exynos_sysmmu_irq+0x1b8/0x2c4 [ 3524.673330] LR is at vprintk_emit+0x2b8/0x58c [ 3524.677657] pc : [] lr : [] psr: 600d0193 [ 3524.677657] sp : c0e3dd90 ip : 00000000 fp : c0e3ddcc [ 3524.689092] r10: ee29a110 r9 : 00000000 r8 : ee29a128 [ 3524.694292] r7 : ed812810 r6 : 10108000 r5 : ed86c000 r4 : 00000000 [ 3524.700791] r3 : c0ec9bd8 r2 : 00000000 r1 : 00000000 r0 : ed82ff00 [ 3524.707292] Flags: nZCv IRQs off FIQs on Mode SVC_32 ISA ARM Segment kernel [ 3524.714656] Control: 10c5387d Table: 6b08c06a DAC: 00000015 [ 3524.720375] Process swapper/0 (pid: 0, stack limit = 0xc0e3c210) [ 3524.726354] Stack: (0xc0e3dd90 to 0xc0e3e000) [ 3524.730689] dd80: c0e3dd9c c0069d68 ee58c338 6d86c000 [ 3524.738836] dda0: ee58c338 ee298c40 ee2915a0 0000003b c0e64ef4 c0e3c000 00000000 00000000 [ 3524.746981] ddc0: c0e3de14 c0e3ddd0 c0071ef4 c037cacc ffffffff a00d0193 c0e3ddf4 ee291540 [ 3524.755126] dde0: c0ec793c c0ec7928 7fffffff ee291540 ee2915a0 ee298c40 c0e64ef4 ee004660 [ 3524.763272] de00: ee010800 c0e3df00 c0e3de34 c0e3de18 c0072138 c0071e9c 00020000 ee291540 [ 3524.771418] de20: ee2915a0 00000016 c0e3de4c c0e3de38 c0075130 c00720f8 0000003b ee028300 [ 3524.779563] de40: c0e3de64 c0e3de50 c0071450 c0075068 00000100 00000012 c0e3de8c c0e3de68 [ 3524.787708] de60: c030d240 c0071420 c030d19c 00000016 00000000 00000016 00000000 00000001 [ 3524.795854] de80: c0e3dea4 c0e3de90 c0071450 c030d1a8 00000092 c0e37a1c c0e3ded4 c0e3dea8 [ 3524.804000] dea0: c0071790 c0071420 c0e3df00 f000200c 00000016 c0e440a8 c0e3df00 f0002000 [ 3524.812145] dec0: c095bc8c 00000001 c0e3defc c0e3ded8 c0008730 c0071710 c0010d88 c0010d8c [ 3524.820290] dee0: 600d0013 ffffffff c0e3df34 c0ec7eb4 c0e3df54 c0e3df00 c0014780 c00086fc [ 3524.828436] df00: 00000001 00000000 00000000 c0020780 c0e3c000 c0e43530 00000000 00000000 [ 3524.836581] df20: c0ec7eb4 c095bc8c 00000001 c0e3df54 c0e3df58 c0e3df48 c0010d88 c0010d8c [ 3524.844727] df40: 600d0013 ffffffff c0e3df94 c0e3df58 c0062690 c0010d50 c0ec75f0 00000001 [ 3524.852872] df60: c0e3df84 c0e4353c c0e39580 c0e43e84 c0e3c000 00000002 c0e3df58 c0e38b88 [ 3524.861018] df80: c0952b9c ffffffff c0e3dfac c0e3df98 c094d1b8 c00622d4 c0e3c000 c0e43e10 [ 3524.869163] dfa0: c0e3dff4 c0e3dfb0 c0d86d30 c094d130 ffffffff ffffffff c0d866f0 00000000 [ 3524.877309] dfc0: 00000000 c0df06d8 00000000 c0ee3f14 c0e434c0 c0df06d4 c0e4c20c 4000406a [ 3524.885454] dfe0: 410fc073 00000000 00000000 c0e3dff8 40008074 c0d86970 00000000 00000000 [ 3524.893610] [] (exynos_sysmmu_irq) from [] (handle_irq_event_percpu+0x64/0x25c) [ 3524.902615] [] (handle_irq_event_percpu) from [] (handle_irq_event+0x4c/0x6c) [ 3524.911454] [] (handle_irq_event) from [] (handle_level_irq+0xd4/0x14c) [ 3524.919773] [] (handle_level_irq) from [] (generic_handle_irq+0x3c/0x4c) [ 3524.928180] [] (generic_handle_irq) from [] (combiner_handle_cascade_irq+0xa4/0x110) [ 3524.937624] [] (combiner_handle_cascade_irq) from [] (generic_handle_irq+0x3c/0x4c) [ 3524.946981] [] (generic_handle_irq) from [] (__handle_domain_irq+0x8c/0xfc) [ 3524.955646] [] (__handle_domain_irq) from [] (gic_handle_irq+0x40/0x78) [ 3524.963966] [] (gic_handle_irq) from [] (__irq_svc+0x40/0x74) [ 3524.971412] Exception stack(0xc0e3df00 to 0xc0e3df48) [ 3524.976441] df00: 00000001 00000000 00000000 c0020780 c0e3c000 c0e43530 00000000 00000000 [ 3524.984586] df20: c0ec7eb4 c095bc8c 00000001 c0e3df54 c0e3df58 c0e3df48 c0010d88 c0010d8c [ 3524.992729] df40: 600d0013 ffffffff [ 3524.996205] [] (__irq_svc) from [] (arch_cpu_idle+0x48/0x4c) [ 3525.003567] [] (arch_cpu_idle) from [] (cpu_startup_entry+0x3c8/0x4a4) [ 3525.011805] [] (cpu_startup_entry) from [] (rest_init+0x94/0x98) [ 3525.019516] [] (rest_init) from [] (start_kernel+0x3cc/0x3d8) [ 3525.026963] Code: e34c30ec e5932004 e3520000 ca000018 (e7f001f2) [ 3525.033028] ---[ end trace 71ed544f653b4d46 ]--- Signed-off-by: Ingi Kim Signed-off-by: Seung-Woo Kim Signed-off-by: Marek Szyprowski --- drivers/media/platform/s5p-mfc/regs-mfc-v8.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 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-v8.h b/drivers/media/platform/s5p-mfc/regs-mfc-v8.h index cc7cbec..4d1c375 100644 --- a/drivers/media/platform/s5p-mfc/regs-mfc-v8.h +++ b/drivers/media/platform/s5p-mfc/regs-mfc-v8.h @@ -90,7 +90,7 @@ #define S5P_FIMV_E_H264_OPTIONS_V8 0xfb54 /* MFCv8 Context buffer sizes */ -#define MFC_CTX_BUF_SIZE_V8 (30 * SZ_1K) /* 30KB */ +#define MFC_CTX_BUF_SIZE_V8 (36 * SZ_1K) /* 36KB */ #define MFC_H264_DEC_CTX_BUF_SIZE_V8 (2 * SZ_1M) /* 2MB */ #define MFC_OTHER_DEC_CTX_BUF_SIZE_V8 (20 * SZ_1K) /* 20KB */ #define MFC_H264_ENC_CTX_BUF_SIZE_V8 (100 * SZ_1K) /* 100KB */