From patchwork Mon Feb 20 13:38:50 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Szyprowski X-Patchwork-Id: 94208 Delivered-To: patch@linaro.org Received: by 10.140.20.99 with SMTP id 90csp1326909qgi; Mon, 20 Feb 2017 05:39:18 -0800 (PST) X-Received: by 10.99.94.195 with SMTP id s186mr27920685pgb.198.1487597958265; Mon, 20 Feb 2017 05:39:18 -0800 (PST) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e3si18647382plj.120.2017.02.20.05.39.18; Mon, 20 Feb 2017 05:39:18 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-samsung-soc-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-samsung-soc-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-samsung-soc-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752691AbdBTNjR (ORCPT + 4 others); Mon, 20 Feb 2017 08:39:17 -0500 Received: from mailout4.w1.samsung.com ([210.118.77.14]:23438 "EHLO mailout4.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752513AbdBTNjP (ORCPT ); Mon, 20 Feb 2017 08:39:15 -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 <0OLO009UXDXCVM40@mailout4.w1.samsung.com>; Mon, 20 Feb 2017 13:39:12 +0000 (GMT) Received: from eusmges4.samsung.com (unknown [203.254.199.244]) by eucas1p2.samsung.com (KnoxPortal) with ESMTP id 20170220133912eucas1p2a1746c22a41f13f7a54854c4cc7fdcdd~lAnSsU-0C0831408314eucas1p2G; Mon, 20 Feb 2017 13:39:12 +0000 (GMT) Received: from eucas1p2.samsung.com ( [182.198.249.207]) by eusmges4.samsung.com (EUCPMTA) with SMTP id 89.12.28517.F71FAA85; Mon, 20 Feb 2017 13:39:11 +0000 (GMT) Received: from eusmgms2.samsung.com (unknown [182.198.249.180]) by eucas1p2.samsung.com (KnoxPortal) with ESMTP id 20170220133911eucas1p257b33c37da51473580724d4e8b1392fa~lAnSGOsuC0821808218eucas1p2q; Mon, 20 Feb 2017 13:39:11 +0000 (GMT) X-AuditID: cbfec7f4-f79716d000006f65-72-58aaf17fe47f Received: from eusync1.samsung.com ( [203.254.199.211]) by eusmgms2.samsung.com (EUCPMTA) with SMTP id F1.FA.10233.481FAA85; Mon, 20 Feb 2017 13:39:16 +0000 (GMT) Received: from AMDC2765.digital.local ([106.116.147.25]) by eusync1.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTPA id <0OLO00HBFDX6PK30@eusync1.samsung.com>; Mon, 20 Feb 2017 13:39:11 +0000 (GMT) From: Marek Szyprowski To: linux-media@vger.kernel.org, linux-samsung-soc@vger.kernel.org Cc: Marek Szyprowski , Sylwester Nawrocki , Andrzej Hajda , Krzysztof Kozlowski , Inki Dae , Seung-Woo Kim Subject: [PATCH v2 01/15] media: s5p-mfc: Remove unused structures and dead code Date: Mon, 20 Feb 2017 14:38:50 +0100 Message-id: <1487597944-2000-2-git-send-email-m.szyprowski@samsung.com> X-Mailer: git-send-email 1.9.1 In-reply-to: <1487597944-2000-1-git-send-email-m.szyprowski@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFjrCIsWRmVeSWpSXmKPExsWy7djP87r1H1dFGHRMNLC4te4cq8Wk+xNY LM6f38Bu0bNhK6vFjPP7mCzWHrnLbnH4TTuQO/klmwOHx6ZVnWwefVtWMXp83iQXwBzFZZOS mpNZllqkb5fAlbF80wnmgpMqFQ1H3rE2MB6R62Lk5JAQMJF4v/sJE4QtJnHh3nq2LkYuDiGB pYwS3beeskI4nxklel5vZILpuD/zA1TVMqCqn9+ZIJwGJom70y4yglSxCRhKdL3tYgOxRQSc JBbO+ssOUsQs8J1R4tvu06wgCWGBIIlvzReZQWwWAVWJ62ungK3gFXCXmDjrB9Q6OYmTxyYD 1XNwcAp4SOxoTwaZIyHwmk2i6csysLiEgKzEpgPMEOUuEk8enmKDsIUlXh3fwg5hy0hcntzN AmH3M0o0tWpD2DMYJc695YWwrSUOH78IdhqzAJ/EpG3TmSHG80p0tAlBlHhIvJh6gRXCdpRo +3+cBeL32YwSH1c0skxglFnAyLCKUSS1tDg3PbXYRK84Mbe4NC9dLzk/dxMjMG5P/zv+ZQfj 4mNWhxgFOBiVeHg1Zq6MEGJNLCuuzD3EKMHBrCTCe/nlqggh3pTEyqrUovz4otKc1OJDjNIc LErivHsWXAkXEkhPLEnNTk0tSC2CyTJxcEo1MArVCCkGRU12fMZhsa7nvUVV3Q+mT182P55c qvR+QeK8/7Zirzj2PpTWtt834+4R8Qy3u6UiS9a2L7O2af6651Lgvl/fpNXYfFR+cJrvav76 oSBToHGx57+z6uyNWauYBFbJn7pc9PrX43n+S4+XcU5XXXXvxQF/Y/8NdcsSdFdXTFu2e4Ns +B0lluKMREMt5qLiRAAPKa1n1wIAAA== X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFnrMLMWRmVeSWpSXmKPExsVy+t/xy7otH1dFGHR/NbS4te4cq8Wk+xNY LM6f38Bu0bNhK6vFjPP7mCzWHrnLbnH4TTuQO/klmwOHx6ZVnWwefVtWMXp83iQXwBzlZpOR mpiSWqSQmpecn5KZl26rFBripmuhpJCXmJtqqxSh6xsSpKRQlphTCuQZGaABB+cA92AlfbsE t4zlm04wF5xUqWg48o61gfGIXBcjJ4eEgInE/Zkf2CBsMYkL99YD2VwcQgJLGCV+rLjKCuE0 MUks2X+CFaSKTcBQouttF1iHiICTxMJZf9lBbGaB74wSy26mgdjCAgESs99NYwSxWQRUJa6v ncIEYvMKuEtMnPWDCWKbnMTJY5OBZnJwcAp4SOxoTwYJCwGVfHnWyzSBkXcBI8MqRpHU0uLc 9NxiI73ixNzi0rx0veT83E2MwADeduznlh2MXe+CDzEKcDAq8fBqzFwZIcSaWFZcmXuIUYKD WUmE9/LLVRFCvCmJlVWpRfnxRaU5qcWHGE2BbprILCWanA+MrrySeEMTQ3NLQyNjCwtzIyMl cd6pH66ECwmkJ5akZqemFqQWwfQxcXBKNTAe3fIwLce/eNVkh6j8P//STxmfz5KIinhZFH/o 2fSLjivl522bc8j169H5Ez+kxJ26Zr5zh/ZuKza1yyaBla5/Jvhnc4mYbWW/HO0yuc3xDN8t Tb+63JVXFv04ltoRwd779jh/s1Z2b0Ebt+Kcup6GQ7XPXhgu/hDJ80KirIkjItt9u05ibYkS S3FGoqEWc1FxIgAmmAQadgIAAA== X-MTR: 20000000000000000@CPGS X-CMS-MailID: 20170220133911eucas1p257b33c37da51473580724d4e8b1392fa X-Msg-Generator: CA X-Sender-IP: 182.198.249.180 X-Local-Sender: =?utf-8?q?Marek_Szyprowski=1BSRPOL-Kernel_=28TP=29=1B?= =?utf-8?b?7IK87ISx7KCE7J6QG1NlbmlvciBTb2Z0d2FyZSBFbmdpbmVlcg==?= X-Global-Sender: =?utf-8?q?Marek_Szyprowski=1BSRPOL-Kernel_=28TP=29=1BSam?= =?utf-8?q?sung_Electronics=1BSenior_Software_Engineer?= X-Sender-Code: =?utf-8?q?C10=1BEHQ=1BC10CD02CD027392?= CMS-TYPE: 201P X-HopCount: 7 X-CMS-RootMailID: 20170220133911eucas1p257b33c37da51473580724d4e8b1392fa X-RootMTR: 20170220133911eucas1p257b33c37da51473580724d4e8b1392fa References: <1487597944-2000-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 Remove unused structures, definitions and functions that are no longer called from the driver code. Signed-off-by: Marek Szyprowski Reviewed-by: Javier Martinez Canillas Tested-by: Javier Martinez Canillas --- drivers/media/platform/s5p-mfc/s5p_mfc.c | 21 --------------------- drivers/media/platform/s5p-mfc/s5p_mfc_common.h | 13 ------------- drivers/media/platform/s5p-mfc/s5p_mfc_ctrl.h | 1 - 3 files changed, 35 deletions(-) -- 1.9.1 -- To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" 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/s5p_mfc.c b/drivers/media/platform/s5p-mfc/s5p_mfc.c index 05fe82be6584..3e1f22eb4339 100644 --- a/drivers/media/platform/s5p-mfc/s5p_mfc.c +++ b/drivers/media/platform/s5p-mfc/s5p_mfc.c @@ -1422,16 +1422,11 @@ static int s5p_mfc_resume(struct device *dev) .priv = &mfc_buf_size_v5, }; -static struct s5p_mfc_buf_align mfc_buf_align_v5 = { - .base = MFC_BASE_ALIGN_ORDER, -}; - static struct s5p_mfc_variant mfc_drvdata_v5 = { .version = MFC_VERSION, .version_bit = MFC_V5_BIT, .port_num = MFC_NUM_PORTS, .buf_size = &buf_size_v5, - .buf_align = &mfc_buf_align_v5, .fw_name[0] = "s5p-mfc.fw", .clk_names = {"mfc", "sclk_mfc"}, .num_clocks = 2, @@ -1452,16 +1447,11 @@ static int s5p_mfc_resume(struct device *dev) .priv = &mfc_buf_size_v6, }; -static struct s5p_mfc_buf_align mfc_buf_align_v6 = { - .base = 0, -}; - static struct s5p_mfc_variant mfc_drvdata_v6 = { .version = MFC_VERSION_V6, .version_bit = MFC_V6_BIT, .port_num = MFC_NUM_PORTS_V6, .buf_size = &buf_size_v6, - .buf_align = &mfc_buf_align_v6, .fw_name[0] = "s5p-mfc-v6.fw", /* * v6-v2 firmware contains bug fixes and interface change @@ -1486,16 +1476,11 @@ static int s5p_mfc_resume(struct device *dev) .priv = &mfc_buf_size_v7, }; -static struct s5p_mfc_buf_align mfc_buf_align_v7 = { - .base = 0, -}; - static struct s5p_mfc_variant mfc_drvdata_v7 = { .version = MFC_VERSION_V7, .version_bit = MFC_V7_BIT, .port_num = MFC_NUM_PORTS_V7, .buf_size = &buf_size_v7, - .buf_align = &mfc_buf_align_v7, .fw_name[0] = "s5p-mfc-v7.fw", .clk_names = {"mfc", "sclk_mfc"}, .num_clocks = 2, @@ -1515,16 +1500,11 @@ static int s5p_mfc_resume(struct device *dev) .priv = &mfc_buf_size_v8, }; -static struct s5p_mfc_buf_align mfc_buf_align_v8 = { - .base = 0, -}; - static struct s5p_mfc_variant mfc_drvdata_v8 = { .version = MFC_VERSION_V8, .version_bit = MFC_V8_BIT, .port_num = MFC_NUM_PORTS_V8, .buf_size = &buf_size_v8, - .buf_align = &mfc_buf_align_v8, .fw_name[0] = "s5p-mfc-v8.fw", .clk_names = {"mfc"}, .num_clocks = 1, @@ -1535,7 +1515,6 @@ static int s5p_mfc_resume(struct device *dev) .version_bit = MFC_V8_BIT, .port_num = MFC_NUM_PORTS_V8, .buf_size = &buf_size_v8, - .buf_align = &mfc_buf_align_v8, .fw_name[0] = "s5p-mfc-v8.fw", .clk_names = {"pclk", "aclk", "aclk_xiu"}, .num_clocks = 3, diff --git a/drivers/media/platform/s5p-mfc/s5p_mfc_common.h b/drivers/media/platform/s5p-mfc/s5p_mfc_common.h index ab23236aa942..3e0e8eaf8bfe 100644 --- a/drivers/media/platform/s5p-mfc/s5p_mfc_common.h +++ b/drivers/media/platform/s5p-mfc/s5p_mfc_common.h @@ -44,14 +44,6 @@ #include -static inline dma_addr_t s5p_mfc_mem_cookie(void *a, void *b) -{ - /* Same functionality as the vb2_dma_contig_plane_paddr */ - dma_addr_t *paddr = vb2_dma_contig_memops.cookie(b); - - return *paddr; -} - /* MFC definitions */ #define MFC_MAX_EXTRA_DPB 5 #define MFC_MAX_BUFFERS 32 @@ -229,16 +221,11 @@ struct s5p_mfc_buf_size { void *priv; }; -struct s5p_mfc_buf_align { - unsigned int base; -}; - struct s5p_mfc_variant { unsigned int version; unsigned int port_num; u32 version_bit; struct s5p_mfc_buf_size *buf_size; - struct s5p_mfc_buf_align *buf_align; char *fw_name[MFC_FW_MAX_VERSIONS]; const char *clk_names[MFC_MAX_CLOCKS]; int num_clocks; diff --git a/drivers/media/platform/s5p-mfc/s5p_mfc_ctrl.h b/drivers/media/platform/s5p-mfc/s5p_mfc_ctrl.h index 8e5df041edf7..45c807bf19cc 100644 --- a/drivers/media/platform/s5p-mfc/s5p_mfc_ctrl.h +++ b/drivers/media/platform/s5p-mfc/s5p_mfc_ctrl.h @@ -18,7 +18,6 @@ int s5p_mfc_release_firmware(struct s5p_mfc_dev *dev); int s5p_mfc_alloc_firmware(struct s5p_mfc_dev *dev); int s5p_mfc_load_firmware(struct s5p_mfc_dev *dev); -int s5p_mfc_reload_firmware(struct s5p_mfc_dev *dev); int s5p_mfc_init_hw(struct s5p_mfc_dev *dev); void s5p_mfc_deinit_hw(struct s5p_mfc_dev *dev); From patchwork Mon Feb 20 13:38:56 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Szyprowski X-Patchwork-Id: 94219 Delivered-To: patch@linaro.org Received: by 10.140.20.99 with SMTP id 90csp1327226qgi; Mon, 20 Feb 2017 05:40:03 -0800 (PST) X-Received: by 10.98.157.12 with SMTP id i12mr13202694pfd.166.1487598003192; Mon, 20 Feb 2017 05:40:03 -0800 (PST) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d2si18592166pge.343.2017.02.20.05.40.02; Mon, 20 Feb 2017 05:40:03 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-samsung-soc-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-samsung-soc-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-samsung-soc-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753497AbdBTNkB (ORCPT + 4 others); Mon, 20 Feb 2017 08:40:01 -0500 Received: from mailout2.w1.samsung.com ([210.118.77.12]:21520 "EHLO mailout2.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753039AbdBTNjT (ORCPT ); Mon, 20 Feb 2017 08:39:19 -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 <0OLO0073HDXFZG50@mailout2.w1.samsung.com>; Mon, 20 Feb 2017 13:39:15 +0000 (GMT) Received: from eusmges2.samsung.com (unknown [203.254.199.241]) by eucas1p2.samsung.com (KnoxPortal) with ESMTP id 20170220133914eucas1p290861a6c28cc9b33b7b91566b029b264~lAnVN_keE0836008360eucas1p2u; Mon, 20 Feb 2017 13:39:14 +0000 (GMT) Received: from eucas1p1.samsung.com ( [182.198.249.206]) by eusmges2.samsung.com (EUCPMTA) with SMTP id 6D.98.30614.281FAA85; Mon, 20 Feb 2017 13:39:14 +0000 (GMT) Received: from eusmgms2.samsung.com (unknown [182.198.249.180]) by eucas1p1.samsung.com (KnoxPortal) with ESMTP id 20170220133914eucas1p1745bc1bb6a62938ed3cc6d9998bb0102~lAnUkuTtQ0281602816eucas1p1B; Mon, 20 Feb 2017 13:39:14 +0000 (GMT) X-AuditID: cbfec7f1-f793f6d000007796-09-58aaf182a646 Received: from eusync1.samsung.com ( [203.254.199.211]) by eusmgms2.samsung.com (EUCPMTA) with SMTP id A6.FA.10233.781FAA85; Mon, 20 Feb 2017 13:39:19 +0000 (GMT) Received: from AMDC2765.digital.local ([106.116.147.25]) by eusync1.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTPA id <0OLO00HBFDX6PK30@eusync1.samsung.com>; Mon, 20 Feb 2017 13:39:13 +0000 (GMT) From: Marek Szyprowski To: linux-media@vger.kernel.org, linux-samsung-soc@vger.kernel.org Cc: Marek Szyprowski , Sylwester Nawrocki , Andrzej Hajda , Krzysztof Kozlowski , Inki Dae , Seung-Woo Kim Subject: [PATCH v2 07/15] media: s5p-mfc: Put firmware to private buffer structure Date: Mon, 20 Feb 2017 14:38:56 +0100 Message-id: <1487597944-2000-8-git-send-email-m.szyprowski@samsung.com> X-Mailer: git-send-email 1.9.1 In-reply-to: <1487597944-2000-1-git-send-email-m.szyprowski@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFjrCIsWRmVeSWpSXmKPExsWy7djPc7pNH1dFGBw9LGdxa905VotJ9yew WJw/v4HdomfDVlaLGef3MVmsPXKX3eLwm3Ygd/JLNgcOj02rOtk8+rasYvT4vEkugDmKyyYl NSezLLVI3y6BK+Po/CmsBQvUK5Zf/M7awNiv2MXIySEhYCKx6uwXFghbTOLCvfVsXYxcHEIC SxklnrevYoJwPjNKfHy3mgWm49vJOcwQiWWMEjufLoVqaWCS+H3lKhNIFZuAoUTX2y42EFtE wEli4ay/7CBFzALfGSW+7T7NCpIQFgiR2Lp6EjuIzSKgKnHqZz9YA6+Au8TiswvZINbJSZw8 NhmonoODU8BDYkd7MsgcCYHXbBIP5m1lAolLCMhKbDrADFHuInF7wVFWCFtY4tXxLewQtozE 5cndUB/0M0o0tWpD2DMYJc695YWwrSUOH78I1ssswCcxadt0ZojxvBIdbUIQJR4Sz56tYYSw HSVWTfkKDaHZjBKnW2YzTWCUWcDIsIpRJLW0ODc9tdhIrzgxt7g0L10vOT93EyMwbk//O/5x B+P7E1aHGAU4GJV4eDVmrowQYk0sK67MPcQowcGsJMJ7+eWqCCHelMTKqtSi/Pii0pzU4kOM 0hwsSuK8exZcCRcSSE8sSc1OTS1ILYLJMnFwSjUwxmn5yu8wO7nd8p8y667vCSxOn1r+3Xm3 MmPt/zSJoJr1Zz7uXb4wq92I8+PPXtHJ12Mjt8zmEdBTk+T6K60SvvO4FY9nJF9cd/+KsKlr zpjJzby1LG3pjK4Jpyz3Htp2mP2lR6298appm5zu/r/0eFWJzbR81mWJ8/blsYWXCi/qWqIl c0f0iBJLcUaioRZzUXEiAKd59iHXAgAA X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFnrMLMWRmVeSWpSXmKPExsVy+t/xy7rtH1dFGPycrWBxa905VotJ9yew WJw/v4HdomfDVlaLGef3MVmsPXKX3eLwm3Ygd/JLNgcOj02rOtk8+rasYvT4vEkugDnKzSYj NTEltUghNS85PyUzL91WKTTETddCSSEvMTfVVilC1zckSEmhLDGnFMgzMkADDs4B7sFK+nYJ bhlH509hLVigXrH84nfWBsZ+xS5GTg4JAROJbyfnMEPYYhIX7q1n62Lk4hASWMIo8WTrTlYI p4lJYv2VXjaQKjYBQ4mut11gtoiAk8TCWX/ZQWxmge+MEstupoHYwgIhEltXTwKLswioSpz6 2Q9WzyvgLrH47EI2iG1yEiePTQZawMHBKeAhsaM9GSQsBFTy5Vkv0wRG3gWMDKsYRVJLi3PT c4uN9IoTc4tL89L1kvNzNzECA3jbsZ9bdjB2vQs+xCjAwajEw6sxc2WEEGtiWXFl7iFGCQ5m JRHeyy9XRQjxpiRWVqUW5ccXleakFh9iNAW6aSKzlGhyPjC68kriDU0MzS0NjYwtLMyNjJTE ead+uBIuJJCeWJKanZpakFoE08fEwSnVwGjU919torFfl6K1312OiU/ehV+8Zfy9ofadcd9p G3eBx2evN1Yc2q6xv84ySDbNmvHsGsMDSkLGE9VjdBlCL19nPcrXna7RYPvf+jDj9AnL3vT+ OnL3qN2Opbq6HY2bGv+zq4jFtMy5yJ/dqBtjuDr+9dXgL0vXrb81qWp++P3c35EPiv62z1Ni Kc5INNRiLipOBAAMJuL6dgIAAA== X-MTR: 20000000000000000@CPGS X-CMS-MailID: 20170220133914eucas1p1745bc1bb6a62938ed3cc6d9998bb0102 X-Msg-Generator: CA X-Sender-IP: 182.198.249.180 X-Local-Sender: =?utf-8?q?Marek_Szyprowski=1BSRPOL-Kernel_=28TP=29=1B?= =?utf-8?b?7IK87ISx7KCE7J6QG1NlbmlvciBTb2Z0d2FyZSBFbmdpbmVlcg==?= X-Global-Sender: =?utf-8?q?Marek_Szyprowski=1BSRPOL-Kernel_=28TP=29=1BSam?= =?utf-8?q?sung_Electronics=1BSenior_Software_Engineer?= X-Sender-Code: =?utf-8?q?C10=1BEHQ=1BC10CD02CD027392?= CMS-TYPE: 201P X-HopCount: 7 X-CMS-RootMailID: 20170220133914eucas1p1745bc1bb6a62938ed3cc6d9998bb0102 X-RootMTR: 20170220133914eucas1p1745bc1bb6a62938ed3cc6d9998bb0102 References: <1487597944-2000-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 Use s5p_mfc_priv_buf structure for keeping the firmware image. This will help handling of firmware buffer allocation in the next patches. Signed-off-by: Marek Szyprowski Reviewed-by: Javier Martinez Canillas Tested-by: Javier Martinez Canillas --- drivers/media/platform/s5p-mfc/s5p_mfc_cmd_v5.c | 2 +- drivers/media/platform/s5p-mfc/s5p_mfc_common.h | 3 +-- drivers/media/platform/s5p-mfc/s5p_mfc_ctrl.c | 36 ++++++++++++------------- 3 files changed, 20 insertions(+), 21 deletions(-) -- 1.9.1 -- To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" 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/s5p_mfc_cmd_v5.c b/drivers/media/platform/s5p-mfc/s5p_mfc_cmd_v5.c index 8c4739ca16d6..4c80bb4243be 100644 --- a/drivers/media/platform/s5p-mfc/s5p_mfc_cmd_v5.c +++ b/drivers/media/platform/s5p-mfc/s5p_mfc_cmd_v5.c @@ -47,7 +47,7 @@ static int s5p_mfc_sys_init_cmd_v5(struct s5p_mfc_dev *dev) struct s5p_mfc_cmd_args h2r_args; memset(&h2r_args, 0, sizeof(struct s5p_mfc_cmd_args)); - h2r_args.arg[0] = dev->fw_size; + h2r_args.arg[0] = dev->fw_buf.size; return s5p_mfc_cmd_host2risc_v5(dev, S5P_FIMV_H2R_CMD_SYS_INIT, &h2r_args); } diff --git a/drivers/media/platform/s5p-mfc/s5p_mfc_common.h b/drivers/media/platform/s5p-mfc/s5p_mfc_common.h index 9cf860f34c71..cea17a737ef7 100644 --- a/drivers/media/platform/s5p-mfc/s5p_mfc_common.h +++ b/drivers/media/platform/s5p-mfc/s5p_mfc_common.h @@ -314,8 +314,7 @@ struct s5p_mfc_dev { int int_type; unsigned int int_err; wait_queue_head_t queue; - size_t fw_size; - void *fw_virt_addr; + struct s5p_mfc_priv_buf fw_buf; dma_addr_t dma_base[BANK_CTX_NUM]; unsigned long hw_lock; struct s5p_mfc_ctx *ctx[MFC_NUM_CONTEXTS]; diff --git a/drivers/media/platform/s5p-mfc/s5p_mfc_ctrl.c b/drivers/media/platform/s5p-mfc/s5p_mfc_ctrl.c index c9bff3d0655f..50d698968049 100644 --- a/drivers/media/platform/s5p-mfc/s5p_mfc_ctrl.c +++ b/drivers/media/platform/s5p-mfc/s5p_mfc_ctrl.c @@ -29,21 +29,22 @@ int s5p_mfc_alloc_firmware(struct s5p_mfc_dev *dev) void *bank2_virt; dma_addr_t bank2_dma_addr; unsigned int align_size = 1 << MFC_BASE_ALIGN_ORDER; + struct s5p_mfc_priv_buf *fw_buf = &dev->fw_buf; - dev->fw_size = dev->variant->buf_size->fw; + fw_buf->size = dev->variant->buf_size->fw; - if (dev->fw_virt_addr) { + if (fw_buf->virt) { mfc_err("Attempting to allocate firmware when it seems that it is already loaded\n"); return -ENOMEM; } - dev->fw_virt_addr = dma_alloc_coherent(dev->mem_dev[BANK1_CTX], - dev->fw_size, &dev->dma_base[BANK1_CTX], - GFP_KERNEL); - if (!dev->fw_virt_addr) { + fw_buf->virt = dma_alloc_coherent(dev->mem_dev[BANK1_CTX], fw_buf->size, + &fw_buf->dma, GFP_KERNEL); + if (!fw_buf->virt) { mfc_err("Allocating bitprocessor buffer failed\n"); return -ENOMEM; } + dev->dma_base[BANK1_CTX] = fw_buf->dma; if (HAS_PORTNUM(dev) && IS_TWOPORT(dev)) { bank2_virt = dma_alloc_coherent(dev->mem_dev[BANK2_CTX], @@ -51,10 +52,9 @@ int s5p_mfc_alloc_firmware(struct s5p_mfc_dev *dev) if (!bank2_virt) { mfc_err("Allocating bank2 base failed\n"); - dma_free_coherent(dev->mem_dev[BANK1_CTX], dev->fw_size, - dev->fw_virt_addr, - dev->dma_base[BANK1_CTX]); - dev->fw_virt_addr = NULL; + dma_free_coherent(dev->mem_dev[BANK1_CTX], fw_buf->size, + fw_buf->virt, fw_buf->dma); + fw_buf->virt = NULL; return -ENOMEM; } @@ -101,17 +101,17 @@ int s5p_mfc_load_firmware(struct s5p_mfc_dev *dev) mfc_err("Firmware is not present in the /lib/firmware directory nor compiled in kernel\n"); return -EINVAL; } - if (fw_blob->size > dev->fw_size) { + if (fw_blob->size > dev->fw_buf.size) { mfc_err("MFC firmware is too big to be loaded\n"); release_firmware(fw_blob); return -ENOMEM; } - if (!dev->fw_virt_addr) { + if (!dev->fw_buf.virt) { mfc_err("MFC firmware is not allocated\n"); release_firmware(fw_blob); return -EINVAL; } - memcpy(dev->fw_virt_addr, fw_blob->data, fw_blob->size); + memcpy(dev->fw_buf.virt, fw_blob->data, fw_blob->size); wmb(); release_firmware(fw_blob); mfc_debug_leave(); @@ -123,11 +123,11 @@ int s5p_mfc_release_firmware(struct s5p_mfc_dev *dev) { /* Before calling this function one has to make sure * that MFC is no longer processing */ - if (!dev->fw_virt_addr) + if (!dev->fw_buf.virt) return -EINVAL; - dma_free_coherent(dev->mem_dev[BANK1_CTX], dev->fw_size, - dev->fw_virt_addr, dev->dma_base[BANK1_CTX]); - dev->fw_virt_addr = NULL; + dma_free_coherent(dev->mem_dev[BANK1_CTX], dev->fw_buf.size, + dev->fw_buf.virt, dev->fw_buf.dma); + dev->fw_buf.virt = NULL; return 0; } @@ -246,7 +246,7 @@ int s5p_mfc_init_hw(struct s5p_mfc_dev *dev) int ret; mfc_debug_enter(); - if (!dev->fw_virt_addr) { + if (!dev->fw_buf.virt) { mfc_err("Firmware memory is not allocated.\n"); return -EINVAL; } From patchwork Mon Feb 20 13:38:57 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Szyprowski X-Patchwork-Id: 94221 Delivered-To: patch@linaro.org Received: by 10.140.20.99 with SMTP id 90csp1327255qgi; Mon, 20 Feb 2017 05:40:08 -0800 (PST) X-Received: by 10.99.121.78 with SMTP id u75mr27603069pgc.202.1487598008082; Mon, 20 Feb 2017 05:40:08 -0800 (PST) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d2si18592166pge.343.2017.02.20.05.40.07; Mon, 20 Feb 2017 05:40:08 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-samsung-soc-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-samsung-soc-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-samsung-soc-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753465AbdBTNkD (ORCPT + 4 others); Mon, 20 Feb 2017 08:40:03 -0500 Received: from mailout4.w1.samsung.com ([210.118.77.14]:23438 "EHLO mailout4.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752871AbdBTNjS (ORCPT ); Mon, 20 Feb 2017 08:39:18 -0500 Received: from eucas1p1.samsung.com (unknown [182.198.249.206]) by mailout4.w1.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTP id <0OLO0084JDXFB150@mailout4.w1.samsung.com>; Mon, 20 Feb 2017 13:39:15 +0000 (GMT) Received: from eusmges3.samsung.com (unknown [203.254.199.242]) by eucas1p1.samsung.com (KnoxPortal) with ESMTP id 20170220133915eucas1p1887ca9b17c6db191451fcdc3dcae5c83~lAnVpCZ3_0280202802eucas1p1p; Mon, 20 Feb 2017 13:39:15 +0000 (GMT) Received: from eucas1p2.samsung.com ( [182.198.249.207]) by eusmges3.samsung.com (EUCPMTA) with SMTP id 10.F8.09557.281FAA85; Mon, 20 Feb 2017 13:39:14 +0000 (GMT) Received: from eusmgms2.samsung.com (unknown [182.198.249.180]) by eucas1p1.samsung.com (KnoxPortal) with ESMTP id 20170220133914eucas1p1ed7898e67e5d580742875aceaac278e6~lAnVER-OR3062830628eucas1p1X; Mon, 20 Feb 2017 13:39:14 +0000 (GMT) X-AuditID: cbfec7f2-f790f6d000002555-c7-58aaf182a707 Received: from eusync1.samsung.com ( [203.254.199.211]) by eusmgms2.samsung.com (EUCPMTA) with SMTP id 77.FA.10233.881FAA85; Mon, 20 Feb 2017 13:39:20 +0000 (GMT) Received: from AMDC2765.digital.local ([106.116.147.25]) by eusync1.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTPA id <0OLO00HBFDX6PK30@eusync1.samsung.com>; Mon, 20 Feb 2017 13:39:14 +0000 (GMT) From: Marek Szyprowski To: linux-media@vger.kernel.org, linux-samsung-soc@vger.kernel.org Cc: Marek Szyprowski , Sylwester Nawrocki , Andrzej Hajda , Krzysztof Kozlowski , Inki Dae , Seung-Woo Kim Subject: [PATCH v2 08/15] media: s5p-mfc: Move firmware allocation to DMA configure function Date: Mon, 20 Feb 2017 14:38:57 +0100 Message-id: <1487597944-2000-9-git-send-email-m.szyprowski@samsung.com> X-Mailer: git-send-email 1.9.1 In-reply-to: <1487597944-2000-1-git-send-email-m.szyprowski@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFjrIIsWRmVeSWpSXmKPExsWy7djP87pNH1dFGCy+Z2Vxa905VotJ9yew WJw/v4HdomfDVlaLGef3MVmsPXKX3eLwm3Ygd/JLNgcOj02rOtk8+rasYvT4vEkugDmKyyYl NSezLLVI3y6BK2P2Oo6C1aYVn9fuZ21gvKTTxcjJISFgItHY2MQIYYtJXLi3nq2LkYtDSGAp o8STfx+hnM+MEu2L17HCdFxYdB8qsYxR4tOfuywQTgOTxKfmT2wgVWwChhJdb7vAbBEBJ4mF s/6ygxQxC3xnlPi2+zTYKGGBOImNZ94DdXNwsAioSmyeYA1i8gq4S3y77wmxTE7i5LHJrCBh TgEPiR3tySBTJASes0kcO9nKBBKXEJCV2HSAGaLcRaLp4xooW1ji1fEt7BC2jMTlyd0sEHY/ o0RTqzaEPYNR4txbXgjbWuLw8YtghzEL8ElM2jadGWI8r0RHmxBEiYfEj55rTBC2o8SDyy3Q YJjNKHH3xCKWCYwyCxgZVjGKpJYW56anFhvrFSfmFpfmpesl5+duYgRG7Ol/xz/tYPx6wuoQ owAHoxIPr8bMlRFCrIllxZW5hxglOJiVRHgvv1wVIcSbklhZlVqUH19UmpNafIhRmoNFSZx3 z4Ir4UIC6YklqdmpqQWpRTBZJg5OqQZGyQ72h3tF32TUBRyY/1/s/OLnndn3Iq5G63UsyfrL xyitq2eiY5jtFituofimznxDxjTDiUq8nUqFT4QWWTcWB/9tK5ndaB3+L/hS97EQuX33Dxw9 3t53rGhtUmqAzLO+Jfr/V6Yp3cw1qfq9NevqCu3ms1kflyVd5jz+k3nBXC/zjSdemDEpsRRn JBpqMRcVJwIAvlmo3tQCAAA= X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFnrALMWRmVeSWpSXmKPExsVy+t/xy7odH1dFGPz7xGRxa905VotJ9yew WJw/v4HdomfDVlaLGef3MVmsPXKX3eLwm3Ygd/JLNgcOj02rOtk8+rasYvT4vEkugDnKzSYj NTEltUghNS85PyUzL91WKTTETddCSSEvMTfVVilC1zckSEmhLDGnFMgzMkADDs4B7sFK+nYJ bhmz13EUrDat+Lx2P2sD4yWdLkZODgkBE4kLi+6zQdhiEhfurQeyuTiEBJYwSnR9vs0K4TQx Sez80MwKUsUmYCjR9bYLrENEwEli4ay/7CA2s8B3RollN9NAbGGBOImNZ96zdDFycLAIqEps nmANYvIKuEt8u+8JsUtO4uSxyawgYU4BD4kd7ckgYSGgii/PepkmMPIuYGRYxSiSWlqcm55b bKRXnJhbXJqXrpecn7uJERi624793LKDsetd8CFGAQ5GJR5ejZkrI4RYE8uKK3MPMUpwMCuJ 8F5+uSpCiDclsbIqtSg/vqg0J7X4EKMp0EUTmaVEk/OBcZVXEm9oYmhuaWhkbGFhbmSkJM47 9cOVcCGB9MSS1OzU1ILUIpg+Jg5OqQbG4DR1nqiUL5oeN87fiWN/Kf5h/rR/KtN/Rdq/trdZ PJFdR8iejWty3LTwX8fD5JYtfbRk2jamjuL/xyR860U9dQ0OzulbHBL5/sU8Jqv1Sx77BS69 nJV4Puh5uw2n8RnXvozeJS+4rELFZle9bYr71c591aM/5o4+o5vuntIYu8Ylwh9aL+YosRRn JBpqMRcVJwIAK/BnmXMCAAA= X-MTR: 20000000000000000@CPGS X-CMS-MailID: 20170220133914eucas1p1ed7898e67e5d580742875aceaac278e6 X-Msg-Generator: CA X-Sender-IP: 182.198.249.180 X-Local-Sender: =?utf-8?q?Marek_Szyprowski=1BSRPOL-Kernel_=28TP=29=1B?= =?utf-8?b?7IK87ISx7KCE7J6QG1NlbmlvciBTb2Z0d2FyZSBFbmdpbmVlcg==?= X-Global-Sender: =?utf-8?q?Marek_Szyprowski=1BSRPOL-Kernel_=28TP=29=1BSam?= =?utf-8?q?sung_Electronics=1BSenior_Software_Engineer?= X-Sender-Code: =?utf-8?q?C10=1BEHQ=1BC10CD02CD027392?= CMS-TYPE: 201P X-HopCount: 7 X-CMS-RootMailID: 20170220133914eucas1p1ed7898e67e5d580742875aceaac278e6 X-RootMTR: 20170220133914eucas1p1ed7898e67e5d580742875aceaac278e6 References: <1487597944-2000-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 To complete DMA memory configuration for MFC device, allocation of the firmware buffer is needed, because some parameters are dependant on its base address. Till now, this has been handled in the s5p_mfc_alloc_firmware() function. This patch moves that logic to s5p_mfc_configure_dma_memory() to keep DMA memory related operations in a single place. This way s5p_mfc_alloc_firmware() is simplified and does what it name says. The other consequence of this change is moving s5p_mfc_alloc_firmware() call from the s5p_mfc_probe() function to the s5p_mfc_configure_dma_memory(). Signed-off-by: Marek Szyprowski --- drivers/media/platform/s5p-mfc/s5p_mfc.c | 62 +++++++++++++++++++++------ drivers/media/platform/s5p-mfc/s5p_mfc_ctrl.c | 31 -------------- 2 files changed, 49 insertions(+), 44 deletions(-) -- 1.9.1 -- To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Reviewed-by: Javier Martinez Canillas diff --git a/drivers/media/platform/s5p-mfc/s5p_mfc.c b/drivers/media/platform/s5p-mfc/s5p_mfc.c index bc1aeb25ebeb..4403487a494a 100644 --- a/drivers/media/platform/s5p-mfc/s5p_mfc.c +++ b/drivers/media/platform/s5p-mfc/s5p_mfc.c @@ -1110,6 +1110,11 @@ static struct device *s5p_mfc_alloc_memdev(struct device *dev, static int s5p_mfc_configure_dma_memory(struct s5p_mfc_dev *mfc_dev) { struct device *dev = &mfc_dev->plat_dev->dev; + void *bank2_virt; + dma_addr_t bank2_dma_addr; + unsigned long align_size = 1 << MFC_BASE_ALIGN_ORDER; + struct s5p_mfc_priv_buf *fw_buf = &mfc_dev->fw_buf; + int ret; /* * When IOMMU is available, we cannot use the default configuration, @@ -1122,14 +1127,21 @@ static int s5p_mfc_configure_dma_memory(struct s5p_mfc_dev *mfc_dev) if (exynos_is_iommu_available(dev)) { int ret = exynos_configure_iommu(dev, S5P_MFC_IOMMU_DMA_BASE, S5P_MFC_IOMMU_DMA_SIZE); - if (ret == 0) { - mfc_dev->mem_dev[BANK1_CTX] = - mfc_dev->mem_dev[BANK2_CTX] = dev; - vb2_dma_contig_set_max_seg_size(dev, - DMA_BIT_MASK(32)); + if (ret) + return ret; + + mfc_dev->mem_dev[BANK1_CTX] = mfc_dev->mem_dev[BANK2_CTX] = dev; + ret = s5p_mfc_alloc_firmware(mfc_dev); + if (ret) { + exynos_unconfigure_iommu(dev); + return ret; } - return ret; + mfc_dev->dma_base[BANK1_CTX] = fw_buf->dma; + mfc_dev->dma_base[BANK2_CTX] = fw_buf->dma; + vb2_dma_contig_set_max_seg_size(dev, DMA_BIT_MASK(32)); + + return 0; } /* @@ -1147,6 +1159,35 @@ static int s5p_mfc_configure_dma_memory(struct s5p_mfc_dev *mfc_dev) return -ENODEV; } + /* Allocate memory for firmware and initialize both banks addresses */ + ret = s5p_mfc_alloc_firmware(mfc_dev); + if (ret) { + device_unregister(mfc_dev->mem_dev[BANK2_CTX]); + device_unregister(mfc_dev->mem_dev[BANK1_CTX]); + return ret; + } + + mfc_dev->dma_base[BANK1_CTX] = fw_buf->dma; + + bank2_virt = dma_alloc_coherent(mfc_dev->mem_dev[BANK2_CTX], align_size, + &bank2_dma_addr, GFP_KERNEL); + if (!bank2_virt) { + mfc_err("Allocating bank2 base failed\n"); + s5p_mfc_release_firmware(mfc_dev); + device_unregister(mfc_dev->mem_dev[BANK2_CTX]); + device_unregister(mfc_dev->mem_dev[BANK1_CTX]); + return -ENOMEM; + } + + /* Valid buffers passed to MFC encoder with LAST_FRAME command + * should not have address of bank2 - MFC will treat it as a null frame. + * To avoid such situation we set bank2 address below the pool address. + */ + mfc_dev->dma_base[BANK2_CTX] = bank2_dma_addr - align_size; + + dma_free_coherent(mfc_dev->mem_dev[BANK2_CTX], align_size, bank2_virt, + bank2_dma_addr); + vb2_dma_contig_set_max_seg_size(mfc_dev->mem_dev[BANK1_CTX], DMA_BIT_MASK(32)); vb2_dma_contig_set_max_seg_size(mfc_dev->mem_dev[BANK2_CTX], @@ -1159,6 +1200,8 @@ static void s5p_mfc_unconfigure_dma_memory(struct s5p_mfc_dev *mfc_dev) { struct device *dev = &mfc_dev->plat_dev->dev; + s5p_mfc_release_firmware(mfc_dev); + if (exynos_is_iommu_available(dev)) { exynos_unconfigure_iommu(dev); vb2_dma_contig_clear_max_seg_size(dev); @@ -1235,10 +1278,6 @@ static int s5p_mfc_probe(struct platform_device *pdev) dev->watchdog_timer.data = (unsigned long)dev; dev->watchdog_timer.function = s5p_mfc_watchdog; - ret = s5p_mfc_alloc_firmware(dev); - if (ret) - goto err_res; - ret = v4l2_device_register(&pdev->dev, &dev->v4l2_dev); if (ret) goto err_v4l2_dev_reg; @@ -1313,8 +1352,6 @@ static int s5p_mfc_probe(struct platform_device *pdev) err_dec_alloc: v4l2_device_unregister(&dev->v4l2_dev); err_v4l2_dev_reg: - s5p_mfc_release_firmware(dev); -err_res: s5p_mfc_final_pm(dev); err_dma: s5p_mfc_unconfigure_dma_memory(dev); @@ -1356,7 +1393,6 @@ static int s5p_mfc_remove(struct platform_device *pdev) video_device_release(dev->vfd_enc); video_device_release(dev->vfd_dec); v4l2_device_unregister(&dev->v4l2_dev); - s5p_mfc_release_firmware(dev); s5p_mfc_unconfigure_dma_memory(dev); s5p_mfc_final_pm(dev); diff --git a/drivers/media/platform/s5p-mfc/s5p_mfc_ctrl.c b/drivers/media/platform/s5p-mfc/s5p_mfc_ctrl.c index 50d698968049..b0cf3970117a 100644 --- a/drivers/media/platform/s5p-mfc/s5p_mfc_ctrl.c +++ b/drivers/media/platform/s5p-mfc/s5p_mfc_ctrl.c @@ -26,9 +26,6 @@ /* Allocate memory for firmware */ int s5p_mfc_alloc_firmware(struct s5p_mfc_dev *dev) { - void *bank2_virt; - dma_addr_t bank2_dma_addr; - unsigned int align_size = 1 << MFC_BASE_ALIGN_ORDER; struct s5p_mfc_priv_buf *fw_buf = &dev->fw_buf; fw_buf->size = dev->variant->buf_size->fw; @@ -44,35 +41,7 @@ int s5p_mfc_alloc_firmware(struct s5p_mfc_dev *dev) mfc_err("Allocating bitprocessor buffer failed\n"); return -ENOMEM; } - dev->dma_base[BANK1_CTX] = fw_buf->dma; - - if (HAS_PORTNUM(dev) && IS_TWOPORT(dev)) { - bank2_virt = dma_alloc_coherent(dev->mem_dev[BANK2_CTX], - align_size, &bank2_dma_addr, GFP_KERNEL); - - if (!bank2_virt) { - mfc_err("Allocating bank2 base failed\n"); - dma_free_coherent(dev->mem_dev[BANK1_CTX], fw_buf->size, - fw_buf->virt, fw_buf->dma); - fw_buf->virt = NULL; - return -ENOMEM; - } - - /* Valid buffers passed to MFC encoder with LAST_FRAME command - * should not have address of bank2 - MFC will treat it as a null frame. - * To avoid such situation we set bank2 address below the pool address. - */ - dev->dma_base[BANK2_CTX] = bank2_dma_addr - align_size; - dma_free_coherent(dev->mem_dev[BANK2_CTX], align_size, - bank2_virt, bank2_dma_addr); - - } else { - /* In this case bank2 can point to the same address as bank1. - * Firmware will always occupy the beginning of this area so it is - * impossible having a video frame buffer with zero address. */ - dev->dma_base[BANK2_CTX] = dev->dma_base[BANK1_CTX]; - } return 0; } From patchwork Mon Feb 20 13:38:59 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Szyprowski X-Patchwork-Id: 94217 Delivered-To: patch@linaro.org Received: by 10.140.20.99 with SMTP id 90csp1327184qgi; Mon, 20 Feb 2017 05:39:58 -0800 (PST) X-Received: by 10.98.157.12 with SMTP id i12mr13202292pfd.166.1487597998400; Mon, 20 Feb 2017 05:39:58 -0800 (PST) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d2si18592166pge.343.2017.02.20.05.39.58; Mon, 20 Feb 2017 05:39:58 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-samsung-soc-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-samsung-soc-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-samsung-soc-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753400AbdBTNjy (ORCPT + 4 others); Mon, 20 Feb 2017 08:39:54 -0500 Received: from mailout3.w1.samsung.com ([210.118.77.13]:21852 "EHLO mailout3.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753257AbdBTNjV (ORCPT ); Mon, 20 Feb 2017 08:39:21 -0500 Received: from eucas1p2.samsung.com (unknown [182.198.249.207]) by mailout3.w1.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTP id <0OLO0082XDXG6950@mailout3.w1.samsung.com>; Mon, 20 Feb 2017 13:39:16 +0000 (GMT) Received: from eusmges2.samsung.com (unknown [203.254.199.241]) by eucas1p1.samsung.com (KnoxPortal) with ESMTP id 20170220133916eucas1p1498b09f7aed1b17ee2c41c2f9d30f92a~lAnWfjl9a0281102811eucas1p15; Mon, 20 Feb 2017 13:39:16 +0000 (GMT) Received: from eucas1p1.samsung.com ( [182.198.249.206]) by eusmges2.samsung.com (EUCPMTA) with SMTP id DE.98.30614.381FAA85; Mon, 20 Feb 2017 13:39:15 +0000 (GMT) Received: from eusmgms2.samsung.com (unknown [182.198.249.180]) by eucas1p1.samsung.com (KnoxPortal) with ESMTP id 20170220133915eucas1p11c62869bc2eff0b2d2e6a515a0941768~lAnV3nkvu0284402844eucas1p1j; Mon, 20 Feb 2017 13:39:15 +0000 (GMT) X-AuditID: cbfec7f1-f793f6d000007796-0d-58aaf183c445 Received: from eusync1.samsung.com ( [203.254.199.211]) by eusmgms2.samsung.com (EUCPMTA) with SMTP id D8.FA.10233.881FAA85; Mon, 20 Feb 2017 13:39:20 +0000 (GMT) Received: from AMDC2765.digital.local ([106.116.147.25]) by eusync1.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTPA id <0OLO00HBFDX6PK30@eusync1.samsung.com>; Mon, 20 Feb 2017 13:39:15 +0000 (GMT) From: Marek Szyprowski To: linux-media@vger.kernel.org, linux-samsung-soc@vger.kernel.org Cc: Marek Szyprowski , Sylwester Nawrocki , Andrzej Hajda , Krzysztof Kozlowski , Inki Dae , Seung-Woo Kim Subject: [PATCH v2 10/15] media: s5p-mfc: Reduce firmware buffer size for MFC v6+ variants Date: Mon, 20 Feb 2017 14:38:59 +0100 Message-id: <1487597944-2000-11-git-send-email-m.szyprowski@samsung.com> X-Mailer: git-send-email 1.9.1 In-reply-to: <1487597944-2000-1-git-send-email-m.szyprowski@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFjrEIsWRmVeSWpSXmKPExsWy7djPc7rNH1dFGLxbbmpxa905VotJ9yew WJw/v4HdomfDVlaLGef3MVmsPXKX3eLwm3Ygd/JLNgcOj02rOtk8+rasYvT4vEkugDmKyyYl NSezLLVI3y6BK2PN/FcsBQcEK/4t2sPcwPiBr4uRk0NCwERi45RTbBC2mMSFe+uBbC4OIYGl jBLHfy9nBEkICXxmlGicwg7TsOz/SxaIomWMEmff3oVyGpgkPj2ewAxSxSZgKNH1tgtsrIiA k8TCWX/ZQYqYBb4zSnzbfZq1i5GDQ1ggRuLqEQ+QGhYBVYmTl56BbeMV8JCYeWMKM8Q2OYmT xyaDlXMCxXe0J4OMkRB4zybR3X6YHSQuISArsekAVLmLxM/7EEdLCAhLvDq+BepoGYnLk7tZ IOx+RommVm0IewajxLm3vBC2tcTh4xdZQWxmAT6JSdumM0OM55XoaBOCKPGQ6Jp8B2qVo0Rv 5zF2iNdnM0p8332GZQKjzAJGhlWMIqmlxbnpqcVGesWJucWleel6yfm5mxiBMXv63/GPOxjf n7A6xCjAwajEw6sxc2WEEGtiWXFl7iFGCQ5mJRHeyy9XRQjxpiRWVqUW5ccXleakFh9ilOZg URLn3bPgSriQQHpiSWp2ampBahFMlomDU6qBcWd3OEv/3b8fzy9PS7rWcU/hVnJgxLmZnydK VhgsD9/MN6WH73hZ1ZbTqYvNROcJNzwslymI6r5wsn3FvkXxjOkRxjfV3pzpv7JtxYTdRjf4 zz/bdXrRr5frD2q+/ea/vD6y7ZCB1VK357JpBt8mBf/mutGUfMba+ttc5r8bW44u4Dn0d3KU 31wlluKMREMt5qLiRABrNVkO1QIAAA== X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFnrMLMWRmVeSWpSXmKPExsVy+t/xy7odH1dFGEz8b25xa905VotJ9yew WJw/v4HdomfDVlaLGef3MVmsPXKX3eLwm3Ygd/JLNgcOj02rOtk8+rasYvT4vEkugDnKzSYj NTEltUghNS85PyUzL91WKTTETddCSSEvMTfVVilC1zckSEmhLDGnFMgzMkADDs4B7sFK+nYJ bhlr5r9iKTggWPFv0R7mBsYPfF2MnBwSAiYSy/6/ZIGwxSQu3FvP1sXIxSEksIRRYn7LQXYI p4lJYsWs88wgVWwChhJdb7vYQGwRASeJhbP+soPYzALfGSWW3UwDsYUFYiTm3fwFNpVFQFXi 5KVnjCA2r4CHxMwbU5ghtslJnDw2mbWLkYODEyi+oz0ZJCwk4C7x5Vkv0wRG3gWMDKsYRVJL i3PTc4uN9IoTc4tL89L1kvNzNzECA3jbsZ9bdjB2vQs+xCjAwajEw6sxc2WEEGtiWXFl7iFG CQ5mJRHeyy9XRQjxpiRWVqUW5ccXleakFh9iNAW6aSKzlGhyPjC68kriDU0MzS0NjYwtLMyN jJTEead+uBIuJJCeWJKanZpakFoE08fEwSnVwCjf/2r+qajgJ/ws/U97Fx48wWp66lfHisyr rIu4N9zNnSYjdEzlokT7I63SM9s9F1v7+uifkLnPfzkt0zp64YVvIXEO5v9mZtWW94rdNGYQ ZlPw3vRt4o1+dgGdL0/CI+elLJvqLzKlxm//gWPr3vw/0Xvy7rRMv7rfz8JlZabZVZnfPPfB 85ASS3FGoqEWc1FxIgAr7XtgdgIAAA== X-MTR: 20000000000000000@CPGS X-CMS-MailID: 20170220133915eucas1p11c62869bc2eff0b2d2e6a515a0941768 X-Msg-Generator: CA X-Sender-IP: 182.198.249.180 X-Local-Sender: =?utf-8?q?Marek_Szyprowski=1BSRPOL-Kernel_=28TP=29=1B?= =?utf-8?b?7IK87ISx7KCE7J6QG1NlbmlvciBTb2Z0d2FyZSBFbmdpbmVlcg==?= X-Global-Sender: =?utf-8?q?Marek_Szyprowski=1BSRPOL-Kernel_=28TP=29=1BSam?= =?utf-8?q?sung_Electronics=1BSenior_Software_Engineer?= X-Sender-Code: =?utf-8?q?C10=1BEHQ=1BC10CD02CD027392?= CMS-TYPE: 201P X-HopCount: 7 X-CMS-RootMailID: 20170220133915eucas1p11c62869bc2eff0b2d2e6a515a0941768 X-RootMTR: 20170220133915eucas1p11c62869bc2eff0b2d2e6a515a0941768 References: <1487597944-2000-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 Firmware for MFC v6+ variants is not larger than 400 KiB, so there is no need to allocate a full 1 MiB buffer for it. Reduce it to 512 KiB to keep proper alignment of allocated buffer. Signed-off-by: Marek Szyprowski Reviewed-by: Javier Martinez Canillas --- drivers/media/platform/s5p-mfc/regs-mfc-v6.h | 2 +- drivers/media/platform/s5p-mfc/regs-mfc-v7.h | 2 +- drivers/media/platform/s5p-mfc/regs-mfc-v8.h | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) -- 1.9.1 -- To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" 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-v6.h b/drivers/media/platform/s5p-mfc/regs-mfc-v6.h index d2cd35916dc5..c0166ee9a455 100644 --- a/drivers/media/platform/s5p-mfc/regs-mfc-v6.h +++ b/drivers/media/platform/s5p-mfc/regs-mfc-v6.h @@ -403,7 +403,7 @@ #define MFC_OTHER_ENC_CTX_BUF_SIZE_V6 (12 * SZ_1K) /* 12KB */ /* MFCv6 variant defines */ -#define MAX_FW_SIZE_V6 (SZ_1M) /* 1MB */ +#define MAX_FW_SIZE_V6 (SZ_512K) /* 512KB */ #define MAX_CPB_SIZE_V6 (3 * SZ_1M) /* 3MB */ #define MFC_VERSION_V6 0x61 #define MFC_NUM_PORTS_V6 1 diff --git a/drivers/media/platform/s5p-mfc/regs-mfc-v7.h b/drivers/media/platform/s5p-mfc/regs-mfc-v7.h index 1a5c6fdf7846..9f220769d970 100644 --- a/drivers/media/platform/s5p-mfc/regs-mfc-v7.h +++ b/drivers/media/platform/s5p-mfc/regs-mfc-v7.h @@ -34,7 +34,7 @@ #define S5P_FIMV_E_VP8_NUM_T_LAYER_V7 0xfdc4 /* MFCv7 variant defines */ -#define MAX_FW_SIZE_V7 (SZ_1M) /* 1MB */ +#define MAX_FW_SIZE_V7 (SZ_512K) /* 512KB */ #define MAX_CPB_SIZE_V7 (3 * SZ_1M) /* 3MB */ #define MFC_VERSION_V7 0x72 #define MFC_NUM_PORTS_V7 1 diff --git a/drivers/media/platform/s5p-mfc/regs-mfc-v8.h b/drivers/media/platform/s5p-mfc/regs-mfc-v8.h index 4d1c3750eb5e..75f5f7511d72 100644 --- a/drivers/media/platform/s5p-mfc/regs-mfc-v8.h +++ b/drivers/media/platform/s5p-mfc/regs-mfc-v8.h @@ -116,7 +116,7 @@ #define S5P_FIMV_D_ALIGN_PLANE_SIZE_V8 64 /* MFCv8 variant defines */ -#define MAX_FW_SIZE_V8 (SZ_1M) /* 1MB */ +#define MAX_FW_SIZE_V8 (SZ_512K) /* 512KB */ #define MAX_CPB_SIZE_V8 (3 * SZ_1M) /* 3MB */ #define MFC_VERSION_V8 0x80 #define MFC_NUM_PORTS_V8 1 From patchwork Mon Feb 20 13:39:00 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Szyprowski X-Patchwork-Id: 94212 Delivered-To: patch@linaro.org Received: by 10.140.20.99 with SMTP id 90csp1327019qgi; Mon, 20 Feb 2017 05:39:34 -0800 (PST) X-Received: by 10.99.223.5 with SMTP id u5mr27646905pgg.58.1487597974247; Mon, 20 Feb 2017 05:39:34 -0800 (PST) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m39si161270plg.44.2017.02.20.05.39.34; Mon, 20 Feb 2017 05:39:34 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-samsung-soc-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-samsung-soc-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-samsung-soc-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753457AbdBTNj2 (ORCPT + 4 others); Mon, 20 Feb 2017 08:39:28 -0500 Received: from mailout3.w1.samsung.com ([210.118.77.13]:21852 "EHLO mailout3.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753272AbdBTNjW (ORCPT ); Mon, 20 Feb 2017 08:39:22 -0500 Received: from eucas1p1.samsung.com (unknown [182.198.249.206]) by mailout3.w1.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTP id <0OLO0080UDXHEX50@mailout3.w1.samsung.com>; Mon, 20 Feb 2017 13:39:17 +0000 (GMT) Received: from eusmges4.samsung.com (unknown [203.254.199.244]) by eucas1p2.samsung.com (KnoxPortal) with ESMTP id 20170220133916eucas1p266e819dcb8c9d1e177d1dd7930051202~lAnW9_7Ov2257522575eucas1p2-; Mon, 20 Feb 2017 13:39:16 +0000 (GMT) Received: from eucas1p2.samsung.com ( [182.198.249.207]) by eusmges4.samsung.com (EUCPMTA) with SMTP id BC.12.28517.481FAA85; Mon, 20 Feb 2017 13:39:16 +0000 (GMT) Received: from eusmgms2.samsung.com (unknown [182.198.249.180]) by eucas1p2.samsung.com (KnoxPortal) with ESMTP id 20170220133915eucas1p205f1ca5970e9e02411b8a1f1fb933244~lAnWT-RzN2257522575eucas1p2_; Mon, 20 Feb 2017 13:39:15 +0000 (GMT) X-AuditID: cbfec7f4-f79716d000006f65-81-58aaf184c29f Received: from eusync1.samsung.com ( [203.254.199.211]) by eusmgms2.samsung.com (EUCPMTA) with SMTP id E9.FA.10233.981FAA85; Mon, 20 Feb 2017 13:39:21 +0000 (GMT) Received: from AMDC2765.digital.local ([106.116.147.25]) by eusync1.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTPA id <0OLO00HBFDX6PK30@eusync1.samsung.com>; Mon, 20 Feb 2017 13:39:15 +0000 (GMT) From: Marek Szyprowski To: linux-media@vger.kernel.org, linux-samsung-soc@vger.kernel.org Cc: Marek Szyprowski , Sylwester Nawrocki , Andrzej Hajda , Krzysztof Kozlowski , Inki Dae , Seung-Woo Kim Subject: [PATCH v2 11/15] media: s5p-mfc: Split variant DMA memory configuration into separate functions Date: Mon, 20 Feb 2017 14:39:00 +0100 Message-id: <1487597944-2000-12-git-send-email-m.szyprowski@samsung.com> X-Mailer: git-send-email 1.9.1 In-reply-to: <1487597944-2000-1-git-send-email-m.szyprowski@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFjrEIsWRmVeSWpSXmKPExsWy7djP87otH1dFGCxvELe4te4cq8Wk+xNY LM6f38Bu0bNhK6vFjPP7mCzWHrnLbnH4TTuQO/klmwOHx6ZVnWwefVtWMXp83iQXwBzFZZOS mpNZllqkb5fAlfHu+E/2gp2aFefvX2drYJyh3MXIwSEhYCLxaKlIFyMnkCkmceHeerYuRi4O IYGljBKvpnxnhHA+M0o8ufaVDaLKROLg9LfMEIlljBIvVvZBVTUwSXx6PIEZpIpNwFCi620X WIeIgJPEwll/2UGKmAW+M0p8232aFSQhLJAlMf3FR7AGFgFViX9zjrOA2LwCHhKflsGsk5M4 eWwyK8itnEDxHe3JIHMkBF6zSRy83M0O8YOsxKYDzBCmi8SFgzYQncISr45vYYewZSQuT+5m gbD7GSWaWrUh7BmMEufe8kLY1hKHj18Eu4xZgE9i0rbpUCN5JTrahCBKgA54184KYTtKvH/w Bxpasxklnre9Z5nAKLOAkWEVo0hqaXFuemqxiV5xYm5xaV66XnJ+7iZGYMye/nf8yw7Gxces DjEKcDAq8fBqzFwZIcSaWFZcmXuIUYKDWUmE9/LLVRFCvCmJlVWpRfnxRaU5qcWHGKU5WJTE efcsuBIuJJCeWJKanZpakFoEk2Xi4JRqYGwtt+S+Nblx7ZVlN6ccWC7wyOjL2+vPBDW4ditN P9G1cUPb+x1mK1jP7HHq3fPIaGsWX3/xn82Zi9wLH3AFqhfsus7zrPlhkCDbOt/dF4pTpqQz xP7ML42pXcX235K521FcVvvN/H4vs0XKtmHqAvbT+aPvLOLabZY49fXBQ6dedt48UPJjm7wS S3FGoqEWc1FxIgB2eOeC1QIAAA== X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFnrMLMWRmVeSWpSXmKPExsVy+t/xy7qdH1dFGDS2ilvcWneO1WLS/Qks FufPb2C36NmwldVixvl9TBZrj9xltzj8ph3InfySzYHDY9OqTjaPvi2rGD0+b5ILYI5ys8lI TUxJLVJIzUvOT8nMS7dVCg1x07VQUshLzE21VYrQ9Q0JUlIoS8wpBfKMDNCAg3OAe7CSvl2C W8a74z/ZC3ZqVpy/f52tgXGGchcjJ4eEgInEwelvmSFsMYkL99azdTFycQgJLGGU2LK1kR3C aWKSWDHrPFgVm4ChRNfbLjYQW0TASWLhrL/sIDazwHdGiWU300BsYYEsiekvPoLVswioSvyb c5wFxOYV8JD4tOwrG8Q2OYmTxyazdjFycHACxXe0J4OEhQTcJb4862WawMi7gJFhFaNIamlx bnpusZFecWJucWleul5yfu4mRmAAbzv2c8sOxq53wYcYBTgYlXh4NWaujBBiTSwrrsw9xCjB wawkwnv55aoIId6UxMqq1KL8+KLSnNTiQ4ymQDdNZJYSTc4HRldeSbyhiaG5paGRsYWFuZGR kjjv1A9XwoUE0hNLUrNTUwtSi2D6mDg4pRoYOZe+CL+yk3nr39ipsYG1xyWlm4sm3TQ6zvOr +0rdpyWpEQ1tLtN3Bvht6P++JulbUPi7lzdiTwSX84rHLt/so/zXba78FY2WMKGVVy5uv8aj dOuX45e3QexZi2YUssgrq4TsmbP66f5FfZ4LGRjNV/+waGTSsL//8MzmyPV7jvXtN6taM6lM QImlOCPRUIu5qDgRAGAMo/J2AgAA X-MTR: 20000000000000000@CPGS X-CMS-MailID: 20170220133915eucas1p205f1ca5970e9e02411b8a1f1fb933244 X-Msg-Generator: CA X-Sender-IP: 182.198.249.180 X-Local-Sender: =?utf-8?q?Marek_Szyprowski=1BSRPOL-Kernel_=28TP=29=1B?= =?utf-8?b?7IK87ISx7KCE7J6QG1NlbmlvciBTb2Z0d2FyZSBFbmdpbmVlcg==?= X-Global-Sender: =?utf-8?q?Marek_Szyprowski=1BSRPOL-Kernel_=28TP=29=1BSam?= =?utf-8?q?sung_Electronics=1BSenior_Software_Engineer?= X-Sender-Code: =?utf-8?q?C10=1BEHQ=1BC10CD02CD027392?= CMS-TYPE: 201P X-HopCount: 7 X-CMS-RootMailID: 20170220133915eucas1p205f1ca5970e9e02411b8a1f1fb933244 X-RootMTR: 20170220133915eucas1p205f1ca5970e9e02411b8a1f1fb933244 References: <1487597944-2000-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 Move code for DMA memory configuration with IOMMU into separate function to make it easier to compare what is being done in each case. Signed-off-by: Marek Szyprowski Reviewed-by: Javier Martinez Canillas Tested-by: Javier Martinez Canillas --- drivers/media/platform/s5p-mfc/s5p_mfc.c | 102 ++++++++++++++++++------------- 1 file changed, 61 insertions(+), 41 deletions(-) -- 1.9.1 -- To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" 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/s5p_mfc.c b/drivers/media/platform/s5p-mfc/s5p_mfc.c index 4403487a494a..04067bcc3feb 100644 --- a/drivers/media/platform/s5p-mfc/s5p_mfc.c +++ b/drivers/media/platform/s5p-mfc/s5p_mfc.c @@ -1107,44 +1107,15 @@ static struct device *s5p_mfc_alloc_memdev(struct device *dev, return NULL; } -static int s5p_mfc_configure_dma_memory(struct s5p_mfc_dev *mfc_dev) +static int s5p_mfc_configure_2port_memory(struct s5p_mfc_dev *mfc_dev) { struct device *dev = &mfc_dev->plat_dev->dev; void *bank2_virt; dma_addr_t bank2_dma_addr; unsigned long align_size = 1 << MFC_BASE_ALIGN_ORDER; - struct s5p_mfc_priv_buf *fw_buf = &mfc_dev->fw_buf; int ret; /* - * When IOMMU is available, we cannot use the default configuration, - * because of MFC firmware requirements: address space limited to - * 256M and non-zero default start address. - * This is still simplified, not optimal configuration, but for now - * IOMMU core doesn't allow to configure device's IOMMUs channel - * separately. - */ - if (exynos_is_iommu_available(dev)) { - int ret = exynos_configure_iommu(dev, S5P_MFC_IOMMU_DMA_BASE, - S5P_MFC_IOMMU_DMA_SIZE); - if (ret) - return ret; - - mfc_dev->mem_dev[BANK1_CTX] = mfc_dev->mem_dev[BANK2_CTX] = dev; - ret = s5p_mfc_alloc_firmware(mfc_dev); - if (ret) { - exynos_unconfigure_iommu(dev); - return ret; - } - - mfc_dev->dma_base[BANK1_CTX] = fw_buf->dma; - mfc_dev->dma_base[BANK2_CTX] = fw_buf->dma; - vb2_dma_contig_set_max_seg_size(dev, DMA_BIT_MASK(32)); - - return 0; - } - - /* * Create and initialize virtual devices for accessing * reserved memory regions. */ @@ -1167,7 +1138,7 @@ static int s5p_mfc_configure_dma_memory(struct s5p_mfc_dev *mfc_dev) return ret; } - mfc_dev->dma_base[BANK1_CTX] = fw_buf->dma; + mfc_dev->dma_base[BANK1_CTX] = mfc_dev->fw_buf.dma; bank2_virt = dma_alloc_coherent(mfc_dev->mem_dev[BANK2_CTX], align_size, &bank2_dma_addr, GFP_KERNEL); @@ -1196,22 +1167,71 @@ static int s5p_mfc_configure_dma_memory(struct s5p_mfc_dev *mfc_dev) return 0; } -static void s5p_mfc_unconfigure_dma_memory(struct s5p_mfc_dev *mfc_dev) +static void s5p_mfc_unconfigure_2port_memory(struct s5p_mfc_dev *mfc_dev) { - struct device *dev = &mfc_dev->plat_dev->dev; + device_unregister(mfc_dev->mem_dev[BANK1_CTX]); + device_unregister(mfc_dev->mem_dev[BANK2_CTX]); + vb2_dma_contig_clear_max_seg_size(mfc_dev->mem_dev[BANK1_CTX]); + vb2_dma_contig_clear_max_seg_size(mfc_dev->mem_dev[BANK2_CTX]); +} - s5p_mfc_release_firmware(mfc_dev); +static int s5p_mfc_configure_common_memory(struct s5p_mfc_dev *mfc_dev) +{ + struct device *dev = &mfc_dev->plat_dev->dev; + /* + * When IOMMU is available, we cannot use the default configuration, + * because of MFC firmware requirements: address space limited to + * 256M and non-zero default start address. + * This is still simplified, not optimal configuration, but for now + * IOMMU core doesn't allow to configure device's IOMMUs channel + * separately. + */ + int ret = exynos_configure_iommu(dev, S5P_MFC_IOMMU_DMA_BASE, + S5P_MFC_IOMMU_DMA_SIZE); + if (ret) + return ret; - if (exynos_is_iommu_available(dev)) { + mfc_dev->mem_dev[BANK1_CTX] = mfc_dev->mem_dev[BANK2_CTX] = dev; + ret = s5p_mfc_alloc_firmware(mfc_dev); + if (ret) { exynos_unconfigure_iommu(dev); - vb2_dma_contig_clear_max_seg_size(dev); - return; + return ret; } - device_unregister(mfc_dev->mem_dev[BANK1_CTX]); - device_unregister(mfc_dev->mem_dev[BANK2_CTX]); - vb2_dma_contig_clear_max_seg_size(mfc_dev->mem_dev[BANK1_CTX]); - vb2_dma_contig_clear_max_seg_size(mfc_dev->mem_dev[BANK2_CTX]); + mfc_dev->dma_base[BANK1_CTX] = mfc_dev->fw_buf.dma; + mfc_dev->dma_base[BANK2_CTX] = mfc_dev->fw_buf.dma; + vb2_dma_contig_set_max_seg_size(dev, DMA_BIT_MASK(32)); + + return 0; +} + +static void s5p_mfc_unconfigure_common_memory(struct s5p_mfc_dev *mfc_dev) +{ + struct device *dev = &mfc_dev->plat_dev->dev; + + exynos_unconfigure_iommu(dev); + vb2_dma_contig_clear_max_seg_size(dev); +} + +static int s5p_mfc_configure_dma_memory(struct s5p_mfc_dev *mfc_dev) +{ + struct device *dev = &mfc_dev->plat_dev->dev; + + if (exynos_is_iommu_available(dev)) + return s5p_mfc_configure_common_memory(mfc_dev); + else + return s5p_mfc_configure_2port_memory(mfc_dev); +} + +static void s5p_mfc_unconfigure_dma_memory(struct s5p_mfc_dev *mfc_dev) +{ + struct device *dev = &mfc_dev->plat_dev->dev; + + s5p_mfc_release_firmware(mfc_dev); + if (exynos_is_iommu_available(dev)) + s5p_mfc_unconfigure_common_memory(mfc_dev); + else + s5p_mfc_unconfigure_2port_memory(mfc_dev); } /* MFC probe function */ From patchwork Mon Feb 20 13:39:03 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Szyprowski X-Patchwork-Id: 94218 Delivered-To: patch@linaro.org Received: by 10.140.20.99 with SMTP id 90csp1327188qgi; Mon, 20 Feb 2017 05:39:58 -0800 (PST) X-Received: by 10.98.88.133 with SMTP id m127mr26253477pfb.155.1487597998880; Mon, 20 Feb 2017 05:39:58 -0800 (PST) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d2si18592166pge.343.2017.02.20.05.39.58; Mon, 20 Feb 2017 05:39:58 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-samsung-soc-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-samsung-soc-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-samsung-soc-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753257AbdBTNjz (ORCPT + 4 others); Mon, 20 Feb 2017 08:39:55 -0500 Received: from mailout2.w1.samsung.com ([210.118.77.12]:21520 "EHLO mailout2.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752520AbdBTNjU (ORCPT ); Mon, 20 Feb 2017 08:39:20 -0500 Received: from eucas1p2.samsung.com (unknown [182.198.249.207]) by mailout2.w1.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTP id <0OLO00755DXIG950@mailout2.w1.samsung.com>; Mon, 20 Feb 2017 13:39:18 +0000 (GMT) Received: from eusmges4.samsung.com (unknown [203.254.199.244]) by eucas1p1.samsung.com (KnoxPortal) with ESMTP id 20170220133918eucas1p108ac054d17050ad259433a3872fec8db~lAnYXi5x40282402824eucas1p1S; Mon, 20 Feb 2017 13:39:18 +0000 (GMT) Received: from eucas1p2.samsung.com ( [182.198.249.207]) by eusmges4.samsung.com (EUCPMTA) with SMTP id 8D.12.28517.581FAA85; Mon, 20 Feb 2017 13:39:17 +0000 (GMT) Received: from eusmgms2.samsung.com (unknown [182.198.249.180]) by eucas1p2.samsung.com (KnoxPortal) with ESMTP id 20170220133917eucas1p2f141e73392ee36596410ce308360a5d7~lAnXjnOoJ0833608336eucas1p20; Mon, 20 Feb 2017 13:39:17 +0000 (GMT) X-AuditID: cbfec7f4-f79716d000006f65-84-58aaf185449e Received: from eusync1.samsung.com ( [203.254.199.211]) by eusmgms2.samsung.com (EUCPMTA) with SMTP id 7C.FA.10233.A81FAA85; Mon, 20 Feb 2017 13:39:22 +0000 (GMT) Received: from AMDC2765.digital.local ([106.116.147.25]) by eusync1.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTPA id <0OLO00HBFDX6PK30@eusync1.samsung.com>; Mon, 20 Feb 2017 13:39:16 +0000 (GMT) From: Marek Szyprowski To: linux-media@vger.kernel.org, linux-samsung-soc@vger.kernel.org Cc: Marek Szyprowski , Sylwester Nawrocki , Andrzej Hajda , Krzysztof Kozlowski , Inki Dae , Seung-Woo Kim Subject: [PATCH v2 14/15] media: s5p-mfc: Use preallocated block allocator always for MFC v6+ Date: Mon, 20 Feb 2017 14:39:03 +0100 Message-id: <1487597944-2000-15-git-send-email-m.szyprowski@samsung.com> X-Mailer: git-send-email 1.9.1 In-reply-to: <1487597944-2000-1-git-send-email-m.szyprowski@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAAzWRb0gTcRjH/e1ut9twdZxiD2ZGA0GSloIvVopUFi3wRb1yBDkPPablVHbO MjFEMnVF6hZNTckQ/3SgyVxqJUtn3YjZlhoJVvYiqDTFRFG0lHZdvvs8f77f5/vjR2L0GB5N 5heWsJZCpkBDqPBBYTN4pHqFNyS2jMbrZvsCcp39SwOuCwb7Fbo7/U/luqagR6brffVZoRtf rAmVjnniBKl38XWE/q6bR/pVV+x57KIqNZctyC9lLUfTslV5Hu86UbwVc23yWydRiQJgQyQJ VDJseI/ZkDKEUfBu7glhQyqSpjoRjP4WZFKxiqCjZxztCnZqD0n9LgRD9buKShkM+P0K0Yqg ksC2ZCNEjqROwaOWbYW4hFEbCNZf+OXiIIIyQlfvIhIZp+JACA5hIqspPfC2h4SUKRbeCA65 eFkZ6g/X5Ig+QC0TMNXzA5cSHQDXKCbhaXCvWCVlBCz43AqJY2DacRuXuB5BVXWCxE0IAktq iVNg3Df5LxlG7QH7oPO/pRpqb9HSih56BnwyiU9Cs/ceLj39AYKJtQBqQDHtKIxHkayVM5tY LlnLMWbOWmjS5hSZXSj0sf4d39ow6hCOexFFIk24Or75sYGWM6VcmdmLgMQ0kerped5Aq3OZ suuspchosRawnBftJ3HNPvVI+/tMmjIxJewVli1mLbtTGamMrkT0Wb618dLPqVxWmXrwAu3c O3LGkOos9xBzE5qUKPfNnD5LRcmzD63mYZTVVqptYheyu+0Zmwv3y+Mc57YTvrNZYQOqP5nb yvDuipc3TJe1s22eBHNzlOxXxUz31/SNty1DV9PKEpc/GjOErrqxGWG1scppf01t0eke4/Ot Txqcy2OSDmMWjvkL7kS4xdQCAAA= X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFnrELMWRmVeSWpSXmKPExsVy+t/xy7pdH1dFGJzaoWNxa905VotJ9yew WJw/v4HdomfDVlaLGef3MVmsPXKX3eLwm3Ygd/JLNgcOj02rOtk8+rasYvT4vEkugDnKzSYj NTEltUghNS85PyUzL91WKTTETddCSSEvMTfVVilC1zckSEmhLDGnFMgzMkADDs4B7sFK+nYJ bhn7Dn1jK/glU3Hx2VK2BsZzEl2MHBwSAiYS/zoUuxg5gUwxiQv31rN1MXJxCAksYZRoPP6T GcJpYpJ4v/AqC0gVm4ChRNfbLjYQW0TASWLhrL/sIDazwHdGiWU300BsYYF4iWVr3zCC2CwC qhLHzm9nBrF5BTwkVnXNZ4PYJidx8thkVpAjOIHiO9qTQcJCAu4SX571Mk1g5F3AyLCKUSS1 tDg3PbfYSK84Mbe4NC9dLzk/dxMjMHy3Hfu5ZQdj17vgQ4wCHIxKPLwaM1dGCLEmlhVX5h5i lOBgVhLhvfxyVYQQb0piZVVqUX58UWlOavEhRlOgmyYyS4km5wNjK68k3tDE0NzS0MjYwsLc yEhJnHfqhyvhQgLpiSWp2ampBalFMH1MHJxSDYwzlkpd/Knm2+NuGHHjLfPXjNXNE0+YLp4a c2ihw/VQ821XePWz7QQOujz6e4e312Z7XbbCjocLjfY62EcwMVbqTD+UwCt/W4P9rbzjylXf +ROnSmpHls54/05bfvV/98+NhySirudIz0qaF3+z86RUTc5t9j3Hsrb2/20M/ZqdWnRo8atd WSeUWIozEg21mIuKEwH9bWEndQIAAA== X-MTR: 20000000000000000@CPGS X-CMS-MailID: 20170220133917eucas1p2f141e73392ee36596410ce308360a5d7 X-Msg-Generator: CA X-Sender-IP: 182.198.249.180 X-Local-Sender: =?utf-8?q?Marek_Szyprowski=1BSRPOL-Kernel_=28TP=29=1B?= =?utf-8?b?7IK87ISx7KCE7J6QG1NlbmlvciBTb2Z0d2FyZSBFbmdpbmVlcg==?= X-Global-Sender: =?utf-8?q?Marek_Szyprowski=1BSRPOL-Kernel_=28TP=29=1BSam?= =?utf-8?q?sung_Electronics=1BSenior_Software_Engineer?= X-Sender-Code: =?utf-8?q?C10=1BEHQ=1BC10CD02CD027392?= CMS-TYPE: 201P X-HopCount: 7 X-CMS-RootMailID: 20170220133917eucas1p2f141e73392ee36596410ce308360a5d7 X-RootMTR: 20170220133917eucas1p2f141e73392ee36596410ce308360a5d7 References: <1487597944-2000-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 It turned out that all versions of MFC v6+ hardware doesn't have a strict requirement for ALL buffers to be allocated on higher addresses than the firmware base like it was documented for MFC v5. This requirement is true only for the device and per-context buffers. All video data buffers can be allocated anywhere for all MFC v6+ versions. Basing on this fact, the special DMA configuration based on two reserved memory regions is not really needed for MFC v6+ devices, because the memory requirements for the firmware, device and per-context buffers can be fulfilled by the simple probe-time pre-allocated block allocator instroduced in previous patch. This patch enables support for such pre-allocated block based allocator always for MFC v6+ devices. Due to the limitations of the memory management subsystem the largest supported size of the pre-allocated buffer when no CMA (Contiguous Memory Allocator) is enabled is 4MiB. This patch also removes the requirement to provide two reserved memory regions for MFC v6+ devices in device tree. Now the driver is fully functional without them. Signed-off-by: Marek Szyprowski Reviewed-by: Javier Martinez Canillas Tested-by: Javier Martinez Canillas --- Documentation/devicetree/bindings/media/s5p-mfc.txt | 2 +- drivers/media/platform/s5p-mfc/s5p_mfc.c | 9 ++++++--- 2 files changed, 7 insertions(+), 4 deletions(-) -- 1.9.1 -- To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" 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/Documentation/devicetree/bindings/media/s5p-mfc.txt b/Documentation/devicetree/bindings/media/s5p-mfc.txt index 2c901286d818..d3404b5d4d17 100644 --- a/Documentation/devicetree/bindings/media/s5p-mfc.txt +++ b/Documentation/devicetree/bindings/media/s5p-mfc.txt @@ -28,7 +28,7 @@ Optional properties: - memory-region : from reserved memory binding: phandles to two reserved memory regions, first is for "left" mfc memory bus interfaces, second if for the "right" mfc memory bus, used when no SYSMMU - support is available + support is available; used only by MFC v5 present in Exynos4 SoCs Obsolete properties: - samsung,mfc-r, samsung,mfc-l : support removed, please use memory-region diff --git a/drivers/media/platform/s5p-mfc/s5p_mfc.c b/drivers/media/platform/s5p-mfc/s5p_mfc.c index b70cbd637851..b4a13e4cc9d4 100644 --- a/drivers/media/platform/s5p-mfc/s5p_mfc.c +++ b/drivers/media/platform/s5p-mfc/s5p_mfc.c @@ -1182,9 +1182,12 @@ static void s5p_mfc_unconfigure_2port_memory(struct s5p_mfc_dev *mfc_dev) static int s5p_mfc_configure_common_memory(struct s5p_mfc_dev *mfc_dev) { struct device *dev = &mfc_dev->plat_dev->dev; - unsigned long mem_size = SZ_8M; + unsigned long mem_size = SZ_4M; unsigned int bitmap_size; + if (IS_ENABLED(CONFIG_DMA_CMA) || exynos_is_iommu_available(dev)) + mem_size = SZ_8M; + if (mfc_mem_size) mem_size = memparse(mfc_mem_size, NULL); @@ -1244,7 +1247,7 @@ static int s5p_mfc_configure_dma_memory(struct s5p_mfc_dev *mfc_dev) { struct device *dev = &mfc_dev->plat_dev->dev; - if (exynos_is_iommu_available(dev)) + if (exynos_is_iommu_available(dev) || !IS_TWOPORT(mfc_dev)) return s5p_mfc_configure_common_memory(mfc_dev); else return s5p_mfc_configure_2port_memory(mfc_dev); @@ -1255,7 +1258,7 @@ static void s5p_mfc_unconfigure_dma_memory(struct s5p_mfc_dev *mfc_dev) struct device *dev = &mfc_dev->plat_dev->dev; s5p_mfc_release_firmware(mfc_dev); - if (exynos_is_iommu_available(dev)) + if (exynos_is_iommu_available(dev) || !IS_TWOPORT(mfc_dev)) s5p_mfc_unconfigure_common_memory(mfc_dev); else s5p_mfc_unconfigure_2port_memory(mfc_dev); From patchwork Mon Feb 20 13:39:04 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Szyprowski X-Patchwork-Id: 94216 Delivered-To: patch@linaro.org Received: by 10.140.20.99 with SMTP id 90csp1327172qgi; Mon, 20 Feb 2017 05:39:57 -0800 (PST) X-Received: by 10.84.197.3 with SMTP id m3mr31530582pld.89.1487597997366; Mon, 20 Feb 2017 05:39:57 -0800 (PST) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d2si18592166pge.343.2017.02.20.05.39.57; Mon, 20 Feb 2017 05:39:57 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-samsung-soc-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-samsung-soc-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-samsung-soc-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752707AbdBTNju (ORCPT + 4 others); Mon, 20 Feb 2017 08:39:50 -0500 Received: from mailout4.w1.samsung.com ([210.118.77.14]:23438 "EHLO mailout4.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753278AbdBTNjW (ORCPT ); Mon, 20 Feb 2017 08:39:22 -0500 Received: from eucas1p1.samsung.com (unknown [182.198.249.206]) by mailout4.w1.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTP id <0OLO0084NDXIB150@mailout4.w1.samsung.com>; Mon, 20 Feb 2017 13:39:18 +0000 (GMT) Received: from eusmges3.samsung.com (unknown [203.254.199.242]) by eucas1p2.samsung.com (KnoxPortal) with ESMTP id 20170220133918eucas1p2a1251657267dc1f7532a2a98a395a44a~lAnYcELwc0821808218eucas1p2A; Mon, 20 Feb 2017 13:39:18 +0000 (GMT) Received: from eucas1p1.samsung.com ( [182.198.249.206]) by eusmges3.samsung.com (EUCPMTA) with SMTP id 81.F8.09557.581FAA85; Mon, 20 Feb 2017 13:39:17 +0000 (GMT) Received: from eusmgms1.samsung.com (unknown [182.198.249.179]) by eucas1p1.samsung.com (KnoxPortal) with ESMTP id 20170220133917eucas1p1e5c6106b0d479c4571966fcc2c601c22~lAnXznduj3273832738eucas1p1A; Mon, 20 Feb 2017 13:39:17 +0000 (GMT) X-AuditID: cbfec7f2-f790f6d000002555-cd-58aaf185c212 Received: from eusync1.samsung.com ( [203.254.199.211]) by eusmgms1.samsung.com (EUCPMTA) with SMTP id 70.F7.06687.9D1FAA85; Mon, 20 Feb 2017 13:40:41 +0000 (GMT) Received: from AMDC2765.digital.local ([106.116.147.25]) by eusync1.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTPA id <0OLO00HBFDX6PK30@eusync1.samsung.com>; Mon, 20 Feb 2017 13:39:17 +0000 (GMT) From: Marek Szyprowski To: linux-media@vger.kernel.org, linux-samsung-soc@vger.kernel.org Cc: Marek Szyprowski , Sylwester Nawrocki , Andrzej Hajda , Krzysztof Kozlowski , Inki Dae , Seung-Woo Kim Subject: [PATCH v2 15/15] ARM: dts: exynos: Remove MFC reserved buffers Date: Mon, 20 Feb 2017 14:39:04 +0100 Message-id: <1487597944-2000-16-git-send-email-m.szyprowski@samsung.com> X-Mailer: git-send-email 1.9.1 In-reply-to: <1487597944-2000-1-git-send-email-m.szyprowski@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFjrCIsWRmVeSWpSXmKPExsWy7djPc7qtH1dFGKxbZmVxa905VotJ9yew WJw/v4HdomfDVlaLGef3MVmsPXKX3eLwm3Ygd/JLNgcOj02rOtk8+rasYvT4vEkugDmKyyYl NSezLLVI3y6BK+P+jZksBRvUK9rXv2JvYFyl1MXIySEhYCIx62IvG4QtJnHh3nogm4tDSGAp o8T5C4tYIZzPjBLf7qxmgeloOfqcBSKxjFHi+r5vjBBOA5PE9osNzCBVbAKGEl1vu8Dmigg4 SSyc9ZcdpIhZ4DvQqN2nWUESwgLuElf+rwdrYBFQlfh7tRusgVfAQ+Lw1NNQR8lJnDw2Gaie g4MTKL6jPRlkjoTAazaJ09/ngMUlBGQlNh1ghih3kdi0ZiqULSzx6vgWdghbRqKz4yAThN3P KNHUqg1hz2CUOPeWF8K2ljh8/CLYacwCfBKTtk1nhhjPK9HRJgRR4iGxbcYNqMscJS5N2w31 +2xGif3PFjFNYJRZwMiwilEktbQ4Nz212FivODG3uDQvXS85P3cTIzBuT/87/mkH49cTVocY BTgYlXh4NWaujBBiTSwrrsw9xCjBwawkwnv55aoIId6UxMqq1KL8+KLSnNTiQ4zSHCxK4rx7 FlwJFxJITyxJzU5NLUgtgskycXBKNTAK2n7l4XmmmlXiOHFnyQeB5AlPpC9tuNXI3Gj19GnM 6rmS035P0fwi4RgUpb6h/s0/lmcF2t9mNjIsvvN57bbfFamhv+NLFnivt7JdJL71SZFZdFNX dYBAfQND52dmgaKk+EXvH5zxOVgo9VdRMVjE+Y7FHtZYa5cZEyxmTT91rd7zzD79E9+VWIoz Eg21mIuKEwHATgG91wIAAA== X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFnrMLMWRmVeSWpSXmKPExsVy+t/xy7o3P66KMPh6Tsri1rpzrBaT7k9g sTh/fgO7Rc+GrawWM87vY7JYe+Quu8XhN+1A7uSXbA4cHptWdbJ59G1ZxejxeZNcAHOUm01G amJKapFCal5yfkpmXrqtUmiIm66FkkJeYm6qrVKErm9IkJJCWWJOKZBnZIAGHJwD3IOV9O0S 3DLu35jJUrBBvaJ9/Sv2BsZVSl2MnBwSAiYSLUefs0DYYhIX7q1n62Lk4hASWMIoMb+njQXC aWKSuLh4NStIFZuAoUTX2y42EFtEwEli4ay/7CA2s8B3RollN9NAbGEBd4kr/9czg9gsAqoS f692g9XzCnhIHJ56mg1im5zEyWOTgWZycHACxXe0J4OEhYBavzzrZZrAyLuAkWEVo0hqaXFu em6xoV5xYm5xaV66XnJ+7iZGYABvO/Zz8w7GSxuDDzEKcDAq8fBqzFwZIcSaWFZcmXuIUYKD WUmE9/LLVRFCvCmJlVWpRfnxRaU5qcWHGE2BbprILCWanA+MrrySeEMTQ3NLQyNjCwtzIyMl cd6SD1fChQTSE0tSs1NTC1KLYPqYODilGhjDH79bdtzbZYL8EvMukYItqetnPJvb/iTuXUeI xLzJ62TiD3LV8gY1zj4+RUYg8/26hJPrj614d8jRvvhApti+uJo/X977ftu3RPCiqEE4b0DQ 3CW/k7bsqk6y+FOp4/fDSfmP4pK7gmd4ROYp61n8EHzHXTxZWf6qe5DHXIEyhl28Fyr0/a8p sRRnJBpqMRcVJwIAIkGd23YCAAA= X-MTR: 20000000000000000@CPGS X-CMS-MailID: 20170220133917eucas1p1e5c6106b0d479c4571966fcc2c601c22 X-Msg-Generator: CA X-Sender-IP: 182.198.249.179 X-Local-Sender: =?utf-8?q?Marek_Szyprowski=1BSRPOL-Kernel_=28TP=29=1B?= =?utf-8?b?7IK87ISx7KCE7J6QG1NlbmlvciBTb2Z0d2FyZSBFbmdpbmVlcg==?= X-Global-Sender: =?utf-8?q?Marek_Szyprowski=1BSRPOL-Kernel_=28TP=29=1BSam?= =?utf-8?q?sung_Electronics=1BSenior_Software_Engineer?= X-Sender-Code: =?utf-8?q?C10=1BEHQ=1BC10CD02CD027392?= CMS-TYPE: 201P X-HopCount: 7 X-CMS-RootMailID: 20170220133917eucas1p1e5c6106b0d479c4571966fcc2c601c22 X-RootMTR: 20170220133917eucas1p1e5c6106b0d479c4571966fcc2c601c22 References: <1487597944-2000-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 During my research I found that some of the requirements for the memory buffers for MFC v6+ devices were blindly copied from the previous (v5) version and simply turned out to be excessive. The relaxed requirements are applied by the recent patches to the MFC driver and the driver is now fully functional even without the reserved memory blocks for all v6+ variants. This patch removes those reserved memory nodes from all boards having MFC v6+ hardware block. Signed-off-by: Marek Szyprowski Reviewed-by: Javier Martinez Canillas Tested-by: Javier Martinez Canillas --- arch/arm/boot/dts/exynos5250-arndale.dts | 1 - arch/arm/boot/dts/exynos5250-smdk5250.dts | 1 - arch/arm/boot/dts/exynos5250-spring.dts | 1 - arch/arm/boot/dts/exynos5420-arndale-octa.dts | 1 - arch/arm/boot/dts/exynos5420-peach-pit.dts | 1 - arch/arm/boot/dts/exynos5420-smdk5420.dts | 1 - arch/arm/boot/dts/exynos5422-odroidxu3-common.dtsi | 1 - arch/arm/boot/dts/exynos5800-peach-pi.dts | 1 - 8 files changed, 8 deletions(-) -- 1.9.1 -- To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" 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/arch/arm/boot/dts/exynos5250-arndale.dts b/arch/arm/boot/dts/exynos5250-arndale.dts index 6098dacd09f1..6a432460eb77 100644 --- a/arch/arm/boot/dts/exynos5250-arndale.dts +++ b/arch/arm/boot/dts/exynos5250-arndale.dts @@ -14,7 +14,6 @@ #include #include #include "exynos5250.dtsi" -#include "exynos-mfc-reserved-memory.dtsi" / { model = "Insignal Arndale evaluation board based on EXYNOS5250"; diff --git a/arch/arm/boot/dts/exynos5250-smdk5250.dts b/arch/arm/boot/dts/exynos5250-smdk5250.dts index a97a785ccc6b..6632f657394e 100644 --- a/arch/arm/boot/dts/exynos5250-smdk5250.dts +++ b/arch/arm/boot/dts/exynos5250-smdk5250.dts @@ -13,7 +13,6 @@ #include #include #include "exynos5250.dtsi" -#include "exynos-mfc-reserved-memory.dtsi" / { model = "SAMSUNG SMDK5250 board based on EXYNOS5250"; diff --git a/arch/arm/boot/dts/exynos5250-spring.dts b/arch/arm/boot/dts/exynos5250-spring.dts index 4d7bdb735ed3..95c3bcace9dc 100644 --- a/arch/arm/boot/dts/exynos5250-spring.dts +++ b/arch/arm/boot/dts/exynos5250-spring.dts @@ -14,7 +14,6 @@ #include #include #include "exynos5250.dtsi" -#include "exynos-mfc-reserved-memory.dtsi" / { model = "Google Spring"; diff --git a/arch/arm/boot/dts/exynos5420-arndale-octa.dts b/arch/arm/boot/dts/exynos5420-arndale-octa.dts index 9cc83c51c925..ee1bb9b8b366 100644 --- a/arch/arm/boot/dts/exynos5420-arndale-octa.dts +++ b/arch/arm/boot/dts/exynos5420-arndale-octa.dts @@ -16,7 +16,6 @@ #include #include #include -#include "exynos-mfc-reserved-memory.dtsi" / { model = "Insignal Arndale Octa evaluation board based on EXYNOS5420"; diff --git a/arch/arm/boot/dts/exynos5420-peach-pit.dts b/arch/arm/boot/dts/exynos5420-peach-pit.dts index 1f964ec35c5e..2cd65699a29c 100644 --- a/arch/arm/boot/dts/exynos5420-peach-pit.dts +++ b/arch/arm/boot/dts/exynos5420-peach-pit.dts @@ -16,7 +16,6 @@ #include #include "exynos5420.dtsi" #include "exynos5420-cpus.dtsi" -#include "exynos-mfc-reserved-memory.dtsi" / { model = "Google Peach Pit Rev 6+"; diff --git a/arch/arm/boot/dts/exynos5420-smdk5420.dts b/arch/arm/boot/dts/exynos5420-smdk5420.dts index aaccd0da41e5..08c8ab173e87 100644 --- a/arch/arm/boot/dts/exynos5420-smdk5420.dts +++ b/arch/arm/boot/dts/exynos5420-smdk5420.dts @@ -13,7 +13,6 @@ #include "exynos5420.dtsi" #include "exynos5420-cpus.dtsi" #include -#include "exynos-mfc-reserved-memory.dtsi" / { model = "Samsung SMDK5420 board based on EXYNOS5420"; diff --git a/arch/arm/boot/dts/exynos5422-odroidxu3-common.dtsi b/arch/arm/boot/dts/exynos5422-odroidxu3-common.dtsi index 05b9afdd6757..657535e2e3cc 100644 --- a/arch/arm/boot/dts/exynos5422-odroidxu3-common.dtsi +++ b/arch/arm/boot/dts/exynos5422-odroidxu3-common.dtsi @@ -18,7 +18,6 @@ #include #include "exynos5800.dtsi" #include "exynos5422-cpus.dtsi" -#include "exynos-mfc-reserved-memory.dtsi" / { memory@40000000 { diff --git a/arch/arm/boot/dts/exynos5800-peach-pi.dts b/arch/arm/boot/dts/exynos5800-peach-pi.dts index f9ff7f07ae0c..ecf1c916e8fc 100644 --- a/arch/arm/boot/dts/exynos5800-peach-pi.dts +++ b/arch/arm/boot/dts/exynos5800-peach-pi.dts @@ -16,7 +16,6 @@ #include #include "exynos5800.dtsi" #include "exynos5420-cpus.dtsi" -#include "exynos-mfc-reserved-memory.dtsi" / { model = "Google Peach Pi Rev 10+";