diff options
author | Tvrtko Ursulin <tvrtko.ursulin@intel.com> | 2019-05-22 16:57:18 +0100 |
---|---|---|
committer | Tvrtko Ursulin <tvrtko.ursulin@intel.com> | 2019-05-23 15:12:13 +0100 |
commit | e8fd4938a42945e9e28cd7004adf2e31ded3d394 (patch) | |
tree | eef7f1a56f5ec711b105dfec8c63c52b36becd23 /benchmarks | |
parent | 2a35f782c82726866d80652d673db0d711430998 (diff) |
gem_wsim: Support Icelake parts
On Icelake second vcs engine is vcs2 instead of vcs1 so add some logical
to physical instance remapping based on engine discovery to support it.
v2:
* Rebase.
Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'benchmarks')
-rw-r--r-- | benchmarks/gem_wsim.c | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/benchmarks/gem_wsim.c b/benchmarks/gem_wsim.c index 64d19ed4..0ccb2715 100644 --- a/benchmarks/gem_wsim.c +++ b/benchmarks/gem_wsim.c @@ -552,6 +552,26 @@ fill_engines_id_class(enum intel_engine_id *list, } } +static unsigned int +find_physical_instance(enum intel_engine_id class, unsigned int logical) +{ + unsigned int i, j = 0; + + igt_assert(class == VCS); + + for (i = 0; i < __num_engines; i++) { + if (__engines[i].engine_class != I915_ENGINE_CLASS_VIDEO) + continue; + + /* Map logical to physical instances. */ + if (logical == j++) + return __engines[i].engine_instance; + } + + igt_assert(0); + return 0; +} + static struct i915_engine_class_instance get_engine(enum intel_engine_id engine) { @@ -571,7 +591,7 @@ get_engine(enum intel_engine_id engine) case VCS1: case VCS2: ci.engine_class = I915_ENGINE_CLASS_VIDEO; - ci.engine_instance = engine - VCS1; + ci.engine_instance = find_physical_instance(VCS, engine - VCS1); break; case VECS: ci.engine_class = I915_ENGINE_CLASS_VIDEO_ENHANCE; |