From patchwork Fri Jun 10 10:11:30 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 9169365 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 EA77860573 for ; Fri, 10 Jun 2016 10:23:34 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id DA37626490 for ; Fri, 10 Jun 2016 10:23:34 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id CEDFF2833F; Fri, 10 Jun 2016 10:23:34 +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=ham 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 7DFC826490 for ; Fri, 10 Jun 2016 10:23:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932534AbcFJKMx (ORCPT ); Fri, 10 Jun 2016 06:12:53 -0400 Received: from mailout3.w1.samsung.com ([210.118.77.13]:15867 "EHLO mailout3.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932489AbcFJKMu (ORCPT ); Fri, 10 Jun 2016 06:12:50 -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 <0O8J001MGWDC9G50@mailout3.w1.samsung.com>; Fri, 10 Jun 2016 11:12:48 +0100 (BST) X-AuditID: cbfec7f5-f792a6d000001302-de-575a92a00540 Received: from eusync4.samsung.com ( [203.254.199.214]) by eucpsbgm2.samsung.com (EUCPMTA) with SMTP id E6.63.04866.0A29A575; Fri, 10 Jun 2016 11:12:48 +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:12:48 +0100 (BST) From: Krzysztof Kozlowski To: Andrew Morton Cc: hch@infradead.org, Krzysztof Kozlowski , Bartlomiej Zolnierkiewicz , Rob Clark , David Airlie , linux-arm-msm@vger.kernel.org, dri-devel@lists.freedesktop.org, freedreno@lists.freedesktop.org, linux-kernel@vger.kernel.org Subject: [PATCH v4 13/44] drm/msm: dma-mapping: Use unsigned long for dma_attrs Date: Fri, 10 Jun 2016 12:11:30 +0200 Message-id: <1465553521-27303-14-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+NgFlrDLMWRmVeSWpSXmKPExsVy+t/xa7oLJkWFG0zeIWvRe+4kk8Wc9WvY LDbOWM9qceXrezaLOc/PMlqcnrCIyeL1C0OLifvPsltc3jWHzeL5wh/MDlweO2fdZffYvELL 48SM3ywe2789YPW4332cyaNvyypGj8+b5ALYo7hsUlJzMstSi/TtErgyvsw4y1qwnbdi48KN bA2M77m6GDk5JARMJObc+skEYYtJXLi3nq2LkYtDSGApo8Tz5iXMEE4jk8SCOS/BqtgEjCU2 L1/CBmKLCOhKrHq+C6yIWeAwk8Svye/AioQF/CWuL53CDGKzCKhKPJu9hAXE5hXwkFh17i87 xDo5iZPHJrOC2JxA8e67M8FqhATcJbY/ecU0gZF3ASPDKkbR1NLkguKk9FwjveLE3OLSvHS9 5PzcTYyQMPy6g3HpMatDjAIcjEo8vBG7IsOFWBPLiitzDzFKcDArifBa9EWFC/GmJFZWpRbl xxeV5qQWH2KU5mBREueduet9iJBAemJJanZqakFqEUyWiYNTqoHRrPmImpTq9ZvnT78OUP0Q FnO5Z+qdlSd2r6u81WWTdngrs5lvUL3nSh7RS7b1XjNXzXvhrdApF+T2/uvBx3neXf91sudM WllXxsN6NmCWddTLKwpVyw9O4TzBvk3k61Ue++xC0/8iD9xX5jY078q5Oyl5/dJlms55m1Z8 Umv2+LA4PbQygiFCiaU4I9FQi7moOBEAsRHLaj8CAAA= Sender: linux-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@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/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;