Skip to contentSkip to conversation

gem_exec_parse: require PPGTT as well

PATCH In review Jesse Barnes 2 participants 2 messages Jun 26, 2014

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 gem_exec_parse: require PPGTT as well

The command parser may be present, but not active, so check for PPGTT before allowing this test to run.

---
 tests/gem_exec_parse.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
tests/gem_exec_parse.c +6 -1
index e78a192..f7376e3 100644
@@ -198,7 +198,7 @@ int fd;
 igt_main
 {
 	igt_fixture {
-		int parser_version = 0;
+		int parser_version = 0, has_ppgtt = 0;
                 drm_i915_getparam_t gp;
 		int rc;
 
@@ -209,6 +209,11 @@ igt_main
 		rc = drmIoctl(fd, DRM_IOCTL_I915_GETPARAM, &gp);
 		igt_require(!rc && parser_version > 0);
 
+		gp.param = I915_PARAM_HAS_ALIASING_PPGTT;
+		gp.value = &has_ppgtt;
+		rc = drmIoctl(fd, DRM_IOCTL_I915_GETPARAM, &gp);
+		igt_require(!rc && has_ppgtt > 0);
+
 		handle = gem_create(fd, 4096);
 
 		/* ATM cmd parser only exists on gen7. */
Signature · 1 line
1.9.1
#1 lore raw
Quoted 22 lines · Jesse Barnes

The command parser may be present, but not active, so check for PPGTT before allowing this test to run.

---
 tests/gem_exec_parse.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
tests/gem_exec_parse.c +1 -1
index e78a192..f7376e3 100644
@@ -198,7 +198,7 @@ int fd;
 igt_main
 {
 	igt_fixture {
-		int parser_version = 0;
+		int parser_version = 0, has_ppgtt = 0;
                 drm_i915_getparam_t gp;
 		int rc;
 

tests/gem_exec_parse.c igt_main · line 216

Quoted 8 lines
tests/gem_exec_parse.c +5 -0
@@ -209,6 +209,11 @@ igt_main
 		rc = drmIoctl(fd, DRM_IOCTL_I915_GETPARAM, &gp);
 		igt_require(!rc && parser_version > 0);
 
+		gp.param = I915_PARAM_HAS_ALIASING_PPGTT;
+		gp.value = &has_ppgtt;
+		rc = drmIoctl(fd, DRM_IOCTL_I915_GETPARAM, &gp);
+		igt_require(!rc && has_ppgtt > 0);
+

You could also shorten it to

	igt_require(gem_uses_aliasing_ppgtt(fd));

if you like. And sorry, I should have added that check in the first place.

Brad

Quoted 10 lines
tests/gem_exec_parse.c +0 -0
 		handle = gem_create(fd, 4096);
 
 		/* ATM cmd parser only exists on gen7. */
Signature · 6 lines
1.9.1

_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx