diff options
author | Maxime Ripard <maxime.ripard@bootlin.com> | 2018-10-04 14:38:55 +0200 |
---|---|---|
committer | Arkadiusz Hiler <arkadiusz.hiler@intel.com> | 2018-10-08 16:41:44 +0300 |
commit | 80bb443e624a6e0dc12dc72e0b998a2687d23f1c (patch) | |
tree | 678a1aec638d5596cec6f54682476953ef731ad2 | |
parent | 3415b197c60a9e9f74d44ece3cbafa8ddb598b97 (diff) |
fb: Only set the GEM domain on intel platforms
The gem_set_domain call uses an i915 specific ioctl that will fail on
anything else. Let's move that call under a check for whether or not we're
running on an intel platform.
Signed-off-by: Maxime Ripard <maxime.ripard@bootlin.com>
Reviewed-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
-rw-r--r-- | lib/igt_fb.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/igt_fb.c b/lib/igt_fb.c index f1332169..aaa90bf7 100644 --- a/lib/igt_fb.c +++ b/lib/igt_fb.c @@ -1356,8 +1356,9 @@ static void *map_bo(int fd, struct igt_fb *fb) { void *ptr; - gem_set_domain(fd, fb->gem_handle, - I915_GEM_DOMAIN_GTT, I915_GEM_DOMAIN_GTT); + if (is_i915_device(fd)) + gem_set_domain(fd, fb->gem_handle, + I915_GEM_DOMAIN_GTT, I915_GEM_DOMAIN_GTT); if (fb->is_dumb) ptr = kmstest_dumb_map_buffer(fd, fb->gem_handle, fb->size, |