]> asedeno.scripts.mit.edu Git - linux.git/commit
drm/msm/a6xx: Add zap shader load
authorJordan Crouse <jcrouse@codeaurora.org>
Fri, 19 Apr 2019 19:46:15 +0000 (13:46 -0600)
committerRob Clark <robdclark@chromium.org>
Sun, 21 Apr 2019 14:37:17 +0000 (07:37 -0700)
commitabccb9fe326743b72c8099d5cc039e9038bc50da
tree8a02408b086360b867d8088eb2fc0239d3386b82
parenta9e2559c931d7c44ae7d677b12093956ffa864b9
drm/msm/a6xx: Add zap shader load

The a6xx GPU powers on in secure mode which restricts what memory it can
write to. To get out of secure mode the GPU driver can write to
REG_A6XX_RBBM_SECVID_TRUST_CNTL but on targets that are "secure" that
register region is blocked and writes will cause the system to go down.

For those targets we need to execute a special sequence that involves
loadinga special shader that clears the GPU registers and use a PM4
sequence to pull the GPU out of secure. Add support for loading the zap
shader and executing the secure sequence. For targets that do not support
SCM or the specific SCM sequence this should fail and we would fall back
to writing the register.

Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
Signed-off-by: Rob Clark <robdclark@chromium.org>
drivers/gpu/drm/msm/adreno/a6xx_gpu.c
drivers/gpu/drm/msm/adreno/adreno_device.c