From patchwork Fri Oct 5 13:08:28 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sharat Masetty X-Patchwork-Id: 10628015 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 55A241515 for ; Fri, 5 Oct 2018 13:08:47 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3F914290F3 for ; Fri, 5 Oct 2018 13:08:47 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 31B2729104; Fri, 5 Oct 2018 13:08:47 +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=-7.7 required=2.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,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 B6E2F290F3 for ; Fri, 5 Oct 2018 13:08:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727739AbeJEUHZ (ORCPT ); Fri, 5 Oct 2018 16:07:25 -0400 Received: from smtp.codeaurora.org ([198.145.29.96]:51576 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727733AbeJEUHZ (ORCPT ); Fri, 5 Oct 2018 16:07:25 -0400 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id BC64B60A98; Fri, 5 Oct 2018 13:08:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1538744924; bh=drbycPNBbNvdCRmYYI73FqmiPGBAK8+NuF/QJRgQ/xA=; h=From:To:Cc:Subject:Date:From; b=J4G/am0gJyAv95Kxc2TS0udRRQ2sGe5p+2C41VxoZ4pd0eFhYorm9yeHUZryRjbTP lUEuQvOwya1NyitM94qf9SbeFAaOjw8/SX2LRMAUH7jFGqScr4pgJQxJmODQH5g1eU TVbKxyf+uvmF7kClfkOFnZuNPrlYuYxhsbnvyeA0= Received: from smasetty-linux.qualcomm.com (blr-c-bdr-fw-01_globalnat_allzones-outside.qualcomm.com [103.229.19.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: smasetty@smtp.codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id C805F6079B; Fri, 5 Oct 2018 13:08:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1538744924; bh=drbycPNBbNvdCRmYYI73FqmiPGBAK8+NuF/QJRgQ/xA=; h=From:To:Cc:Subject:Date:From; b=J4G/am0gJyAv95Kxc2TS0udRRQ2sGe5p+2C41VxoZ4pd0eFhYorm9yeHUZryRjbTP lUEuQvOwya1NyitM94qf9SbeFAaOjw8/SX2LRMAUH7jFGqScr4pgJQxJmODQH5g1eU TVbKxyf+uvmF7kClfkOFnZuNPrlYuYxhsbnvyeA0= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org C805F6079B Authentication-Results: pdx-caf-mail.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: pdx-caf-mail.web.codeaurora.org; spf=none smtp.mailfrom=smasetty@codeaurora.org From: Sharat Masetty To: freedreno@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org, linux-arm-msm@vger.kernel.org, jcrouse@codeaurora.org, Sharat Masetty Subject: [v2 0/7] drm/msm/a6xx: System Cache Support Date: Fri, 5 Oct 2018 18:38:28 +0530 Message-Id: <1538744915-25490-1-git-send-email-smasetty@codeaurora.org> X-Mailer: git-send-email 1.9.1 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 Some hardware variants contain a system level cache or the last level cache(llc). This cache is typically a large block which is shared by multiple clients on the SOC. GPU uses the system cache to cache both the GPU data buffers(like textures) as well the SMMU pagetables. This helps with improved render performance as well as lower power consumption by reducing the bus traffic to the system memory. The system cache architecture allows the cache to be split into slices which then be used by multiple SOC clients. This patch series is an effort to enable and use two of those slices perallocated for the GPU, one for the GPU data buffers and another for the GPU SMMU hardware pagetables. v2: Fixed code review comments from previous round. The first version was posted a few months ago, so this is a refresh of the previous series. Update code to conform to the newer version of the core llcc driver. Minor tweaks and adjustments here and there. Testing: Nothing breaks, but need to profile DDR traffic to see the impact the cache blocks are really making. Please review... Jordan Crouse (1): soc: qcom: llcc-slice: Add error checks for API functions Sharat Masetty (5): drm/msm: rearrange the gpu_rmw() function drm/msm/adreno: Add registers in the GPU CX domain arm64:dts:sdm845: Add register range for gpu CX drm/msm: Pass mmu features to generic layers drm/msm/a6xx: Add support for using system cache(LLC) Vivek Gautam (1): iommu/arm-smmu: Add support to use Last level cache arch/arm64/boot/dts/qcom/sdm845.dtsi | 4 +- drivers/gpu/drm/msm/adreno/a3xx_gpu.c | 2 +- drivers/gpu/drm/msm/adreno/a4xx_gpu.c | 2 +- drivers/gpu/drm/msm/adreno/a5xx_gpu.c | 2 +- drivers/gpu/drm/msm/adreno/a6xx.xml.h | 3 + drivers/gpu/drm/msm/adreno/a6xx_gpu.c | 159 +++++++++++++++++++++++++++++++- drivers/gpu/drm/msm/adreno/a6xx_gpu.h | 9 ++ drivers/gpu/drm/msm/adreno/adreno_gpu.c | 4 +- drivers/gpu/drm/msm/adreno/adreno_gpu.h | 2 +- drivers/gpu/drm/msm/msm_drv.c | 8 ++ drivers/gpu/drm/msm/msm_drv.h | 1 + drivers/gpu/drm/msm/msm_gpu.c | 6 +- drivers/gpu/drm/msm/msm_gpu.h | 6 +- drivers/gpu/drm/msm/msm_iommu.c | 13 +++ drivers/gpu/drm/msm/msm_mmu.h | 14 +++ drivers/iommu/arm-smmu.c | 14 +++ drivers/iommu/io-pgtable-arm.c | 24 ++++- drivers/iommu/io-pgtable.h | 4 + drivers/soc/qcom/llcc-slice.c | 15 ++- include/linux/iommu.h | 4 + 20 files changed, 276 insertions(+), 20 deletions(-) --- 1.9.1