Skip to content
  • Tvrtko Ursulin's avatar
    tests/i915/gem_ctx_switch: Update with engine discovery · ad129d2a
    Tvrtko Ursulin authored
    
    
    I converted this one as an example, or at least to drive the discussion,
    how more complex tests can be converted.
    
    I have kept the legacy execbuf abi testing prefixed with "legacy-".
    
    New tests were added to exercise physical engines via engine discovery and
    also "all" tests have been updated in the same way.
    
    To keep things simpler and avoid having to create separate contexts legacy
    tests have to be first since the __for_each_physical_engine iterator would
    otherwise configure the default context and confuse the test.
    
    So legacy tests run on the unconfigured (with engine map) context and use
    a new helper gem_eb_flags_to_engine to look up the engine from the
    intel_execution_engines2 static list. This is only to enable the core test
    code to be shared.
    
    Places where new contexts are created had to be updated to either equally
    configure the contexts or not. Another new helper,
    gem_context_has_engine_map was added to enable this.
    
    Also beware of drive-by formatting changes.
    
    v2:
     * Fix hyphen mess in subtest names.
    
    Signed-off-by: default avatarTvrtko Ursulin <tvrtko.ursulin@intel.com>
    Cc: Chris Wilson <chris@chris-wilson.co.uk>
    Cc: Ramalingam C <ramalingam.c@intel.com>
    Cc: Andi Shyti <andi.shyti@intel.com>
    Reviewed-by: default avatarAndi Shyti <andi.shyti@intel.com>
    ad129d2a