From patchwork Thu Jun 30 08:25:49 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 9207001 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 F1F696075A for ; Thu, 30 Jun 2016 08:45:11 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E175A27F7A for ; Thu, 30 Jun 2016 08:45:11 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D4D492816B; Thu, 30 Jun 2016 08:45:11 +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 CEF7427F7A for ; Thu, 30 Jun 2016 08:45:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932088AbcF3Iik (ORCPT ); Thu, 30 Jun 2016 04:38:40 -0400 Received: from mailout4.w1.samsung.com ([210.118.77.14]:19186 "EHLO mailout4.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751957AbcF3I3B (ORCPT ); Thu, 30 Jun 2016 04:29:01 -0400 Received: from eucpsbgm1.samsung.com (unknown [203.254.199.244]) by mailout4.w1.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTP id <0O9K00MK6SUR6X80@mailout4.w1.samsung.com>; Thu, 30 Jun 2016 09:28:03 +0100 (BST) X-AuditID: cbfec7f4-f796c6d000001486-39-5774d8135cb6 Received: from eusync2.samsung.com ( [203.254.199.212]) by eucpsbgm1.samsung.com (EUCPMTA) with SMTP id 9E.FD.05254.318D4775; Thu, 30 Jun 2016 09:28:03 +0100 (BST) Received: from AMDC2174.DIGITAL.local ([106.120.53.17]) by eusync2.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTPA id <0O9K00F5WSS0I050@eusync2.samsung.com>; Thu, 30 Jun 2016 09:28:03 +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 v5 22/44] video: dma-mapping: Use unsigned long for dma_attrs Date: Thu, 30 Jun 2016 10:25:49 +0200 Message-id: <1467275171-6298-22-git-send-email-k.kozlowski@samsung.com> X-Mailer: git-send-email 1.9.1 In-reply-to: <1467275171-6298-1-git-send-email-k.kozlowski@samsung.com> References: <1467275019-30789-1-git-send-email-k.kozlowski@samsung.com> <1467275171-6298-1-git-send-email-k.kozlowski@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFlrILMWRmVeSWpSXmKPExsVy+t/xK7rCN0rCDY5fV7OYs34Nm8XGGetZ LU5PWMRk8fqFocWJvg+sFpd3zWGzmL2kn8Vi3cMXTBbr599ic+D02LxCy+PVhTssHidm/Gbx 6NuyitHj+I3tTB6fN8kFsEVx2aSk5mSWpRbp2yVwZbR9uM5U8Fak4n3fEpYGxlmCXYycHBIC JhL/Vu5ih7DFJC7cW8/WxcjFISSwlFFi+7b7zCAJIYFGJomX591BbDYBY4nNy5ewgdgiAroS q57vYgZpYBbYyySxe/kFsEnCAr4SL6Y0s4DYLAKqEvterAJr4BVwl5jx6AIbxDY5iZPHJrN2 MXJwcALFZ3/3h1jcwihxbN8k5gmMvAsYGVYxiqaWJhcUJ6XnGuoVJ+YWl+al6yXn525ihATc lx2Mi49ZHWIU4GBU4uF1YC4JF2JNLCuuzD3EKMHBrCTCu/0KUIg3JbGyKrUoP76oNCe1+BCj NAeLkjjv3F3vQ4QE0hNLUrNTUwtSi2CyTBycUg2Ma0+cd553QEtOyCD8WpXyugkmVeI8yxWS gpe/Y8z7PmXp7pNhcf8iPpd07/Oa+fDH8l33qmIWOV6/98XZf/qP+l+fT5qv7+TNY9nyqGj/ pM/GUxNa7Pi3fuBO+vswpr7ifVjB3mbOKMZrRUrqyhIui+Z8lWoWeNTxmE02ouak8rf8aG+t /4tmKLEUZyQaajEXFScCAN5aq+E0AgAA 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 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