Message ID | 20220511121544.5998-7-ajaykumar.rs@samsung.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org> X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id CA26CC433F5 for <linux-arm-kernel@archiver.kernel.org>; Thu, 12 May 2022 03:41:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:List-Subscribe:List-Help: List-Post:List-Archive:List-Unsubscribe:List-Id:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=NTKGGQcj6W5qM/6Xj1W1hWvIiWPYLpRdu1XH4eEhY9M=; b=Q2A8yrek1ZvSPa m7QL24nguS5eJgqblzP6N+c6xDRoTp+JXeXPV4MDMg1Hzvm0u3NkSg++Fo03q+N0p+wV067VCOn7A D8CvZnP0CirQx0Vl+um59zYNnCucy9MeuWZKzqCwQLUvpR/lG0JDtBMm61kxxrcwcgAUOlCaeAfGz VYdVfS5nnhiMNBG8JNNE58ZquFTr7k1jN/G/STCA+zxHIXIGHHD7qZTKtVjARBSuU5bWJkvES7RLA m2B861uh1fVV5oLIi9VGhOOECyBEeN2o155JAjuKZEpo2UlATHf1mG6pozep6+RjTkTg/VmRSWTkt T6sWWo4/jOMNw1G7TSbQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nozgx-009iTK-Om; Thu, 12 May 2022 03:40:44 +0000 Received: from mailout2.samsung.com ([203.254.224.25]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nozg1-009i1W-AP for linux-arm-kernel@lists.infradead.org; Thu, 12 May 2022 03:39:47 +0000 Received: from epcas5p2.samsung.com (unknown [182.195.41.40]) by mailout2.samsung.com (KnoxPortal) with ESMTP id 20220512033943epoutp02967316131fc1784fbae9cd5c61e8942d~uPnR0MPbQ3248032480epoutp02i for <linux-arm-kernel@lists.infradead.org>; Thu, 12 May 2022 03:39:43 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout2.samsung.com 20220512033943epoutp02967316131fc1784fbae9cd5c61e8942d~uPnR0MPbQ3248032480epoutp02i DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1652326783; bh=1yMoSleOG1G6F/u1i0Yl7I9fqLlbF/BiUVFK6eqgol4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Ty5JNQf3OFz8NYI+92NMZMCUUpQNe3zFnarDvlMM8aJ+zDaJ9KL+pb8iAwFxsT4px A9m5O/r8QDR9d9+31ZUQAkFyj3oRxFvrPILqxdRCBRNOUgebcwJSMRaMDJMVQbhxy5 Q4f412KEPEml5QIVcN703/bIh/bEHUbccm94z7SQ= Received: from epsnrtp1.localdomain (unknown [182.195.42.162]) by epcas5p3.samsung.com (KnoxPortal) with ESMTP id 20220512033942epcas5p39e35d5f10a61b7e0a1541e4a983d5ca3~uPnRe6OFM2371723717epcas5p3S; Thu, 12 May 2022 03:39:42 +0000 (GMT) Received: from epsmges5p3new.samsung.com (unknown [182.195.38.183]) by epsnrtp1.localdomain (Postfix) with ESMTP id 4KzHZx2QWnz4x9Q3; Thu, 12 May 2022 03:39:37 +0000 (GMT) Received: from epcas5p1.samsung.com ( [182.195.41.39]) by epsmges5p3new.samsung.com (Symantec Messaging Gateway) with SMTP id E9.B6.09762.5718C726; Thu, 12 May 2022 12:39:33 +0900 (KST) Received: from epsmtrp2.samsung.com (unknown [182.195.40.14]) by epcas5p3.samsung.com (KnoxPortal) with ESMTPA id 20220511121445epcas5p377ef245c4f5a0bf282245877d2b922c8~uC-r0UHa_2165521655epcas5p3R; Wed, 11 May 2022 12:14:45 +0000 (GMT) Received: from epsmgms1p1new.samsung.com (unknown [182.195.42.41]) by epsmtrp2.samsung.com (KnoxPortal) with ESMTP id 20220511121445epsmtrp2db83a2613791bdcbb633b8ee7a2844fd~uC-rzf3e51138811388epsmtrp2Q; Wed, 11 May 2022 12:14:45 +0000 (GMT) X-AuditID: b6c32a4b-1fdff70000002622-64-627c8175874b Received: from epsmtip2.samsung.com ( [182.195.34.31]) by epsmgms1p1new.samsung.com (Symantec Messaging Gateway) with SMTP id 7B.0F.11276.5B8AB726; Wed, 11 May 2022 21:14:45 +0900 (KST) Received: from Jaguar.sa.corp.samsungelectronics.net (unknown [107.108.73.139]) by epsmtip2.samsung.com (KnoxPortal) with ESMTPA id 20220511121444epsmtip2a7072acf22ec1a1971a8f32a89c86520~uC-qU4RTg0609306093epsmtip2s; Wed, 11 May 2022 12:14:44 +0000 (GMT) From: Ajay Kumar <ajaykumar.rs@samsung.com> To: linux-arm-kernel@lists.infradead.org, iommu@lists.linux-foundation.org, joro@8bytes.org, will@kernel.org, robin.murphy@arm.com Cc: alim.akhtar@samsung.com, pankaj.dubey@samsung.com, ajaykumar.rs1989@gmail.com, Marek Szyprowski <m.szyprowski@samsung.com>, Ajay Kumar <ajaykumar.rs@samsung.com> Subject: [PATCH V2 6/6] media: platform: s5p-mfc: use DMA_ATTR_LOW_ADDRESS Date: Wed, 11 May 2022 17:45:44 +0530 Message-Id: <20220511121544.5998-7-ajaykumar.rs@samsung.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20220511121544.5998-1-ajaykumar.rs@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFvrOKsWRmVeSWpSXm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ctXfHV9eKaIlfsToWtLdkctjYnYE/q9LDV/rqXlViKMxINtZiLihMB khuMksICAAA= X-CMS-MailID: 20220511121445epcas5p377ef245c4f5a0bf282245877d2b922c8 X-Msg-Generator: CA X-Sendblock-Type: REQ_APPROVE CMS-TYPE: 105P DLP-Filter: Pass X-CFilter-Loop: Reflected X-CMS-RootMailID: 20220511121445epcas5p377ef245c4f5a0bf282245877d2b922c8 References: <20220511121544.5998-1-ajaykumar.rs@samsung.com> <CGME20220511121445epcas5p377ef245c4f5a0bf282245877d2b922c8@epcas5p3.samsung.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220511_203945_784213_A2CCA120 X-CRM114-Status: GOOD ( 18.52 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: <linux-arm-kernel.lists.infradead.org> List-Unsubscribe: <http://lists.infradead.org/mailman/options/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=unsubscribe> List-Archive: <http://lists.infradead.org/pipermail/linux-arm-kernel/> List-Post: <mailto:linux-arm-kernel@lists.infradead.org> List-Help: <mailto:linux-arm-kernel-request@lists.infradead.org?subject=help> List-Subscribe: <http://lists.infradead.org/mailman/listinfo/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=subscribe> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" <linux-arm-kernel-bounces@lists.infradead.org> Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org |
Series |
IOMMU-DMA - support DMA_ATTR_LOW_ADDRESS attribute
|
expand
|
diff --git a/drivers/media/platform/samsung/s5p-mfc/s5p_mfc.c b/drivers/media/platform/samsung/s5p-mfc/s5p_mfc.c index 761341934925..15c9c2273561 100644 --- a/drivers/media/platform/samsung/s5p-mfc/s5p_mfc.c +++ b/drivers/media/platform/samsung/s5p-mfc/s5p_mfc.c @@ -1196,8 +1196,12 @@ static int s5p_mfc_configure_common_memory(struct s5p_mfc_dev *mfc_dev) if (!mfc_dev->mem_bitmap) return -ENOMEM; - mfc_dev->mem_virt = dma_alloc_coherent(dev, mem_size, - &mfc_dev->mem_base, GFP_KERNEL); + /* MFC v5 can access memory only via the 256M window */ + if (exynos_is_iommu_available(dev) && !IS_MFCV6_PLUS(mfc_dev)) + dma_set_mask_and_coherent(dev, SZ_256M - 1); + + mfc_dev->mem_virt = dma_alloc_attrs(dev, mem_size, &mfc_dev->mem_base, + GFP_KERNEL, DMA_ATTR_LOW_ADDRESS); if (!mfc_dev->mem_virt) { bitmap_free(mfc_dev->mem_bitmap); dev_err(dev, "failed to preallocate %ld MiB for the firmware and context buffers\n",