From patchwork Wed Jul 13 08:41:05 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 9227237 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 D35486075D for ; Wed, 13 Jul 2016 08:51:11 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C3E102756B for ; Wed, 13 Jul 2016 08:51:11 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B4D862766D; Wed, 13 Jul 2016 08:51: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=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 A22682756B for ; Wed, 13 Jul 2016 08:51:09 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752613AbcGMIml (ORCPT ); Wed, 13 Jul 2016 04:42:41 -0400 Received: from mailout3.w1.samsung.com ([210.118.77.13]:55532 "EHLO mailout3.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932119AbcGMIma (ORCPT ); Wed, 13 Jul 2016 04:42:30 -0400 Received: from eucpsbgm1.samsung.com (unknown [203.254.199.244]) by mailout3.w1.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTP id <0OA800J4QW67YA30@mailout3.w1.samsung.com>; Wed, 13 Jul 2016 09:42:07 +0100 (BST) X-AuditID: cbfec7f4-f796c6d000001486-60-5785fedf8040 Received: from eusync3.samsung.com ( [203.254.199.213]) by eucpsbgm1.samsung.com (EUCPMTA) with SMTP id 30.A0.05254.FDEF5875; Wed, 13 Jul 2016 09:42:07 +0100 (BST) Received: from AMDC2174.DIGITAL.local ([106.120.53.17]) by eusync3.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTPA id <0OA800KINW5J0E10@eusync3.samsung.com>; Wed, 13 Jul 2016 09:42:07 +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 v6 14/46] drm/msm: dma-mapping: Use unsigned long for dma_attrs Date: Wed, 13 Jul 2016 10:41:05 +0200 Message-id: <1468399300-5399-14-git-send-email-k.kozlowski@samsung.com> X-Mailer: git-send-email 1.9.1 In-reply-to: <1468399300-5399-13-git-send-email-k.kozlowski@samsung.com> References: <1468399167-28083-1-git-send-email-k.kozlowski@samsung.com> <1468399300-5399-1-git-send-email-k.kozlowski@samsung.com> <1468399300-5399-2-git-send-email-k.kozlowski@samsung.com> <1468399300-5399-3-git-send-email-k.kozlowski@samsung.com> <1468399300-5399-4-git-send-email-k.kozlowski@samsung.com> <1468399300-5399-5-git-send-email-k.kozlowski@samsung.com> <1468399300-5399-6-git-send-email-k.kozlowski@samsung.com> <1468399300-5399-7-git-send-email-k.kozlowski@samsung.com> <1468399300-5399-8-git-send-email-k.kozlowski@samsung.com> <1468399300-5399-9-git-send-email-k.kozlowski@samsung.com> <1468399300-5399-10-git-send-email-k.kozlowski@samsung.com> <1468399300-5399-11-git-send-email-k.kozlowski@samsung.com> <1468399300-5399-12-git-send-email-k.kozlowski@samsung.com> <1468399300-5399-13-git-send-email-k.kozlowski@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFlrNLMWRmVeSWpSXmKPExsVy+t/xq7r3/7WGG7Tv4bfoPXeSyWLO+jVs FhtnrGe1uPL1PZvFnOdnGS1OT1jEZPH6haHFxP1n2S0u75rDZvF84Q9mBy6PnbPusntsXqHl cWLGbxaP7d8esHrc7z7O5NG3ZRWjx+dNcgHsUVw2Kak5mWWpRfp2CVwZJ3bKFHzhrTjw5gJz A+MS7i5GTg4JAROJrt+tbBC2mMSFe+uBbC4OIYGljBIfWuYyQjiNTBLnd11mBqliEzCW2Lx8 CViHiICuxKrnu5hBipgFjjJJfN/+hb2LkYNDWMBfYs0EsBoWAVWJMz0QG3gF3CV6NjawQGyT kzh5bDIriM0p4CFxZ14LE8SyJ2wSqw42M05g5F3AyLCKUTS1NLmgOCk911CvODG3uDQvXS85 P3cTIyQIv+xgXHzM6hCjAAejEg8vo0hruBBrYllxZe4hRgkOZiUR3qd/gUK8KYmVValF+fFF pTmpxYcYpTlYlMR55+56HyIkkJ5YkpqdmlqQWgSTZeLglGpgXBPCIfVXvPavpukzzruPcppl bz9emnauJOQbI8cb0y0K0iLXXpjb/vor8z/v6tQXswXWHw77xS1fdLvztPuv+cU5Ynrzk5gP vTl6/cLKDe77+DcZHm/ad2KiXKlIRdivbULBrcz79h8RVPVmjplcIBXKr1xSN+t9zfV5ZaoX bLO57ir8C+16o8RSnJFoqMVcVJwIAPAkAFM+AgAA 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 [for drm] Acked-by: Daniel Vetter --- 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 108f9d4876b9..95b99f6b8826 100644 --- a/drivers/gpu/drm/msm/msm_drv.c +++ b/drivers/gpu/drm/msm/msm_drv.c @@ -238,11 +238,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); @@ -310,21 +309,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;