From patchwork Fri Jun 10 10:11:39 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 9169345 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 4278D60573 for ; Fri, 10 Jun 2016 10:21:35 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 11C2B26490 for ; Fri, 10 Jun 2016 10:21:35 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 067C02833F; Fri, 10 Jun 2016 10:21:35 +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 8242826490 for ; Fri, 10 Jun 2016 10:21:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932552AbcFJKVR (ORCPT ); Fri, 10 Jun 2016 06:21:17 -0400 Received: from mailout3.w1.samsung.com ([210.118.77.13]:15902 "EHLO mailout3.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753182AbcFJKNW (ORCPT ); Fri, 10 Jun 2016 06:13:22 -0400 Received: from eucpsbgm2.samsung.com (unknown [203.254.199.245]) by mailout3.w1.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTP id <0O8J001N1WE89G50@mailout3.w1.samsung.com>; Fri, 10 Jun 2016 11:13:20 +0100 (BST) X-AuditID: cbfec7f5-f792a6d000001302-5d-575a92c05a07 Received: from eusync4.samsung.com ( [203.254.199.214]) by eucpsbgm2.samsung.com (EUCPMTA) with SMTP id 41.83.04866.0C29A575; Fri, 10 Jun 2016 11:13:20 +0100 (BST) Received: from AMDC2174.DIGITAL.local ([106.120.53.17]) by eusync4.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTPA id <0O8J00MI3WC5KUB0@eusync4.samsung.com>; Fri, 10 Jun 2016 11:13:20 +0100 (BST) From: Krzysztof Kozlowski To: Andrew Morton Cc: hch@infradead.org, Krzysztof Kozlowski , Bartlomiej Zolnierkiewicz , Tomi Valkeinen , Jean-Christophe Plagniol-Villard , Oleg Nesterov , "Kirill A. Shutemov" , linux-omap@vger.kernel.org, linux-fbdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v4 22/44] video: dma-mapping: Use unsigned long for dma_attrs Date: Fri, 10 Jun 2016 12:11:39 +0200 Message-id: <1465553521-27303-23-git-send-email-k.kozlowski@samsung.com> X-Mailer: git-send-email 1.9.1 In-reply-to: <1465553521-27303-1-git-send-email-k.kozlowski@samsung.com> References: <1465553521-27303-1-git-send-email-k.kozlowski@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFtrCLMWRmVeSWpSXmKPExsVy+t/xa7oHJkWFG6x9rWUxZ/0aNouNM9az WpyesIjJ4vULQ4ubz+ewWJzo+8BqcXnXHDaL2Uv6WSy27m9ltFj38AWTxfr5t9gcuD02r9Dy eHXhDovHiRm/WTzmnQz0eL/vKptH35ZVjB7Hb2xn8vi8SS6AI4rLJiU1J7MstUjfLoEro+3D daaCtyIV7/uWsDQwzhLsYuTkkBAwkXhzaQoThC0mceHeerYuRi4OIYGljBLTpp+HchqZJDrm rQSrYhMwlti8fAkbiC0ioCux6vkuZhCbWWAWs8SLp5EgtrCAr8TU9g6wOIuAqsTD+6dZQGxe AQ+Jjjkz2SC2yUmcPDaZFcTmBIp3350JViMk4C6x/ckrpgmMvAsYGVYxiqaWJhcUJ6XnGukV J+YWl+al6yXn525ihITl1x2MS49ZHWIU4GBU4uGN2BUZLsSaWFZcmXuIUYKDWUmE16IvKlyI NyWxsiq1KD++qDQntfgQozQHi5I478xd70OEBNITS1KzU1MLUotgskwcnFINjN2M8z6LfmP+ KCycEHTWsvvy4/xb3S175ddqar7bWrFHtFpWqDvJwK5DJ/iZ+KYFjjo8h578kZPq0Gg7U1Td KbPDWaaROc7ka94s+aCzm8LmLWz7kdafea11wz39dc+XHJvEH2racqgrs5T/jBfrDR/936s7 r7Bumx9d6WC/QytAyN73yAMuJZbijERDLeai4kQAvFCCmkcCAAA= 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