From patchwork Wed Jul 13 08:41:14 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 9227223 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 9D4F96075D for ; Wed, 13 Jul 2016 08:50:22 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8D9782756B for ; Wed, 13 Jul 2016 08:50:22 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 81E882766D; Wed, 13 Jul 2016 08:50:22 +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=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=unavailable version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 080A0275A2 for ; Wed, 13 Jul 2016 08:50:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752850AbcGMIt7 (ORCPT ); Wed, 13 Jul 2016 04:49:59 -0400 Received: from mailout1.w1.samsung.com ([210.118.77.11]:21825 "EHLO mailout1.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932157AbcGMImt (ORCPT ); Wed, 13 Jul 2016 04:42:49 -0400 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 <0OA800F86W6M9330@mailout1.w1.samsung.com>; Wed, 13 Jul 2016 09:42:22 +0100 (BST) X-AuditID: cbfec7f5-f792a6d000001302-2f-5785feeeb90e Received: from eusync3.samsung.com ( [203.254.199.213]) by eucpsbgm2.samsung.com (EUCPMTA) with SMTP id 56.31.04866.EEEF5875; Wed, 13 Jul 2016 09:42:22 +0100 (BST) Received: from AMDC2174.DIGITAL.local ([106.120.53.17]) by eusync3.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTPA id <0OA800KINW5J0E10@eusync3.samsung.com>; Wed, 13 Jul 2016 09:42:22 +0100 (BST) From: Krzysztof Kozlowski To: Andrew Morton Cc: linux-kernel@vger.kernel.org, hch@infradead.org, Krzysztof Kozlowski , Bartlomiej Zolnierkiewicz , Tomi Valkeinen , Jean-Christophe Plagniol-Villard , linux-omap@vger.kernel.org, linux-fbdev@vger.kernel.org Subject: [PATCH v6 23/46] video: dma-mapping: Use unsigned long for dma_attrs Date: Wed, 13 Jul 2016 10:41:14 +0200 Message-id: <1468399300-5399-23-git-send-email-k.kozlowski@samsung.com> X-Mailer: git-send-email 1.9.1 In-reply-to: <1468399300-5399-22-git-send-email-k.kozlowski@samsung.com> References: <1468399167-28083-1-git-send-email-k.kozlowski@samsung.com> <1468399300-5399-1-git-send-email-k.kozlowski@samsung.com> <1468399300-5399-2-git-send-email-k.kozlowski@samsung.com> <1468399300-5399-3-git-send-email-k.kozlowski@samsung.com> <1468399300-5399-4-git-send-email-k.kozlowski@samsung.com> <1468399300-5399-5-git-send-email-k.kozlowski@samsung.com> <1468399300-5399-6-git-send-email-k.kozlowski@samsung.com> <1468399300-5399-7-git-send-email-k.kozlowski@samsung.com> <1468399300-5399-8-git-send-email-k.kozlowski@samsung.com> <1468399300-5399-9-git-send-email-k.kozlowski@samsung.com> <1468399300-5399-10-git-send-email-k.kozlowski@samsung.com> <1468399300-5399-11-git-send-email-k.kozlowski@samsung.com> <1468399300-5399-12-git-send-email-k.kozlowski@samsung.com> <1468399300-5399-13-git-send-email-k.kozlowski@samsung.com> <1468399300-5399-14-git-send-email-k.kozlowski@samsung.com> <1468399300-5399-15-git-send-email-k.kozlowski@samsung.com> <1468399300-5399-16-git-send-email-k.kozlowski@samsung.com> <1468399300-5399-17-git-send-email-k.kozlowski@samsung.com> <1468399300-5399-18-git-send-email-k.kozlowski@samsung.com> <1468399300-5399-19-git-send-email-k.kozlowski@samsung.com> <1468399300-5399-20-git-send-email-k.kozlowski@samsung.com> <1468399300-5399-21-git-send-email-k.kozlowski@samsung.com> <1468399300-5399-22-git-send-email-k.kozlowski@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFlrELMWRmVeSWpSXmKPExsVy+t/xq7rv/rWGG5y+wWExZ/0aNouNM9az WpyesIjJ4vULQ4sTfR9YLS7vmsNmMXtJP4vFuocvmCzWz7/F5sDpsXmFlserC3dYPE7M+M3i 0bdlFaPH8RvbmTw+b5ILYIvisklJzcksSy3St0vgyrj+5ApTwQeRig0TTRsY5wp2MXJySAiY SFxsmcwMYYtJXLi3nq2LkYtDSGApo8TlZZOgnEYmiU0HtoFVsQkYS2xevoQNxBYR0JVY9XwX M0gRs8BeJondyy+wgySEBXwlGidcBitiEVCV6Lx8nwnE5hVwl9j7dxU7xDo5iZPHJrOC2JwC HhK/LyyB2jaJW6Lp4CTmCYy8CxgZVjGKppYmFxQnpeca6RUn5haX5qXrJefnbmKEhNzXHYxL j1kdYhTgYFTi4V0h2BouxJpYVlyZe4hRgoNZSYTX9CdQiDclsbIqtSg/vqg0J7X4EKM0B4uS OO/MXe9DhATSE0tSs1NTC1KLYLJMHJxSDYzVuSXGm3I+ftx1uixonZrztLfrquxVI6MerMvd 80woIqCom4Fx1uPIvP6Lch8nZ90OUdqpW9ux/V6XSL0uQxz7zoj5enL/rSUXxx7m/OCcnaXx Qzkizl20avELDr7L66NuecWJWF1gPn0tIrexUsukXEswL4Zh/+u+E/u9L62LuHlQRynjoxJL cUaioRZzUXEiAK5+IpY1AgAA Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.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 2fb90cb6803f..1d7c012f09db 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 bcb9ff4a607d..555487d6dbea 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