diff options
-rw-r--r-- | lib/igt_gt.c | 12 | ||||
-rw-r--r-- | lib/igt_gt.h | 1 |
2 files changed, 10 insertions, 3 deletions
diff --git a/lib/igt_gt.c b/lib/igt_gt.c index 59b62242..5e5b9bef 100644 --- a/lib/igt_gt.c +++ b/lib/igt_gt.c @@ -557,7 +557,7 @@ const struct intel_execution_engine intel_execution_engines[] = { { NULL, 0, 0 } }; -bool gem_can_store_dword(int fd, unsigned int engine) +bool gem_class_can_store_dword(int fd, int class) { uint16_t devid = intel_get_drm_devid(fd); const struct intel_device_info *info = intel_get_device_info(devid); @@ -569,8 +569,8 @@ bool gem_can_store_dword(int fd, unsigned int engine) if (gen == 3 && (info->is_grantsdale || info->is_alviso)) return false; /* only supports physical addresses */ - if (gen == 6 && ((engine & 0x3f) == I915_EXEC_BSD)) - return false; /* kills the machine! */ + if (gen == 6 && class == I915_ENGINE_CLASS_VIDEO) + return false; if (info->is_broadwater) return false; /* Not sure yet... */ @@ -578,6 +578,12 @@ bool gem_can_store_dword(int fd, unsigned int engine) return true; } +bool gem_can_store_dword(int fd, unsigned int engine) +{ + return gem_class_can_store_dword(fd, + gem_execbuf_flags_to_engine_class(engine)); +} + const struct intel_execution_engine2 intel_execution_engines2[] = { { "rcs0", I915_ENGINE_CLASS_RENDER, 0 }, { "bcs0", I915_ENGINE_CLASS_COPY, 0 }, diff --git a/lib/igt_gt.h b/lib/igt_gt.h index 8ceed142..0b5c7fcb 100644 --- a/lib/igt_gt.h +++ b/lib/igt_gt.h @@ -90,6 +90,7 @@ bool gem_ring_is_physical_engine(int fd, unsigned int ring); bool gem_ring_has_physical_engine(int fd, unsigned int ring); bool gem_can_store_dword(int fd, unsigned int engine); +bool gem_class_can_store_dword(int fd, int class); extern const struct intel_execution_engine2 { const char *name; |