summaryrefslogtreecommitdiff
path: root/tests/kms_flip.c
diff options
context:
space:
mode:
authorRodrigo Siqueira <rodrigosiqueiramelo@gmail.com>2019-03-04 12:30:30 -0300
committerRodrigo Siqueira <rodrigosiqueiramelo@gmail.com>2019-03-12 09:01:01 -0300
commit07ed868473114a35981350ba50fd2ed6a65cf30c (patch)
tree786ead7879d3f661ccfc005b7913a9a3dbb59f91 /tests/kms_flip.c
parentd59b17ca808f064ff5b2c01b212415f22aea9d8f (diff)
kms_flip: Fix warning related to i915 gem dependence
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@gmail.com> Reviewed-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Diffstat (limited to 'tests/kms_flip.c')
-rwxr-xr-xtests/kms_flip.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/tests/kms_flip.c b/tests/kms_flip.c
index c6297a31..c625ac95 100755
--- a/tests/kms_flip.c
+++ b/tests/kms_flip.c
@@ -1537,10 +1537,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);
+ }
}
}