From patchwork Wed Aug 14 21:59:55 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rob Clark X-Patchwork-Id: 11094657 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id E5F151395 for ; Wed, 14 Aug 2019 22:02:40 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D4E0628658 for ; Wed, 14 Aug 2019 22:02:40 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C880C28892; Wed, 14 Aug 2019 22:02:40 +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=-5.2 required=2.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,DKIM_VALID,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 3B74728658 for ; Wed, 14 Aug 2019 22:02:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:To :From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=vkSr+4kK0h0lGsB2F4/gea9thwHA8+8tWptpCXBIb6M=; b=u7aM5MGyzUChCE PKYp+PtqnUrl2oQXHQ1LgUGfjkJ/n7K1f1QV8uoPAaely4W4D7CmM6WxPwj7RP1BLZZyIRvbWhu8l j6e+b/1LauJrOYbF4GEZQ3m2NZDtIYyI9vPf8sQcAG7t3MaT0sHYDd42l6MThCjia940/scTArhDH Nl+egwgMu21dGwD4xf1o2ABF1mzvErdAcnFXUGnr4huJTTMU0R1GP3GDEp50eNDkEWopRPw8ZxqTx Ce2RuWc15eKqdXAvjBW2UwhFLSb5OdOi9l++pAkMBzi9yqeJMUtCoZG/iV+zGx/HQz0jYQ09Cwpo3 YBFtOIIMYm3dpzNI7ujw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92 #3 (Red Hat Linux)) id 1hy1Lq-0001uH-PQ; Wed, 14 Aug 2019 22:02:38 +0000 Received: from mail-pf1-x443.google.com ([2607:f8b0:4864:20::443]) by bombadil.infradead.org with esmtps (Exim 4.92 #3 (Red Hat Linux)) id 1hy1Ln-0001ts-8s for linux-arm-kernel@lists.infradead.org; Wed, 14 Aug 2019 22:02:36 +0000 Received: by mail-pf1-x443.google.com with SMTP id g2so196090pfq.0 for ; Wed, 14 Aug 2019 15:02:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=3oPlzvlPf3Rzc4cpgcIkobJmF5pbYWdwPlsySxjkAj0=; b=QsFDkKjaHSdT6ZUi+JJ7HPBAsxs4M45zVvakOMVd/f1v8yDy4Pe2ktVQIi6TcbQGs4 +0rdap1k9RPnLJwD5sJG3RNHYDxiRp0DpzJa5rPFrWQYYZMFBDR8URhlW4LyWGSqLgDi v3nOVWGRXtObRIix2efxPL/FTSeXBV1Vh2bbPdS8+IInFkXk++Du4gd7sLVkXZIY9UIM oYSDp2D5AqVVqNwWUutnIu0wP3/+nwxYcTorj1iRwjtVLn7UIscolWVJf7FLpK6z/dax WEJZB9Z60/rNmcFNC4/QIfBMeYoSOqxs+6j8XIafhDh0BI51LPUU+2Cx0JIDhTMJ/+No RmDw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=3oPlzvlPf3Rzc4cpgcIkobJmF5pbYWdwPlsySxjkAj0=; b=P7hFqHDIcPbyUPkMvfOCIjTkxsl5lgpCpJXuPlSCYTaFAuCjPwHdt+sN4gyrlDiGxs H3oX4aWlKxmBnJ1N3iyabPltOqrn7bTOlnAzPC15KesI6YpN44m+5IWxrvkhDCPxvmvR SfjCoG9TvQG4oNCxARqnowwLM3AEdL44trKHy6pUI4vS1cWvcWCHuegLos7JrMchgppQ PFiziMRlEFDp+pQC0kjyc06YLzYrAodc66Bw5mX3ETtKBe4nLlQK3bs33xBStIHMQ6zk o+7ApXUgUlcIofeQlFIu8fHRizuq0ZmkpNUrN0+KpDRZ/5IT6K2wq/7nTIXt2WSlsSwZ lKfA== X-Gm-Message-State: APjAAAWlczcjX9Fu/MwGSNgDcdP94nbFkvOA+dR8k0lV5b/5Va/0poEa 5bR1ww6k0hAi5PjIwZz1mXw= X-Google-Smtp-Source: APXvYqzCBQPKmpeFEXKLaI6VKfcy6SgcaxLxPzYa/x4WSu39Iu3WSkxBPKAcusu6di8joy6ZTM5XDQ== X-Received: by 2002:a62:4e09:: with SMTP id c9mr2268787pfb.130.1565820153895; Wed, 14 Aug 2019 15:02:33 -0700 (PDT) Received: from localhost ([100.118.89.196]) by smtp.gmail.com with ESMTPSA id d129sm896504pfc.168.2019.08.14.15.02.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 14 Aug 2019 15:02:33 -0700 (PDT) From: Rob Clark To: dri-devel@lists.freedesktop.org Subject: [PATCH 0/6] drm+dma: cache support for arm, etc Date: Wed, 14 Aug 2019 14:59:55 -0700 Message-Id: <20190814220011.26934-1-robdclark@gmail.com> X-Mailer: git-send-email 2.21.0 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190814_150235_341602_A1CED8A9 X-CRM114-Status: GOOD ( 11.66 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Kate Stewart , Masayoshi Mizuma , "Maciej W. Rozycki" , Eric Biggers , Catalin Marinas , Imre Deak , Chris Wilson , Masahiro Yamada , Benjamin Gaignard , Mauro Carvalho Chehab , Will Deacon , Christoph Hellwig , Emil Velikov , Rob Clark , Michael Ellerman , Mike Rapoport , Geert Uytterhoeven , "moderated list:ARM64 PORT AARCH64 ARCHITECTURE" , Daniel Vetter , "open list:MIPS" , Linus Walleij , Robin Murphy , "open list:DRM DRIVER FOR MSM ADRENO GPU" , Deepak Sharma , Joerg Roedel , Arnd Bergmann , Anshuman Khandual , Hauke Mehrtens , Jesper Dangaard Brouer , "Wolfram Sang \(Renesas\)" , "open list:LINUX FOR POWERPC 32-BIT AND 64-BIT" , Alexios Zavras , Russell King , Doug Anderson , Thomas Gleixner , Sean Paul , Allison Randal , Christophe Leroy , Enrico Weigelt , Ard Biesheuvel , Greg Kroah-Hartman , open list , Paul Burton , Souptick Joarder , Andrew Morton , "open list:DRM DRIVER FOR MSM ADRENO GPU" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP From: Rob Clark This is a replacement for a previous patches[1] that was adding arm64 support for drm_clflush. I've also added a patch to solve a similar cache issue in vgem. The first few patches just export arch_sync_dma_for_*(). Possibly instead the EXPORT_SYMBOL_GPL() should be somewere central, rather than per-arch (but where would make sense?) The fourth adds (and exports) these ops for arch/arm. (Arnd Bergmann mentioned on IRC that Christoph Hellwig was working on this already for arch/arm which could replace the fourth patch.) The last two patches actually fix things. [1] https://patchwork.freedesktop.org/series/64732/ Rob Clark (6): arm64: export arch_sync_dma_for_*() mips: export arch_sync_dma_for_*() powerpc: export arch_sync_dma_for_*() arm: add arch_sync_dma_for_*() drm/msm: stop abusing DMA API drm/vgem: fix cache synchronization on arm/arm64 (take two) arch/arm/Kconfig | 2 + arch/arm/mm/dma-mapping-nommu.c | 14 +++ arch/arm/mm/dma-mapping.c | 28 ++++++ arch/arm64/mm/dma-mapping.c | 2 + arch/arm64/mm/flush.c | 2 + arch/mips/mm/dma-noncoherent.c | 2 + arch/powerpc/mm/dma-noncoherent.c | 2 + drivers/gpu/drm/drm_cache.c | 20 ++++- drivers/gpu/drm/msm/msm_gem.c | 37 +++----- drivers/gpu/drm/vgem/vgem_drv.c | 145 ++++++++++++++++++++---------- include/drm/drm_cache.h | 4 + 11 files changed, 182 insertions(+), 76 deletions(-)