1
0
Fork 0
alistair23-linux/drivers/gpu/drm
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
..
amd Linux 4.12-rc5 2017-06-16 13:58:27 +10:00
arc drm/arcgpu: Drop drm_vblank_cleanup 2017-05-31 10:57:08 +02:00
arm Merge tag 'drm-misc-next-2017-06-02' of git://anongit.freedesktop.org/git/drm-misc into drm-next 2017-06-06 16:53:16 +10:00
armada drm: Add DRM_MODE_ROTATE_ and DRM_MODE_REFLECT_ to UAPI 2017-05-22 09:49:48 +02:00
ast drm/ast: fix include notation and remove -Iinclude/drm flag 2017-05-16 17:17:51 +02:00
atmel-hlcdc Merge tag 'drm-misc-next-2017-06-15' of git://anongit.freedesktop.org/git/drm-misc into drm-next 2017-06-16 09:33:43 +10:00
bochs drm/bochs: fix include notation and remove -Iinclude/drm flag 2017-05-16 17:18:23 +02:00
bridge drm/bridge: Refactor out the panel wrapper from the lvds-encoder bridge. 2017-06-05 14:00:40 +05:30
cirrus drm/cirrus: fix include notation and remove -Iinclude/drm flag 2017-05-16 17:18:56 +02:00
etnaviv Linux 4.12-rc3 2017-05-30 15:54:15 +10:00
exynos Summary: 2017-06-06 16:54:27 +10:00
fsl-dcu drm/fsl-dcu: use new drm_atomic_helper_shutdown 2017-06-08 14:59:14 -07:00
gma500 Linux 4.12-rc3 2017-05-30 15:54:15 +10:00
hisilicon Linux 4.12-rc5 2017-06-16 13:58:27 +10:00
i2c drm/i2c: remove unneeded -Iinclude/drm compiler flag 2017-05-18 07:13:04 +02:00
i810 drm/i810: remove unneeded -Iinclude/drm compiler flag 2017-05-18 07:12:57 +02:00
i915 Linux 4.12-rc5 2017-06-16 13:58:27 +10:00
imx Linux 4.12-rc5 2017-06-16 13:58:27 +10:00
lib
mediatek Linux 4.12-rc5 2017-06-16 13:58:27 +10:00
meson Linux 4.12-rc5 2017-06-16 13:58:27 +10:00
mga drm/mga: remove unneeded -Iinclude/drm compiler flag 2017-05-18 07:13:11 +02:00
mgag200 drm/mgag200: fix include notation and remove -Iinclude/drm flag 2017-05-17 14:35:31 +02:00
msm drm/msm: gpu: Enable zap shader for A5XX 2017-06-16 11:15:31 -04:00
mxsfb drm: mxsfb_crtc: Reset the eLCDIF controller 2017-06-15 13:30:45 -04:00
nouveau Linux 4.12-rc5 2017-06-16 13:58:27 +10:00
omapdrm drm/omap: fix tiled buffer stride calculations 2017-06-02 11:09:34 +03:00
panel drm/panel: s6e3ha2: Add support for s6e3hf2 panel on TM2e board 2017-06-14 20:18:22 +02:00
pl111 drm/pl111: Fix offset calculation for the primary plane. 2017-06-07 11:50:00 -07:00
qxl Linux 4.12-rc3 2017-05-30 15:54:15 +10:00
r128 drm/r128: remove unneeded -Iinclude/drm compiler flag 2017-05-18 07:13:23 +02:00
radeon Merge branch 'drm-next-4.13' of git://people.freedesktop.org/~agd5f/linux into drm-next 2017-06-16 09:56:53 +10:00
rcar-du drm: rcar-du: Map memory through the VSP device 2017-06-09 12:25:38 +01:00
rockchip Linux 4.12-rc5 2017-06-16 13:58:27 +10:00
savage drm/savage: remove unneeded -Iinclude/drm compiler flag 2017-05-18 07:13:34 +02:00
selftests drm/mm: Split up long running selftests with cond_resched() 2017-05-04 08:11:46 +02:00
shmobile drm: Add acquire ctx parameter to ->page_flip(_target) 2017-03-29 09:50:38 +02:00
sis drm/sis: remove unneeded -Iinclude/drm compiler flag 2017-05-18 07:13:40 +02:00
sti Merge remote-tracking branch 'airlied/drm-next' into drm-misc-next 2017-05-18 09:24:30 -04:00
stm drm/stm: Drop drm_vblank_cleanup 2017-05-31 10:48:58 +02:00
sun4i sun4i-drm changes for 4.13 2017-06-16 10:02:35 +10:00
tdfx drm/tdfx: remove unneeded -Iinclude/drm compiler flag 2017-05-18 07:13:47 +02:00
tegra Merge tag 'drm-misc-next-2017-05-16' of git://anongit.freedesktop.org/git/drm-misc into drm-next 2017-05-18 12:57:06 +10:00
tilcdc drm/tilcdc: fix include notation and remove -Iinclude/drm flag 2017-05-17 14:36:49 +02:00
tinydrm drm: Use vsnprintf extension %ph 2017-05-31 10:30:38 +02:00
ttm drm: drop drm_[cm]alloc* helpers 2017-05-18 17:22:39 +02:00
udl drm: drop drm_[cm]alloc* helpers 2017-05-18 17:22:39 +02:00
vc4 drm/vc4: Fix resource leak in 'vc4_get_hang_state_ioctl()' in error handling path 2017-06-12 17:11:39 -07:00
vgem drm/vgem: Fix return value check in vgem_init() 2017-05-22 09:47:34 +02:00
via drm/via: remove unneeded -Iinclude/drm compiler flag 2017-05-18 07:14:05 +02:00
virtio drm: Remove drm_device->virtdev 2017-05-29 20:57:25 +02:00
vmwgfx Linux 4.12-rc5 2017-06-16 13:58:27 +10:00
zte drm: zte: use devm_of_platform_populate() 2017-06-05 09:57:14 +08:00
Kconfig drm/pl111: Initial drm/kms driver for pl111 2017-05-08 12:24:06 -07:00
Makefile Merge tag 'drm-misc-next-2017-06-15' of git://anongit.freedesktop.org/git/drm-misc into drm-next 2017-06-16 09:33:43 +10:00
ati_pcigart.c
drm_agpsupport.c
drm_atomic.c drm: Reduce scope of 'state' variable 2017-06-15 14:26:02 -04:00
drm_atomic_helper.c Linux 4.12-rc5 2017-06-16 13:58:27 +10:00
drm_auth.c
drm_blend.c drm: Add DRM_MODE_ROTATE_ and DRM_MODE_REFLECT_ to UAPI 2017-05-22 09:49:48 +02:00
drm_bridge.c drm: Introduce drm_bridge_mode_valid() 2017-05-30 08:37:50 +02:00
drm_bufs.c
drm_cache.c gpu: drm: core: Convert printk(KERN_<LEVEL> to pr_<level> 2017-02-28 14:32:19 +01:00
drm_color_mgmt.c drm/doc: Interlink color manager docs better 2017-04-18 08:56:29 +02:00
drm_connector.c drm/atomic: Add support for custom scaling mode properties, v2 2017-05-08 13:20:43 +02:00
drm_context.c
drm_crtc.c drm: Take mode_config.mutex in setcrtc ioctl 2017-04-06 22:49:50 +02:00
drm_crtc_helper.c drm: Add acquire ctx parameter to ->set_config 2017-03-29 09:56:25 +02:00
drm_crtc_helper_internal.h drm: Add drm_{crtc/encoder/connector}_mode_valid() 2017-05-30 08:37:24 +02:00
drm_crtc_internal.h drm: extract legacy framebuffer remove 2017-04-06 10:22:43 +02:00
drm_debugfs.c drm/debugfs: Add kerneldoc 2017-03-24 09:36:06 +01:00
drm_debugfs_crc.c Revert "drm: Don't allow interruptions when opening debugfs/crc" 2017-04-07 16:18:28 -04:00
drm_dma.c
drm_dp_aux_dev.c
drm_dp_dual_mode_helper.c
drm_dp_helper.c drm/dp: start a DPCD based DP sink/branch device quirk database 2017-05-29 13:43:26 +03:00
drm_dp_mst_topology.c drm: Use vsnprintf extension %ph 2017-05-31 10:30:38 +02:00
drm_drv.c drm: Fix oops + Xserver hang when unplugging USB drm devices 2017-06-02 11:09:35 -04:00
drm_dumb_buffers.c
drm_edid.c drm/edid: Add 10 bpc quirk for LGD 764 panel in HP zBook 17 G2 2017-05-02 10:37:45 +02:00
drm_edid_load.c
drm_encoder.c drm: Rename connector list iterator API 2017-02-28 16:16:48 +01:00
drm_encoder_slave.c
drm_fb_cma_helper.c drm/cma-helper: Return ENOENT for "no such gem obj" 2017-04-18 17:57:37 +02:00
drm_fb_helper.c drm: Add DRM_MODE_ROTATE_ and DRM_MODE_REFLECT_ to UAPI 2017-05-22 09:49:48 +02:00
drm_file.c drm: introduce sync objects (v4) 2017-06-14 12:10:22 +10:00
drm_flip_work.c
drm_fourcc.c Merge branch 'drm-next' of git://people.freedesktop.org/~airlied/linux into drm-misc-next 2017-03-23 08:15:55 +01:00
drm_framebuffer.c drm: extract legacy framebuffer remove 2017-04-06 10:22:43 +02:00
drm_gem.c drm: drop drm_[cm]alloc* helpers 2017-05-18 17:22:39 +02:00
drm_gem_cma_helper.c Pointer for Markus's image conversion work. 2017-03-14 15:07:33 +01:00
drm_global.c
drm_hashtab.c
drm_info.c
drm_internal.h drm: introduce sync objects (v4) 2017-06-14 12:10:22 +10:00
drm_ioc32.c drm: document drm_ioctl.[hc] 2017-04-04 20:47:54 +02:00
drm_ioctl.c drm: introduce sync objects (v4) 2017-06-14 12:10:22 +10:00
drm_irq.c drm/doc: Polish irq helper documentation 2017-06-01 08:02:14 +02:00
drm_kms_helper_common.c drm: Remove drmP.h include from drm_kms_helper_common.c 2017-03-09 16:18:02 +01:00
drm_legacy.h
drm_lock.c sched/headers: Prepare for new header dependencies before moving code to <linux/sched/signal.h> 2017-03-02 08:42:29 +01:00
drm_memory.c
drm_mipi_dsi.c
drm_mm.c
drm_mode_config.c drm: Rename connector list iterator API 2017-02-28 16:16:48 +01:00
drm_mode_object.c Pointer for Markus's image conversion work. 2017-03-14 15:07:33 +01:00
drm_modes.c drm: Rename drm_mode_object_get() 2017-02-28 16:14:53 +01:00
drm_modeset_helper.c drm: Add mode_config .get_format_info() hook 2017-03-22 19:45:00 +02:00
drm_modeset_lock.c drm: Remove drm_modeset_legacy_acquire_ctx and crtc->acquire_ctx 2017-04-05 09:26:45 +02:00
drm_of.c drm: of: introduce drm_of_find_panel_or_bridge 2017-04-06 17:00:27 -04:00
drm_panel.c
drm_pci.c drm: Extract drm_pci.h 2017-03-09 16:18:02 +01:00
drm_plane.c drm: Fix deadlock retry loop in page_flip_ioctl 2017-05-23 09:39:14 +02:00
drm_plane_helper.c drm: Add DRM_MODE_ROTATE_ and DRM_MODE_REFLECT_ to UAPI 2017-05-22 09:49:48 +02:00
drm_prime.c drm/prime: Introduce drm_gem_prime_import_dev 2017-05-08 09:39:13 +02:00
drm_print.c
drm_probe_helper.c drm: Use new mode_valid() helpers in connector probe helper 2017-05-30 08:37:50 +02:00
drm_property.c drm: Fix get_property logic fumble 2017-04-12 18:11:32 +02:00
drm_rect.c drm: Add DRM_MODE_ROTATE_ and DRM_MODE_REFLECT_ to UAPI 2017-05-22 09:49:48 +02:00
drm_scatter.c
drm_scdc_helper.c drm/edid: detect SCDC support in HF-VSDB 2017-03-21 10:15:56 +02:00
drm_simple_kms_helper.c drm: Clarify the role of plane_state argument to drm_simple update(). 2017-03-30 12:02:00 -07:00
drm_syncobj.c drm/syncobj: add sync_file interaction. (v1.2) 2017-06-14 12:11:04 +10:00
drm_sysfs.c drm: Consolidate and document sysfs support 2017-04-04 20:47:54 +02:00
drm_trace.h drm: Remove drm_pending_event->pid 2017-03-14 14:38:33 +01:00
drm_trace_points.c
drm_vblank.c drm/doc: Polish irq helper documentation 2017-06-01 08:02:14 +02:00
drm_vm.c
drm_vma_manager.c