Skip to content

drm/msm/a6xx: Add support for zap shader

Jordan Crouse dri-devel linux-arm-msm linux-devicetree lkml 2 versions – New

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest3 patches 0 repliesNew
  2. v14 patches 5 repliesSuperseded

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3drm/msm/gpu: Move zap shader loading to adrenodrivers/gpu/drm/msm/adreno/a5xx_gpu.c drivers/gpu/drm/msm/adreno/adreno_gpu.c drivers/gpu/drm/msm/adreno/adreno_gpu.h+142 -1100 replies
2/3drm/msm/a6xx: Add zap shader loaddrivers/gpu/drm/msm/adreno/a6xx_gpu.c drivers/gpu/drm/msm/adreno/adreno_device.c+38 -10 replies
3/3dt-bindings: drm/msm/gpu: Document a5xx / a6xx zap shader regionDocumentation/devicetree/bindings/display/msm/gpu.txt+7 -00 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.

Read the v2 thread

Cover letter [PATCH v2 0/3] drm/msm/a6xx: Add support for zap shader

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(-)
Signature · 6 lines
2.7.4

_______________________________________________
Freedreno mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/freedreno