Added
Link Here
|
1 |
--- src/sna/kgem.c.orig 2021-01-15 20:59:05 UTC |
2 |
+++ src/sna/kgem.c |
3 |
@@ -1189,13 +1189,18 @@ static int gem_param(struct kgem *kgem, int name) |
4 |
static bool test_has_execbuffer2(struct kgem *kgem) |
5 |
{ |
6 |
struct drm_i915_gem_execbuffer2 execbuf; |
7 |
+ int ret; |
8 |
|
9 |
memset(&execbuf, 0, sizeof(execbuf)); |
10 |
execbuf.buffer_count = 1; |
11 |
|
12 |
- return do_ioctl(kgem->fd, |
13 |
- DRM_IOCTL_I915_GEM_EXECBUFFER2, |
14 |
- &execbuf) == -EFAULT; |
15 |
+ ret = do_ioctl(kgem->fd, DRM_IOCTL_I915_GEM_EXECBUFFER2, &execbuf); |
16 |
+#ifdef __FreeBSD__ |
17 |
+ /* XXX FreeBSD returns ENOENT instead of EFAULT. */ |
18 |
+ if (ret == -ENOENT) |
19 |
+ return true; |
20 |
+#endif |
21 |
+ return ret == -EFAULT; |
22 |
} |
23 |
|
24 |
static bool test_has_no_reloc(struct kgem *kgem) |