aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLucas Stach <l.stach@pengutronix.de>2018-01-22 06:35:14 -0500
committerLucas Stach <l.stach@pengutronix.de>2018-03-09 06:22:37 -0500
commit007ad58dd3cd77d97b293020989298b09320fe53 (patch)
tree623e47ee34df69e597dfd61589c2069b1075ab49
parent681c19c8bf34df58e6705ba4c1a1676474ef7799 (diff)
drm/etnaviv: add security handling mode enum
With the introduction of GPU security we have 3 different modes of GPU operation: - GPU core doesn't have security features -> no handling required - the security related states are handled by the kernel driver - the security related states are handled by a TrustZone application Add a enum to differentiate between the different operation modes. Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
-rw-r--r--drivers/gpu/drm/etnaviv/etnaviv_gpu.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/gpu/drm/etnaviv/etnaviv_gpu.h b/drivers/gpu/drm/etnaviv/etnaviv_gpu.h
index 1620015f90ae..3c3005501846 100644
--- a/drivers/gpu/drm/etnaviv/etnaviv_gpu.h
+++ b/drivers/gpu/drm/etnaviv/etnaviv_gpu.h
@@ -84,6 +84,12 @@ struct etnaviv_chip_identity {
84 u8 varyings_count; 84 u8 varyings_count;
85}; 85};
86 86
87enum etnaviv_sec_mode {
88 ETNA_SEC_NONE = 0,
89 ETNA_SEC_KERNEL,
90 ETNA_SEC_TZ
91};
92
87struct etnaviv_event { 93struct etnaviv_event {
88 struct dma_fence *fence; 94 struct dma_fence *fence;
89 struct etnaviv_gem_submit *submit; 95 struct etnaviv_gem_submit *submit;
@@ -102,6 +108,7 @@ struct etnaviv_gpu {
102 struct device *dev; 108 struct device *dev;
103 struct mutex lock; 109 struct mutex lock;
104 struct etnaviv_chip_identity identity; 110 struct etnaviv_chip_identity identity;
111 enum etnaviv_sec_mode sec_mode;
105 struct etnaviv_file_private *lastctx; 112 struct etnaviv_file_private *lastctx;
106 struct workqueue_struct *wq; 113 struct workqueue_struct *wq;
107 struct drm_gpu_scheduler sched; 114 struct drm_gpu_scheduler sched;