[Intel-gfx] [PATCH i-g-t 3/7] kms_flip: Fix warning related to i915 gem dependence

Rodrigo Siqueira rodrigosiqueiramelo at gmail.com
Mon Mar 4 15:30:30 UTC 2019


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 <rodrigosiqueiramelo at gmail.com>
---
 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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/intel-gfx/attachments/20190304/9f65c162/attachment.sig>


More information about the Intel-gfx mailing list