From patchwork Thu Jun 30 08:25:40 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 9207019 X-Patchwork-Delegate: agross@codeaurora.org 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 628EA6075A for ; Thu, 30 Jun 2016 08:47:00 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 531F327F7A for ; Thu, 30 Jun 2016 08:47:00 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 47C79285FB; Thu, 30 Jun 2016 08:47:00 +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 BF92F27F7A for ; Thu, 30 Jun 2016 08:46:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752030AbcF3I1L (ORCPT ); Thu, 30 Jun 2016 04:27:11 -0400 Received: from mailout4.w1.samsung.com ([210.118.77.14]:19123 "EHLO mailout4.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752007AbcF3I1I (ORCPT ); Thu, 30 Jun 2016 04:27:08 -0400 Received: from eucpsbgm2.samsung.com (unknown [203.254.199.245]) by mailout4.w1.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTP id <0O9K00MJ8ST56X80@mailout4.w1.samsung.com>; Thu, 30 Jun 2016 09:27:05 +0100 (BST) X-AuditID: cbfec7f5-f792a6d000001302-52-5774d7d9ba4d Received: from eusync2.samsung.com ( [203.254.199.212]) by eucpsbgm2.samsung.com (EUCPMTA) with SMTP id B9.F3.04866.9D7D4775; Thu, 30 Jun 2016 09:27:05 +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:27:05 +0100 (BST) From: Krzysztof Kozlowski To: Andrew Morton Cc: linux-kernel@vger.kernel.org, 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 Subject: [PATCH v5 13/44] drm/msm: dma-mapping: Use unsigned long for dma_attrs Date: Thu, 30 Jun 2016 10:25:40 +0200 Message-id: <1467275171-6298-13-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+NgFlrNLMWRmVeSWpSXmKPExsVy+t/xK7o3r5eEG6xZaWrRe+4kk8Wc9WvY LDbOWM9qceXrezaLOc/PMlqcnrCIyeL1C0OLifvPsltc3jWHzeL5wh/MDlweO2fdZffYvELL 48SM3ywe2789YPW4332cyaNvyypGj8+b5ALYo7hsUlJzMstSi/TtErgyfr3sYCnYzlvxdbVY A+N7ri5GTg4JAROJZdtOMEPYYhIX7q1n62Lk4hASWMoo0TP5ESuE08gkcW9CHxNIFZuAscTm 5UvYQGwRAV2JVc93MYMUMQscZZL4vv0LO0hCWMBf4tzUKWBFLAKqEvuvT2IEsXkF3CWede1i h1gnJ3Hy2GSgDRwcnEDx2d/9IZa1MEoc2zeJeQIj7wJGhlWMoqmlyQXFSem5RnrFibnFpXnp esn5uZsYIUH4dQfj0mNWhxgFOBiVeHgdmEvChVgTy4orcw8xSnAwK4nwbr8CFOJNSaysSi3K jy8qzUktPsQozcGiJM47c9f7ECGB9MSS1OzU1ILUIpgsEwenVAOjZGSqmIJj8YOAywn3gmz7 nxedenXhWbZKfMuZAGXuI8dLzb3aTWM7DsyOrO2Z4DzjuoXh7aCTzT8b7grtcLz+6mTNi3/d 5425dN/tmGN161eLYUyq3IZNwb/mfllolZ2/dG8E3/cNt2VM9A+9UlyyLufRry2sV2LuzNnY sTtMLsnYc5Epx5ufSizFGYmGWsxFxYkA4RHHlT4CAAA= 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 9c654092ef78..40def35030d6 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;