From patchwork Thu Jun 2 15:39:25 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 9150663 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 2F6EE60467 for ; Thu, 2 Jun 2016 15:41:53 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1FEBC25E13 for ; Thu, 2 Jun 2016 15:41:53 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 140F92831C; Thu, 2 Jun 2016 15:41:53 +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 EA31525E13 for ; Thu, 2 Jun 2016 15:41:51 +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 1b8Ukp-0002PJ-Jn; Thu, 02 Jun 2016 15:41:51 +0000 Received: from mailout1.w1.samsung.com ([210.118.77.11]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1b8Ukj-0001uW-5Z; Thu, 02 Jun 2016 15:41:46 +0000 Received: from eucpsbgm2.samsung.com (unknown [203.254.199.245]) by mailout1.w1.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTP id <0O8500L29I9BAI10@mailout1.w1.samsung.com>; Thu, 02 Jun 2016 16:41:36 +0100 (BST) X-AuditID: cbfec7f5-f792a6d000001302-cc-575053af4686 Received: from eusync1.samsung.com ( [203.254.199.211]) by eucpsbgm2.samsung.com (EUCPMTA) with SMTP id 6F.0C.04866.FA350575; Thu, 2 Jun 2016 16:41:35 +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:35 +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 23/45] video: dma-mapping: Use unsigned long for dma_attrs Date: Thu, 02 Jun 2016 17:39:25 +0200 Message-id: <1464881987-13203-24-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+d3ffRRik2vH5h0Ml9TMRKP42GKOjzjJEvdL3GI3luA02dbB FdwASQtkGh+VChvK40qHAmUdaHk/LoXgwI2xNoROWTc6DG7KwyCgDUo7lG1YqWvF/ff5nu/5 5pycHAVWjTFRikPpmaIuXZuqZiPogYBzaL0cr0nYaPt2HeR3+zlwthlYKPz1KgWVcjMLiyX9 HNjKZAZ8ObkYrDkp4L6QS4O3tgBBXf27MD53C8Fsjp+GwIP7GK7Pe1k412DCcLZ1goO883FQ edeFYPpmDwVWz06w//E3BwPSRQrO21bAv/PGYPCaDUNV73aYtdzDMN7ayMBdRwWGyj83w5Ny HwX55jYOZu5tgtpLUwimpBEWZkf7EFT0jtLQfmeYgXO9Lg76zBIF9U2tGKrzrDT8XORjwHu6 iwXfV7MMDF2pZKFusgVDQVtnUBrdoa2+pEEqLeHAbC2mYeLaIAUui5OFaUchDXO3n2KQqo0Y yn77MXiPJ19jyB1poaDB1cKBo7QHgf+fALNrP5m0WyiS2yOxpNnSjMjQsBsT/+MSRG60asiM SQqWigopYp9wsOSix0CT7opRjvj++ohUtWcRc+kwIgXdvyDSUb9Ws2V/xI4kMfVQtqjbsPOT iJQ83w0q40HkF94iK21AFcvPoHCFwL8h1A5N4yV+SRgck9kzKEKh4muQMFBmeS5OUULNeBMX 6mL514WOOuszI5K3CYLhjvtZHPPHBI/zMQrxC/weYXzhIRVimn9NuDw3yIZYyROhTS5gl8at FK72m5gQhwfrVrmBDrGKf1twGzsYCSmrUFgjelHMSszQf5qctjlWr03TZ6UnxyYeTmtHS183 34Vq+rc5EK9A6mXKsHV7E1SMNlt/JM2BBAVWRyoz39ckqJRJ2iNHRd3hj3VZqaLegaIVtHqF svyK9wMVn6zNFD8XxQxR979LKcKjDKjpdx9njlIfvFm8QUaXd+/9kCp33o+no6ud9jcHol+W 4uJete+q++GnsuKTrvIxOWByx3oW+jofvfPWgVdaRrbvOLX43aTmwnrLVk9MrHnxuChnF+cv mGLW7H4vUSX4xdVPPwtsi3ORE3tWJUUdIFON9sZvTsbs+z7Ma5zpOt25MkNN61O0m9ZinV77 H8dCTcJxAwAA X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160602_084145_488263_F93433B7 X-CRM114-Status: GOOD ( 17.66 ) 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/video/fbdev/omap2/omapfb/omapfb-main.c | 12 ++++++------ drivers/video/fbdev/omap2/omapfb/omapfb.h | 3 +-- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/drivers/video/fbdev/omap2/omapfb/omapfb-main.c b/drivers/video/fbdev/omap2/omapfb/omapfb-main.c index d3af01c94a58..59172a2185c0 100644 --- a/drivers/video/fbdev/omap2/omapfb/omapfb-main.c +++ b/drivers/video/fbdev/omap2/omapfb/omapfb-main.c @@ -1332,7 +1332,7 @@ static void omapfb_free_fbmem(struct fb_info *fbi) } dma_free_attrs(fbdev->dev, rg->size, rg->token, rg->dma_handle, - &rg->attrs); + rg->attrs); rg->token = NULL; rg->vaddr = NULL; @@ -1370,7 +1370,7 @@ static int omapfb_alloc_fbmem(struct fb_info *fbi, unsigned long size, struct omapfb2_device *fbdev = ofbi->fbdev; struct omapfb2_mem_region *rg; void *token; - DEFINE_DMA_ATTRS(attrs); + unsigned long attrs; dma_addr_t dma_handle; int r; @@ -1386,15 +1386,15 @@ static int omapfb_alloc_fbmem(struct fb_info *fbi, unsigned long size, size = PAGE_ALIGN(size); - dma_set_attr(DMA_ATTR_WRITE_COMBINE, &attrs); + attrs = DMA_ATTR_WRITE_COMBINE; if (ofbi->rotation_type == OMAP_DSS_ROT_VRFB) - dma_set_attr(DMA_ATTR_NO_KERNEL_MAPPING, &attrs); + attrs |= DMA_ATTR_NO_KERNEL_MAPPING; DBG("allocating %lu bytes for fb %d\n", size, ofbi->id); token = dma_alloc_attrs(fbdev->dev, size, &dma_handle, - GFP_KERNEL, &attrs); + GFP_KERNEL, attrs); if (token == NULL) { dev_err(fbdev->dev, "failed to allocate framebuffer\n"); @@ -1408,7 +1408,7 @@ static int omapfb_alloc_fbmem(struct fb_info *fbi, unsigned long size, r = omap_vrfb_request_ctx(&rg->vrfb); if (r) { dma_free_attrs(fbdev->dev, size, token, dma_handle, - &attrs); + attrs); dev_err(fbdev->dev, "vrfb create ctx failed\n"); return r; } diff --git a/drivers/video/fbdev/omap2/omapfb/omapfb.h b/drivers/video/fbdev/omap2/omapfb/omapfb.h index 623cd872a367..8aaa2f643820 100644 --- a/drivers/video/fbdev/omap2/omapfb/omapfb.h +++ b/drivers/video/fbdev/omap2/omapfb/omapfb.h @@ -28,7 +28,6 @@ #endif #include -#include #include #include