summaryrefslogtreecommitdiff
path: root/lib/igt_gt.c
diff options
context:
space:
mode:
authorAndi Shyti <andi.shyti@intel.com>2019-03-28 16:48:54 +0200
committerAndi Shyti <andi.shyti@intel.com>2019-05-13 02:17:35 +0300
commitb202d929a5899aab499c2f89b00684e63507009b (patch)
treef4e11c0374b65c6e8cf629d29baee1666d308478 /lib/igt_gt.c
parent3f0a6eedc61c7616f8f2648b457dc433e95d160d (diff)
lib: igt_gt: make gem_engine_can_store_dword() check engine class
Engines referred by class and instance are getting more popular, gem_engine_can_store_dword() should handle the situation. Suggested-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com> Signed-off-by: Andi Shyti <andi.shyti@intel.com> Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Diffstat (limited to 'lib/igt_gt.c')
-rw-r--r--lib/igt_gt.c12
1 files changed, 9 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 },