From patchwork Wed Nov 16 09:04:50 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Szyprowski X-Patchwork-Id: 82453 Delivered-To: patch@linaro.org Received: by 10.182.1.168 with SMTP id 8csp56451obn; Wed, 16 Nov 2016 01:05:30 -0800 (PST) X-Received: by 10.98.202.72 with SMTP id n69mr3023939pfg.24.1479287130518; Wed, 16 Nov 2016 01:05:30 -0800 (PST) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k5si27319985pfk.138.2016.11.16.01.05.30; Wed, 16 Nov 2016 01:05:30 -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 S934461AbcKPJF2 (ORCPT + 4 others); Wed, 16 Nov 2016 04:05:28 -0500 Received: from mailout3.w1.samsung.com ([210.118.77.13]:57448 "EHLO mailout3.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752790AbcKPJFW (ORCPT ); Wed, 16 Nov 2016 04:05:22 -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 <0OGQ00GKV98VF980@mailout3.w1.samsung.com>; Wed, 16 Nov 2016 09:05:19 +0000 (GMT) Received: from eusmges3.samsung.com (unknown [203.254.199.242]) by eucas1p2.samsung.com (KnoxPortal) with ESMTP id 20161116090518eucas1p217e20a4ff21b3817a6d006d1d0fcd2df~He8v7PmtQ1709917099eucas1p2i; Wed, 16 Nov 2016 09:05:18 +0000 (GMT) Received: from eucas1p2.samsung.com ( [182.198.249.207]) by eusmges3.samsung.com (EUCPMTA) with SMTP id 8F.50.11330.E412C285; Wed, 16 Nov 2016 09:05:18 +0000 (GMT) Received: from eusmgms1.samsung.com (unknown [182.198.249.179]) by eucas1p1.samsung.com (KnoxPortal) with ESMTP id 20161116090517eucas1p1e9f8ba968ead194a4be0ea631ab25d26~He8vD_0p23104431044eucas1p1i; Wed, 16 Nov 2016 09:05:17 +0000 (GMT) X-AuditID: cbfec7f2-f79556d000002c42-1a-582c214ea41c Received: from eusync2.samsung.com ( [203.254.199.212]) by eusmgms1.samsung.com (EUCPMTA) with SMTP id 77.4A.07726.3512C285; Wed, 16 Nov 2016 09:05:23 +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 <0OGQ00GDL98JU960@eusync2.samsung.com>; Wed, 16 Nov 2016 09:05:17 +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 , Andrzej Hajda , Inki Dae , Douglas Anderson Subject: [PATCH 1/9] s5p-mfc: Set DMA_ATTR_ALLOC_SINGLE_PAGES Date: Wed, 16 Nov 2016 10:04:50 +0100 Message-id: <1479287098-30493-2-git-send-email-m.szyprowski@samsung.com> X-Mailer: git-send-email 1.9.1 In-reply-to: <1479287098-30493-1-git-send-email-m.szyprowski@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFrrNIsWRmVeSWpSXmKPExsWy7djP87p+ijoRBlf2iVvcWneO1WLjjPWs FmeXHWSzmHR/AovFm7drmCzOn9/AbtGzYSurxYzz+5gs1h65y25x+E07kDv5JZsDt8fshoss HptWdbJ5bOm/y+7Rt2UVo8fnTXIBrFFcNimpOZllqUX6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BQ4mut11sILaIgJPEwll/2UGK mAUmMEssnTaVHSQhLGAr0dB+D6yIRUBVYt3Xg6wgNq+Ah8SvRV3sEOvkJE4emwwW5xTwlHgy 8xVLFyMH0DYPieVHTScw8i5gZFjFKJJaWpybnltsqFecmFtcmpeul5yfu4kRGPLbjv3cvIPx 0sbgQ4wCHIxKPLwL1LUjhFgTy4orcw8xSnAwK4nwXhfUiRDiTUmsrEotyo8vKs1JLT7EaAp0 00RmKdHkfGA85pXEG5oYmlsaGhlbWJgbGSmJ85Z8uBIuJJCeWJKanZpakFoE08fEwSnVwLjg mHCfj2pGJJ/n4aWHar/c22yYa2f4j0vNS7hO3fCU2dsLq7IUFxckPdfXT/cNuvV7rzmbs9x6 IcvCSnm+FxKcvAUFTU9Kf+QslU0Q+sW5fV/HrXCFGcfq1y9x3nlrmnxILrPj3Zhmi4XXBH+K HLVYaFv/LvHfi9/pux6Y+cqpnxffc1rPQ4mlOCPRUIu5qDgRAFTTra+PAgAA X-MTR: 20000000000000000@CPGS X-CMS-MailID: 20161116090517eucas1p1e9f8ba968ead194a4be0ea631ab25d26 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: 20161116090517eucas1p1e9f8ba968ead194a4be0ea631ab25d26 X-RootMTR: 20161116090517eucas1p1e9f8ba968ead194a4be0ea631ab25d26 References: <1479287098-30493-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 From: Douglas Anderson We do video allocation all the time and we need it to be fast. Plus TLB efficiency isn't terribly important for video. That means we want to set DMA_ATTR_ALLOC_SINGLE_PAGES. See also the previous change (commit 14d3ae2efeed "ARM: dma-mapping: Use DMA_ATTR_ALLOC_SINGLE_PAGES hint to optimize allocation"). Signed-off-by: Douglas Anderson [mszyprow: rebased patch onto v4.9-rc1 and adapted changes to latest videbuf2 changes, this simplifies code changes to only set proper dma attribute flag and comment the reason for it, added commit id of arch/arm/mm patch] Signed-off-by: Marek Szyprowski --- drivers/media/platform/s5p-mfc/s5p_mfc.c | 11 +++++++++++ 1 file changed, 11 insertions(+) -- 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 27b375e75555..a0a29194ccd1 100644 --- a/drivers/media/platform/s5p-mfc/s5p_mfc.c +++ b/drivers/media/platform/s5p-mfc/s5p_mfc.c @@ -851,6 +851,11 @@ static int s5p_mfc_open(struct file *file) ret = -ENOENT; goto err_queue_init; } + /* + * We'll do mostly sequential access, so sacrifice TLB efficiency for + * faster allocation. + */ + q->dma_attrs = DMA_ATTR_ALLOC_SINGLE_PAGES; q->mem_ops = &vb2_dma_contig_memops; q->timestamp_flags = V4L2_BUF_FLAG_TIMESTAMP_COPY; ret = vb2_queue_init(q); @@ -881,6 +886,12 @@ static int s5p_mfc_open(struct file *file) * will keep the value of bytesused intact. */ q->allow_zero_bytesused = 1; + + /* + * We'll do mostly sequential access, so sacrifice TLB efficiency for + * faster allocation. + */ + q->dma_attrs = DMA_ATTR_ALLOC_SINGLE_PAGES; q->mem_ops = &vb2_dma_contig_memops; q->timestamp_flags = V4L2_BUF_FLAG_TIMESTAMP_COPY; ret = vb2_queue_init(q);