In the kms_flip tests has an igt_fixture that allocates memory for i915
driver with “drm_intel_bufmgr_gem_init()”, which produces the following
warning:

 IGT-Version: 1.23-g8d81c2c2 (x86_64) (Linux: 5.0.0-rc7-VKMS-RULES+ x86_64)
 Using monotonic timestamps
 DRM_IOCTL_I915_GEM_APERTURE failed: Invalid argument
 Assuming 131072kB available aperture size.
 May lead to reduced performance or incorrect rendering.
 get chip id failed: -1 [22]

This commit handles this specific dependence with the i915 driver which
make the kms_flip logs better.

Signed-off-by: Rodrigo Siqueira <[email protected]>
---
 tests/kms_flip.c | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/tests/kms_flip.c b/tests/kms_flip.c
index 0d261b77..57138ec1 100755
--- a/tests/kms_flip.c
+++ b/tests/kms_flip.c
@@ -1528,10 +1528,12 @@ int main(int argc, char **argv)
                igt_install_exit_handler(kms_flip_exit_handler);
                get_timestamp_format();
 
-               bufmgr = drm_intel_bufmgr_gem_init(drm_fd, 4096);
-               if (bufmgr) {
-                       devid = intel_get_drm_devid(drm_fd);
-                       batch = intel_batchbuffer_alloc(bufmgr, devid);
+               if (is_i915_device(drm_fd)) {
+                       bufmgr = drm_intel_bufmgr_gem_init(drm_fd, 4096);
+                       if (bufmgr) {
+                               devid = intel_get_drm_devid(drm_fd);
+                               batch = intel_batchbuffer_alloc(bufmgr, devid);
+                       }
                }
        }
 
-- 
2.21.0

Attachment: signature.asc
Description: PGP signature

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

Reply via email to