linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v1 0/4] drm/msm/a6xx: Add support for zap shader
@ 2019-03-12 18:13 Jordan Crouse
  2019-03-12 18:13 ` [PATCH v1 1/4] drm/msm/gpu: Move zap shader loading to adreno Jordan Crouse
                   ` (3 more replies)
  0 siblings, 4 replies; 10+ messages in thread
From: Jordan Crouse @ 2019-03-12 18:13 UTC (permalink / raw)
  To: freedreno
  Cc: Bjorn Andersson, Sean Paul, Arnd Bergmann, Thomas Zimmermann,
	Sharat Masetty, dri-devel, Rob Herring, David Airlie,
	Douglas Anderson, Rob Clark, David Brown, devicetree,
	linux-arm-msm, Andy Gross, Daniel Mack, Kees Cook, linux-kernel,
	Jonathan Marek, Mark Rutland, Mamta Shukla, Daniel Vetter


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.


Jordan Crouse (4):
  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
  arm64: dts: sdm845: Add zap shader region for GPU

 .../devicetree/bindings/display/msm/gpu.txt        |   7 ++
 arch/arm64/boot/dts/qcom/sdm845.dtsi               |  11 ++
 drivers/gpu/drm/msm/adreno/a5xx_gpu.c              | 109 +-------------------
 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            | 113 +++++++++++++++++++++
 drivers/gpu/drm/msm/adreno/adreno_gpu.h            |   6 ++
 7 files changed, 176 insertions(+), 109 deletions(-)

-- 
2.7.4


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2019-04-01 16:13 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-03-12 18:13 [PATCH v1 0/4] drm/msm/a6xx: Add support for zap shader Jordan Crouse
2019-03-12 18:13 ` [PATCH v1 1/4] drm/msm/gpu: Move zap shader loading to adreno Jordan Crouse
2019-03-12 18:13 ` [PATCH v1 2/4] drm/msm/a6xx: Add zap shader load Jordan Crouse
2019-03-12 18:13 ` [PATCH v1 3/4] dt-bindings: drm/msm/gpu: Document a5xx / a6xx zap shader region Jordan Crouse
2019-03-28 13:32   ` Rob Herring
2019-04-01 16:13     ` Jordan Crouse
2019-03-12 18:13 ` [PATCH v1 4/4] arm64: dts: sdm845: Add zap shader region for GPU Jordan Crouse
2019-03-13 15:42   ` [Freedreno] " Rob Clark
2019-03-14  5:20     ` Bjorn Andersson
2019-03-14 16:59       ` Rob Clark

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).