From patchwork Thu Aug 22 14:36:56 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Brian Masney X-Patchwork-Id: 11110793 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 7B969112C for ; Fri, 23 Aug 2019 07:30:49 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 64B32233A0 for ; Fri, 23 Aug 2019 07:30:49 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 64B32233A0 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=onstation.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 9C7C56EBBE; Fri, 23 Aug 2019 07:30:44 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from onstation.org (onstation.org [52.200.56.107]) by gabe.freedesktop.org (Postfix) with ESMTPS id 350FD6EB67; Thu, 22 Aug 2019 14:37:27 +0000 (UTC) Received: from ins7386.localdomain (unknown [207.110.43.92]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: masneyb) by onstation.org (Postfix) with ESMTPSA id 50C6F3E8A5; Thu, 22 Aug 2019 14:37:24 +0000 (UTC) From: Brian Masney To: agross@kernel.org, robdclark@gmail.com, sean@poorly.run, robh+dt@kernel.org, bjorn.andersson@linaro.org Subject: [PATCH v6 0/7] qcom: add OCMEM support Date: Thu, 22 Aug 2019 07:36:56 -0700 Message-Id: <20190822143703.13030-1-masneyb@onstation.org> X-Mailer: git-send-email 2.21.0 MIME-Version: 1.0 X-Mailman-Approved-At: Fri, 23 Aug 2019 07:30:43 +0000 X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=onstation.org; s=default; t=1566484646; bh=t6TP/PN3jeU5M3ONQYp1VGGuOKetsTewE0YXyKvmcNg=; h=From:To:Cc:Subject:Date:From; b=rMJkgk0v/7E+UXNxanhygtbLA3/xPZcasXZyYflUk1Ew5ryK8QGcQsOTFqwhLB08r fEHi2aWzztbdf36E9FYl3Sz6uVeuOkrY2fQi/xnkom8/1bw7rZ0GIGwp5uFESDnGO6 QJjKagQ3mCgBIC6vL4eCKPZcJoR07bN7vmjrdxrA= X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: mark.rutland@arm.com, devicetree@vger.kernel.org, jonathan@marek.ca, airlied@linux.ie, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, freedreno@lists.freedesktop.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" This patch series adds support for Qualcomm's On Chip MEMory (OCMEM) that is needed in order to support some a3xx and a4xx-based GPUs upstream. This is based on Rob Clark's patch series that he submitted in October 2015 and I am resubmitting updated patches with his permission. See the individual patches for the changelog. This was tested with the GPU on a LG Nexus 5 (hammerhead) phone and this will work on other msm8974-based systems. For a summary of what currently works upstream on the Nexus 5, see my status page at https://masneyb.github.io/nexus-5-upstream/. Changes since v5: - Rename ocmem device tree property to sram See individual patches for changelogs for previous versions. Brian Masney (5): dt-bindings: soc: qcom: add On Chip MEMory (OCMEM) bindings dt-bindings: display: msm: gmu: add optional ocmem property soc: qcom: add OCMEM driver drm/msm/gpu: add ocmem init/cleanup functions ARM: qcom_defconfig: add ocmem support Rob Clark (2): firmware: qcom: scm: add OCMEM lock/unlock interface firmware: qcom: scm: add support to restore secure config to qcm_scm-32 .../devicetree/bindings/display/msm/gmu.txt | 50 ++ .../devicetree/bindings/sram/qcom,ocmem.yaml | 96 ++++ arch/arm/configs/qcom_defconfig | 1 + drivers/firmware/qcom_scm-32.c | 52 ++- drivers/firmware/qcom_scm-64.c | 12 + drivers/firmware/qcom_scm.c | 53 +++ drivers/firmware/qcom_scm.h | 9 + drivers/gpu/drm/msm/Kconfig | 1 + drivers/gpu/drm/msm/adreno/a3xx_gpu.c | 28 +- drivers/gpu/drm/msm/adreno/a3xx_gpu.h | 3 +- drivers/gpu/drm/msm/adreno/a4xx_gpu.c | 25 +- drivers/gpu/drm/msm/adreno/a4xx_gpu.h | 3 +- drivers/gpu/drm/msm/adreno/adreno_gpu.c | 40 ++ drivers/gpu/drm/msm/adreno/adreno_gpu.h | 10 + drivers/soc/qcom/Kconfig | 10 + drivers/soc/qcom/Makefile | 1 + drivers/soc/qcom/ocmem.c | 433 ++++++++++++++++++ include/linux/qcom_scm.h | 26 ++ include/soc/qcom/ocmem.h | 62 +++ 19 files changed, 870 insertions(+), 45 deletions(-) create mode 100644 Documentation/devicetree/bindings/sram/qcom,ocmem.yaml create mode 100644 drivers/soc/qcom/ocmem.c create mode 100644 include/soc/qcom/ocmem.h