[PATCH i-g-t v2 2/7] lib/ioctl_wrappers: Separate ring BSD1 from BSD2 checks

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Some platforms have ring BSD available but no BSD2.
Because of the current verification, tests involving ring BSD1
will be skipped if no BSD2 is available.

Decoupling the checks will allow running the BSD1 specific tests
on these platforms.

Based on a patch originally submitted by Gabriel Feceoru to
patchwork-hook-test branch.

Signed-off-by: Derek Morton <derek.j.morton@xxxxxxxxx>
---
 lib/ioctl_wrappers.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/lib/ioctl_wrappers.c b/lib/ioctl_wrappers.c
index f42e2c9..a4c6aa4 100644
--- a/lib/ioctl_wrappers.c
+++ b/lib/ioctl_wrappers.c
@@ -1432,8 +1432,10 @@ void gem_require_ring(int fd, int 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))
+		if (ring_id & (2 << 13))
 			igt_require(gem_has_bsd2(fd));
+		if (ring_id & (1 << 13))
+			igt_require(gem_has_bsd(fd));
 	}
 }
 
-- 
1.9.1

_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/intel-gfx




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux