lib: Hide BSD1/BSD2 rings on hardware without BSD2

The kernel happily lets us run on I915_EXEC_BSD2 even with such hardware
existing. Sigh.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
This commit is contained in:
Chris Wilson 2016-01-28 13:44:19 +00:00
parent 506d683da1
commit eaa03678b0

View File

@ -1341,6 +1341,12 @@ static int gem_has_ring(int fd, int ring)
void gem_require_ring(int fd, int ring_id)
{
igt_require(gem_has_ring(fd, ring_id));
/* silly ABI, the kernel thinks everyone who has BSD also has BSD2 */
if ((ring_id & ~(3<<13)) == I915_EXEC_BSD) {
if (ring_id & (3 << 13))
igt_require(gem_has_bsd2(fd));
}
}
/* prime */