summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorAlan Previn <alan.previn.teres.alexis@intel.com>2021-10-05 12:41:28 -0700
committerRodrigo Vivi <rodrigo.vivi@intel.com>2021-10-06 05:07:58 -0400
commit8f19aeba0b12b818c338a208ab6b56bfd31b7878 (patch)
tree5454002e0ca6c9b4625dcbe59d247d73163697e1 /lib
parent124c9f40d09a264f0817542928e56454fee7b58e (diff)
tests/i915/gem_pxp: Verify execbuf fails with stale PXP context after teardown
Add a subtest to verify that reusing a stale protected context in a gem_execbuff after a teardown fails with -EIO error because it's banned. Trigger the teardown via the pxp invalidation debugfs that simulates a HW teardown IRQ. NOTE: The end-to-end architecture requirement includes that any break in the links of the PXP sessions needs to trigger a full teardown and the application needs to be made aware of that allowing it to re-establish the end-to-end pipeline of buffers, contexts and renders again if it chooses to. This stricter behavior targets only contexts created with PXP enabled. Signed-off-by: Alan Previn <alan.previn.teres.alexis@intel.com> Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com> Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Diffstat (limited to 'lib')
-rw-r--r--lib/intel_batchbuffer.c2
-rw-r--r--lib/intel_batchbuffer.h3
2 files changed, 4 insertions, 1 deletions
diff --git a/lib/intel_batchbuffer.c b/lib/intel_batchbuffer.c
index 291d706b..9c26fe20 100644
--- a/lib/intel_batchbuffer.c
+++ b/lib/intel_batchbuffer.c
@@ -2526,7 +2526,7 @@ static void update_offsets(struct intel_bb *ibb,
* Note: In this step execobj for bb is allocated and inserted to the objects
* array.
*/
-static int __intel_bb_exec(struct intel_bb *ibb, uint32_t end_offset,
+int __intel_bb_exec(struct intel_bb *ibb, uint32_t end_offset,
uint64_t flags, bool sync)
{
struct drm_i915_gem_execbuffer2 execbuf;
diff --git a/lib/intel_batchbuffer.h b/lib/intel_batchbuffer.h
index 10fa66ee..58bddb1a 100644
--- a/lib/intel_batchbuffer.h
+++ b/lib/intel_batchbuffer.h
@@ -668,6 +668,9 @@ uint64_t intel_bb_offset_reloc_to_object(struct intel_bb *ibb,
uint32_t offset,
uint64_t presumed_offset);
+int __intel_bb_exec(struct intel_bb *ibb, uint32_t end_offset,
+ uint64_t flags, bool sync);
+
void intel_bb_dump_cache(struct intel_bb *ibb);
void intel_bb_exec(struct intel_bb *ibb, uint32_t end_offset,