alistair23-linux/drivers/gpu/drm/msm/adreno
Jordan Crouse 7c65817e6d drm/msm: gpu: Enable zap shader for A5XX
The A5XX GPU powers on in "secure" mode. In secure mode the GPU can
only render to buffers that are marked as secure and inaccessible
to the kernel and user through a series of hardware protections. In
practice secure mode is used to draw things like a UI on a secure
video frame.

In order to switch out of secure mode the GPU executes a special
shader that clears out the GMEM and other sensitve registers and
then writes a register. Because the kernel can't be trusted the
shader binary is signed and verified and programmed by the
secure world. To do this we need to read the MDT header and the
segments from the firmware location and put them in memory and
present them for approval.

For targets without secure support there is an out: if the
secure world doesn't support secure then there are no hardware
protections and we can freely write the SECVID_TRUST register from
the CPU. We don't have 100% confidence that we can query the
secure capabilities at run time but we have enough calls that
need to go right to give us some confidence that we're at least doing
something useful.

Of course if we guess wrong you trigger a permissions violation
which usually ends up in a system crash but thats a problem
that shows up immediately.

[v2: use child device per Bjorn]
[v3: use generic MDT loader per Bjorn]
[v4: use managed dma functions and ifdefs for the MDT loader]
[v5: Add depends for QCOM_MDT_LOADER]

Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
Acked-by: Bjorn Andersson <bjorn.andersson@linaro.org>
[robclark: fix Kconfig to use select instead of depends + #if IS_ENABLED()]
Signed-off-by: Rob Clark <robdclark@gmail.com>
2017-06-16 11:15:31 -04:00
..
a2xx.xml.h drm/msm: update generated headers 2016-11-28 15:14:10 -05:00
a3xx.xml.h drm/msm: update generated headers 2016-11-28 15:14:10 -05:00
a3xx_gpu.c drm/msm/gpu: move suspend/resume into debugfs->show 2017-04-08 06:59:31 -04:00
a3xx_gpu.h drm/msm: update generated headers 2014-08-04 11:55:28 -04:00
a4xx.xml.h drm/msm: update generated headers 2016-11-28 15:14:10 -05:00
a4xx_gpu.c drm/msm/gpu: move suspend/resume into debugfs->show 2017-04-08 06:59:31 -04:00
a4xx_gpu.h drm/msm: a4xx support for msm-drm 2014-11-16 14:27:40 -05:00
a5xx.xml.h drm/msm: update generated headers 2016-11-28 15:14:10 -05:00
a5xx_gpu.c drm/msm: gpu: Enable zap shader for A5XX 2017-06-16 11:15:31 -04:00
a5xx_gpu.h drm/msm: gpu: Enable zap shader for A5XX 2017-06-16 11:15:31 -04:00
a5xx_power.c drm/msm: gpu: Add support for the GPMU 2016-11-28 15:14:16 -05:00
adreno_common.xml.h drm/msm: update generated headers 2016-11-28 15:14:10 -05:00
adreno_device.c drm/msm: gpu: Enable zap shader for A5XX 2017-06-16 11:15:31 -04:00
adreno_gpu.c drm/msm: Hard code the GPU "slow frequency" 2017-04-08 06:59:37 -04:00
adreno_gpu.h drm/msm: gpu: Enable zap shader for A5XX 2017-06-16 11:15:31 -04:00
adreno_pm4.xml.h drm/msm: update generated headers 2016-11-28 15:14:10 -05:00