From patchwork Thu Jun 2 15:39:16 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 9150803 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id B97CA60467 for ; Thu, 2 Jun 2016 15:47:45 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A99612804C for ; Thu, 2 Jun 2016 15:47:45 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9D8522831D; Thu, 2 Jun 2016 15:47:45 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id E12A12804C for ; Thu, 2 Jun 2016 15:47:43 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1b8UqV-0006Lc-86; Thu, 02 Jun 2016 15:47:43 +0000 Received: from mailout2.w1.samsung.com ([210.118.77.12]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1b8UkT-0001hZ-Jc; Thu, 02 Jun 2016 15:41:30 +0000 Received: from eucpsbgm2.samsung.com (unknown [203.254.199.245]) by mailout2.w1.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTP id <0O8500GH1I8KC540@mailout2.w1.samsung.com>; Thu, 02 Jun 2016 16:41:08 +0100 (BST) X-AuditID: cbfec7f5-f792a6d000001302-64-575053938c59 Received: from eusync1.samsung.com ( [203.254.199.211]) by eucpsbgm2.samsung.com (EUCPMTA) with SMTP id 6A.DB.04866.39350575; Thu, 2 Jun 2016 16:41:07 +0100 (BST) Received: from AMDC2174.DIGITAL.local ([106.120.53.17]) by eusync1.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTPA id <0O85008BCI6FXK50@eusync1.samsung.com>; Thu, 02 Jun 2016 16:41:07 +0100 (BST) From: Krzysztof Kozlowski To: Richard Henderson , Ivan Kokshaysky , Matt Turner , Vineet Gupta , Russell King , Stefano Stabellini , Catalin Marinas , Will Deacon , Haavard Skinnemoen , Hans-Christian Egtvedt , Steven Miao , Mark Salter , Aurelien Jacquiot , Mikael Starvik , Jesper Nilsson , Yoshinori Sato , Richard Kuo , Tony Luck , Fenghua Yu , Konrad Rzeszutek Wilk , Geert Uytterhoeven , James Hogan , Michal Simek , Ralf Baechle , David Howells , Ley Foon Tan , Jonas Bonn , "James E.J. Bottomley" , Helge Deller , Benjamin Herrenschmidt , Paul Mackerras , Michael Ellerman , Arnd Bergmann , Olof Johansson , Geoff Levand , Martin Schwidefsky , Guan Xuetao , Thomas Gleixner , Ingo Molnar , "H. Peter Anvin" , x86@kernel.org, Boris Ostrovsky , David Vrabel , Juergen Gross , Muli Ben-Yehuda , Bjorn Helgaas , David Airlie , Joerg Roedel , David Woodhouse , Andrew Morton , linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-alpha@vger.kernel.org, linux-snps-arc@lists.infradead.org, linux-arm-kernel@lists.infradead.org, xen-devel@lists.xenproject.org, adi-buildroot-devel@lists.sourceforge.net, linux-c6x-dev@linux-c6x.org, linux-cris-kernel@axis.com, uclinux-h8-devel@lists.sourceforge.jp, linux-hexagon@vger.kernel.org, linux-ia64@vger.kernel.org, linux-m68k@lists.linux-m68k.org, linux-metag@vger.kernel.org, linux-mips@linux-mips.org, linux-am33-list@redhat.com, nios2-dev@lists.rocketboards.org, linux-parisc@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-s390@vger.kernel.org, linux-sh@vger.kernel.org, sparclinux@vger.kernel.org, discuss@x86-64.org, linux-pci@vger.kernel.org, linux-xtensa@linux-xtensa.org, dri-devel@lists.freedesktop.org, linux-samsung-soc@vger.kernel.org, linux-mediatek@lists.infradead.org, linux-arm-msm@vger.kernel.org, freedreno@lists.freedesktop.org, nouveau@lists.freedesktop.org, linux-rockchip@lists.infradead.org, linux-rdma@vger.kernel.org, iommu@lists.linux-foundation.org, linux-media@vger.kernel.org, linux-omap@vger.kernel.org, linux-fbdev@vger.kernel.org Subject: [RFC v3 14/45] drm/msm: dma-mapping: Use unsigned long for dma_attrs Date: Thu, 02 Jun 2016 17:39:16 +0200 Message-id: <1464881987-13203-15-git-send-email-k.kozlowski@samsung.com> X-Mailer: git-send-email 1.9.1 In-reply-to: <1464881987-13203-1-git-send-email-k.kozlowski@samsung.com> References: <1464881987-13203-1-git-send-email-k.kozlowski@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAAzWSe0xTdxTH/d3ffdHQ7K5z40YzE5vsj7Hp1C14Mo0REuM1ztixLWSaCFVv QAUkrXW6aFLLwImA5TkeDYGuPO2DQoxghoTG0Al00JQgbEAJjwpRaNXxCC9tIf73PZ/v9+Sc nBwWy0apbeyF1CuiKlWZLKclZPe607Or4AdF3J7F2f1wp3WFAWejloacf54SYLCZaVjL72TA XmKjIKDLwGDSJYH7jwwS/DXZCGrrToD39X8I5nQrJKzPvsTQP++nIa++AMNd6zgDmcXRYHju QuD7t40A08wh6BhcYKBbbySg2B4BS/PpwcYuO4bK9gMwVzGNwWttoOC5owyDYWgfrJYGCLhT 3sjAi+m9UPPnFIIp/TANcyNPEJS1j5DQNDFAQV67i4En5XoC6u5bMVRlmkj4OzdAgf+3FhoC v89R4HlkoKF20oIhu/FBsEx3h7a6TYK+KJ+BctM9Esa7+ghwVThp8DlySHg99haDviodQ0nv 4+A9VgsxZAxbCKh3WRhwFLUhWFlcpw6fEiY7Kggho01PC+YKMxI8A24srCznI+GZVSG8KNAH UW4OIXSMO2jBOKMlhdayEUYIvDojVDZphPKiASRkt/YgobkuUhF1SnLwvJh84aqo+upQgiTp /xIXlfZQes1eZae1yC/JQmEsz33D+61N9Kb+hO8btQW1hJVx1Yj3OQ14s7hF8Gu6xyiUormv +eZa00ZqK2fnee2EG4cMzN3gZ5zLG6GPuBP8kLGGCGmS+4yfKPRucCkn8EtZJeTmuB38084C KqTDgtxkq9/gMu4o705vpvRIWom2NKCPRc25NPXZxJR9u9XKFLUmNXH3ucspTWjz6+ZbUHXn tw7EsUgeLt3y5ck4GaW8qr6e4kA8i+VbpftjFXEy6Xnl9V9F1eV4lSZZVDvQdpaUR0hLH/l/ lHGJyiviJVFME1XvXYIN26ZF3DHZRE6g+C/T0r3C1Ybtnc5fcj/NWozJrebPOEq/iLrJ/fTd 8GC4782HtvjYNY9tdXBhMurZ8Z1xJ2Ms5os/Ew2m0z0J8Xn9SbSl32P5/vh0/0hEewyb1Rt9 bc18JG1oYWzgc2+sz+gqimidOqDTGL19H0TXJrRU5SlQ5Wxy+B45qU5S7o3EKrXyHU1Rvdtx AwAA X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160602_084129_812153_98F089FC X-CRM114-Status: GOOD ( 18.32 ) X-BeenThere: linux-mediatek@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: hch@infradead.org, Krzysztof Kozlowski , Bartlomiej Zolnierkiewicz MIME-Version: 1.0 Sender: "Linux-mediatek" Errors-To: linux-mediatek-bounces+patchwork-linux-mediatek=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Split out subsystem specific changes for easier reviews. This will be squashed with main commit. Signed-off-by: Krzysztof Kozlowski --- drivers/gpu/drm/msm/msm_drv.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/drivers/gpu/drm/msm/msm_drv.c b/drivers/gpu/drm/msm/msm_drv.c index 1f7de47d817e..9b806e576d35 100644 --- a/drivers/gpu/drm/msm/msm_drv.c +++ b/drivers/gpu/drm/msm/msm_drv.c @@ -230,11 +230,10 @@ static int msm_drm_uninit(struct device *dev) } if (priv->vram.paddr) { - DEFINE_DMA_ATTRS(attrs); - dma_set_attr(DMA_ATTR_NO_KERNEL_MAPPING, &attrs); + unsigned long attrs = DMA_ATTR_NO_KERNEL_MAPPING; drm_mm_takedown(&priv->vram.mm); dma_free_attrs(dev, priv->vram.size, NULL, - priv->vram.paddr, &attrs); + priv->vram.paddr, attrs); } component_unbind_all(dev, ddev); @@ -299,21 +298,21 @@ static int msm_init_vram(struct drm_device *dev) } if (size) { - DEFINE_DMA_ATTRS(attrs); + unsigned long attrs = 0; void *p; priv->vram.size = size; drm_mm_init(&priv->vram.mm, 0, (size >> PAGE_SHIFT) - 1); - dma_set_attr(DMA_ATTR_NO_KERNEL_MAPPING, &attrs); - dma_set_attr(DMA_ATTR_WRITE_COMBINE, &attrs); + attrs |= DMA_ATTR_NO_KERNEL_MAPPING; + attrs |= DMA_ATTR_WRITE_COMBINE; /* note that for no-kernel-mapping, the vaddr returned * is bogus, but non-null if allocation succeeded: */ p = dma_alloc_attrs(dev->dev, size, - &priv->vram.paddr, GFP_KERNEL, &attrs); + &priv->vram.paddr, GFP_KERNEL, attrs); if (!p) { dev_err(dev->dev, "failed to allocate VRAM\n"); priv->vram.paddr = 0;