From: Jordan Crouse <jcrouse@codeaurora.org>
To: freedreno@lists.freedesktop.org
Cc: Bjorn Andersson <bjorn.andersson@linaro.org>,
Sean Paul <sean@poorly.run>, Daniel Mack <daniel@zonque.org>,
Wen Yang <wen.yang99@zte.com.cn>,
Thomas Zimmermann <tzimmermann@suse.de>,
linux-arm-msm@vger.kernel.org, Kees Cook <keescook@chromium.org>,
Sharat Masetty <smasetty@codeaurora.org>,
dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org,
devicetree@vger.kernel.org,
Douglas Anderson <dianders@chromium.org>,
Rob Clark <robdclark@gmail.com>, David Airlie <airlied@linux.ie>,
Jonathan Marek <jonathan@marek.ca>,
Rob Herring <robh+dt@kernel.org>,
Mark Rutland <mark.rutland@arm.com>,
Mamta Shukla <mamtashukla555@gmail.com>,
Daniel Vetter <daniel@ffwll.ch>
Subject: [PATCH v2 0/3] drm/msm/a6xx: Add support for zap shader
Date: Fri, 19 Apr 2019 13:46:13 -0600 [thread overview]
Message-ID: <1555703176-5499-1-git-send-email-jcrouse@codeaurora.org> (raw)
This patch series adds support for loading the zap shader on a6xx and using it
to get the GPU out of secure mode.
The Adreno a5xx and a6xx GPUs boot in "secure" mode which restricts the memory
the GPU is allowed to use. To get the GPU out of secure mode we need to write
to a register. However some bootloaders block access to this register and
require that the GPU instead perform a sequence to pull the GPU out of secure
mode. This sequence requires a special "zap" shader that will execute in
secure mode, clear out all the internal GPU settings and then transition to
in-secure mode.
This series adds support for loading and using the zap shader on a6xx assuming
that the shader exists and that the bootloader supports the secure mode. If any
part of the sequence fails then fall back to writing the register. If we get it
wrong, then writing to the register will trigger a protection mode error and
the system will go down.
The actual zap shader works almost identically to the one on 5xx outside of
a minor workaround for system resume. The first patch moves the a5xx specific
support to the generic adreno driver. The second patch add support for the
zap shader and the final two patches add the DT bindings and DT settings for
setting up the reserved memory that the shader requires.
v2: Reduced the redundant log messages for targets that don't need the zap
shader
Jordan Crouse (3):
drm/msm/gpu: Move zap shader loading to adreno
drm/msm/a6xx: Add zap shader load
dt-bindings: drm/msm/gpu: Document a5xx / a6xx zap shader region
.../devicetree/bindings/display/msm/gpu.txt | 7 ++
drivers/gpu/drm/msm/adreno/a5xx_gpu.c | 111 +----------------
drivers/gpu/drm/msm/adreno/a6xx_gpu.c | 38 +++++-
drivers/gpu/drm/msm/adreno/adreno_device.c | 1 +
drivers/gpu/drm/msm/adreno/adreno_gpu.c | 135 +++++++++++++++++++++
drivers/gpu/drm/msm/adreno/adreno_gpu.h | 6 +
6 files changed, 187 insertions(+), 111 deletions(-)
--
2.7.4
next reply other threads:[~2019-04-19 19:46 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-04-19 19:46 Jordan Crouse [this message]
2019-04-19 19:46 ` [PATCH v2 1/3] drm/msm/gpu: Move zap shader loading to adreno Jordan Crouse
2019-04-19 19:46 ` [PATCH v2 2/3] drm/msm/a6xx: Add zap shader load Jordan Crouse
2019-04-19 19:46 ` [PATCH v2 3/3] dt-bindings: drm/msm/gpu: Document a5xx / a6xx zap shader region Jordan Crouse
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1555703176-5499-1-git-send-email-jcrouse@codeaurora.org \
--to=jcrouse@codeaurora.org \
--cc=airlied@linux.ie \
--cc=bjorn.andersson@linaro.org \
--cc=daniel@ffwll.ch \
--cc=daniel@zonque.org \
--cc=devicetree@vger.kernel.org \
--cc=dianders@chromium.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=freedreno@lists.freedesktop.org \
--cc=jonathan@marek.ca \
--cc=keescook@chromium.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mamtashukla555@gmail.com \
--cc=mark.rutland@arm.com \
--cc=robdclark@gmail.com \
--cc=robh+dt@kernel.org \
--cc=sean@poorly.run \
--cc=smasetty@codeaurora.org \
--cc=tzimmermann@suse.de \
--cc=wen.yang99@zte.com.cn \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome