From patchwork Sun Jun 16 13:29:24 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Brian Masney X-Patchwork-Id: 10997457 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 1061614B6 for ; Sun, 16 Jun 2019 14:03:26 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0081D286E2 for ; Sun, 16 Jun 2019 14:03:26 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E6CC1286EE; Sun, 16 Jun 2019 14:03:25 +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,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 9C483286E2 for ; Sun, 16 Jun 2019 14:03:25 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id AB5BB891F4; Sun, 16 Jun 2019 14:02:47 +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 6392F890D2; Sun, 16 Jun 2019 13:29:47 +0000 (UTC) Received: from localhost.localdomain (c-98-239-145-235.hsd1.wv.comcast.net [98.239.145.235]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: masneyb) by onstation.org (Postfix) with ESMTPSA id CA9F43E93E; Sun, 16 Jun 2019 13:29:44 +0000 (UTC) From: Brian Masney To: agross@kernel.org, david.brown@linaro.org, robdclark@gmail.com, sean@poorly.run, robh+dt@kernel.org Subject: [PATCH 0/6] qcom: add OCMEM support Date: Sun, 16 Jun 2019 09:29:24 -0400 Message-Id: <20190616132930.6942-1-masneyb@onstation.org> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 X-Mailman-Approved-At: Sun, 16 Jun 2019 14:01:48 +0000 X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=onstation.org; s=default; t=1560691785; bh=akXf0t16W4Sv5yqWMp8rlGNlkVwrweBmlxxAJMCWsQw=; h=From:To:Cc:Subject:Date:From; b=Lpa7v/Gp1/3yY9yBwkC4e6pSdJBxEMiwerKe3c5+Y57mKACYCkm3+fH+44SEPHSTU 1qmNLda5eF25JuF84km1i5ujC7/B5DclnGtWByOYDsrgQr1EJd5ZenrG3gmZENxdsY yg8PvSpwX+d1QhsV0H+zbST8u+UzsHUpxDn8gjOU= 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, bjorn.andersson@linaro.org, freedreno@lists.freedesktop.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP 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. 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/. Brian Masney (3): dt-bindings: soc: qcom: add On Chip MEMory (OCMEM) bindings dt-bindings: display: msm: gmu: add optional ocmem property drm/msm/gpu: add ocmem init/cleanup functions Rob Clark (3): firmware: qcom: scm: add support to restore secure config firmware: qcom: scm: add OCMEM lock/unlock interface soc: qcom: add OCMEM driver .../devicetree/bindings/display/msm/gmu.txt | 4 + .../bindings/soc/qcom/qcom,ocmem.yaml | 66 +++ drivers/firmware/qcom_scm-32.c | 56 +++ drivers/firmware/qcom_scm-64.c | 18 + drivers/firmware/qcom_scm.c | 63 +++ drivers/firmware/qcom_scm.h | 15 + drivers/gpu/drm/msm/adreno/a3xx_gpu.c | 33 +- drivers/gpu/drm/msm/adreno/a3xx_gpu.h | 3 +- drivers/gpu/drm/msm/adreno/a4xx_gpu.c | 30 +- drivers/gpu/drm/msm/adreno/a4xx_gpu.h | 3 +- drivers/gpu/drm/msm/adreno/adreno_gpu.c | 41 ++ drivers/gpu/drm/msm/adreno/adreno_gpu.h | 10 + drivers/soc/qcom/Kconfig | 10 + drivers/soc/qcom/Makefile | 1 + drivers/soc/qcom/ocmem.c | 402 ++++++++++++++++++ drivers/soc/qcom/ocmem.xml.h | 86 ++++ include/linux/qcom_scm.h | 28 ++ include/soc/qcom/ocmem.h | 34 ++ 18 files changed, 857 insertions(+), 46 deletions(-) create mode 100644 Documentation/devicetree/bindings/soc/qcom/qcom,ocmem.yaml create mode 100644 drivers/soc/qcom/ocmem.c create mode 100644 drivers/soc/qcom/ocmem.xml.h create mode 100644 include/soc/qcom/ocmem.h