aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2014-09-10 07:18:27 -0400
committerDaniel Vetter <daniel.vetter@ffwll.ch>2014-09-19 08:41:18 -0400
commit770722585639bc2da683e72f610d5f614298e415 (patch)
tree16682dae159ddcb24c1df836fada5209d3336207 /drivers/gpu
parenta01b0e946f6db0a145dd92d7a44babd628d2c7a8 (diff)
drm/i915: HSW always use GGTT selector for secure batches
gen6 and earlier conflate address space selection (ppgtt vs ggtt) with the security bit (i.e. only privileged batches were allowed to run from ggtt). From Haswell only, you are able to select the security bit separate from the address space - and we always requested to use ppgtt. This breaks the golden render state batch execution with full-ppgtt as that is only present in the global GTT and more generally any secure batch that is not colocated in the ppgtt and ggtt. So we need to disable the use of the ppgtt selector bit for secure batches, or else we hang immediately upon boot and thence after every GPU reset... v2: Only HSW differentiates between secure dispatch and ggtt, so simply ignore the differentiation and always use secure==ggtt. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Cc: Ville Syrjälä <ville.syrjala@linux.intel.com> Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com> [danvet: Rectify commit message as noted by Chris.] Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'drivers/gpu')
-rw-r--r--drivers/gpu/drm/i915/intel_ringbuffer.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/gpu/drm/i915/intel_ringbuffer.c b/drivers/gpu/drm/i915/intel_ringbuffer.c
index 109de2eeb9a8..25795f2efdcb 100644
--- a/drivers/gpu/drm/i915/intel_ringbuffer.c
+++ b/drivers/gpu/drm/i915/intel_ringbuffer.c
@@ -2203,8 +2203,9 @@ hsw_ring_dispatch_execbuffer(struct intel_engine_cs *ring,
2203 return ret; 2203 return ret;
2204 2204
2205 intel_ring_emit(ring, 2205 intel_ring_emit(ring,
2206 MI_BATCH_BUFFER_START | MI_BATCH_PPGTT_HSW | 2206 MI_BATCH_BUFFER_START |
2207 (flags & I915_DISPATCH_SECURE ? 0 : MI_BATCH_NON_SECURE_HSW)); 2207 (flags & I915_DISPATCH_SECURE ?
2208 0 : MI_BATCH_PPGTT_HSW | MI_BATCH_NON_SECURE_HSW));
2208 /* bit0-7 is the length on GEN6+ */ 2209 /* bit0-7 is the length on GEN6+ */
2209 intel_ring_emit(ring, offset); 2210 intel_ring_emit(ring, offset);
2210 intel_ring_advance(ring); 2211 intel_ring_advance(ring);