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: 9206871 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 2433460752 for ; Thu, 30 Jun 2016 08:27:18 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 15AD1285B7 for ; Thu, 30 Jun 2016 08:27:18 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 0A5A62865A; Thu, 30 Jun 2016 08:27:18 +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=-4.2 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C1E73285B7 for ; Thu, 30 Jun 2016 08:27:17 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 3C16B6E831; Thu, 30 Jun 2016 08:27:10 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mailout4.w1.samsung.com (mailout4.w1.samsung.com [210.118.77.14]) by gabe.freedesktop.org (Postfix) with ESMTPS id C99D06E82E; Thu, 30 Jun 2016 08:27:08 +0000 (UTC) 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 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= Cc: Krzysztof Kozlowski , Bartlomiej Zolnierkiewicz , linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, hch@infradead.org, freedreno@lists.freedesktop.org X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" 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;