drm/msm/adreno: fix zap vs no-zap handling
authorRob Clark <robdclark@chromium.org>
Sun, 24 Nov 2019 22:23:38 +0000 (14:23 -0800)
committerRob Clark <robdclark@chromium.org>
Thu, 2 Jan 2020 22:18:52 +0000 (14:18 -0800)
commit15ab987c423df561e0949d77fb5043921ae59956
tree2b2b737d82f7cd3217e10916c165aad70a0e63c3
parentbd3fe8119dea46b850b78283b426afaa3cff6a1f
drm/msm/adreno: fix zap vs no-zap handling

We can have two cases, when it comes to "zap" fw.  Either the fw
requires zap fw to take the GPU out of secure mode at boot, or it does
not and we can write RBBM_SECVID_TRUST_CNTL directly.  Previously we
decided based on whether zap fw load succeeded, but this is not a great
plan because:

1) we could have zap fw in the filesystem on a device where it is not
   required
2) we could have the inverse case

Instead, shift to deciding based on whether we have a 'zap-shader' node
in dt.  In practice, there is only one device (currently) with upstream
dt that does not use zap (cheza), and it already has a /delete-node/ for
the zap-shader node.

Fixes: abccb9fe3267 ("drm/msm/a6xx: Add zap shader load")
Signed-off-by: Rob Clark <robdclark@chromium.org>
drivers/gpu/drm/msm/adreno/a5xx_gpu.c
drivers/gpu/drm/msm/adreno/a6xx_gpu.c