View | Details | Raw Unified | Return to bug 221540 | Differences between
and this patch

Collapse All | Expand All

(-)graphics/mesa-dri/files/patch-src_intel_vulkan_anv__gem.c (+24 lines)
Added Link Here
1
Try harder to allocate userptr
2
https://github.com/FreeBSDDesktop/freebsd-base-graphics/issues/132
3
4
--- src/intel/vulkan/anv_gem.c.orig	2017-09-17 23:03:22 UTC
5
+++ src/intel/vulkan/anv_gem.c
6
@@ -114,9 +114,16 @@ anv_gem_userptr(struct anv_device *device, void *mem, 
7
       .flags = 0,
8
    };
9
 
10
-   int ret = anv_ioctl(device->fd, DRM_IOCTL_I915_GEM_USERPTR, &userptr);
11
-   if (ret == -1)
12
+   int ret;
13
+retry:
14
+   ret = anv_ioctl(device->fd, DRM_IOCTL_I915_GEM_USERPTR, &userptr);
15
+   if (ret == -1) {
16
+      if (errno == ENODEV && userptr.flags == 0) {
17
+         userptr.flags = I915_USERPTR_UNSYNCHRONIZED;
18
+         goto retry;
19
+      }
20
       return 0;
21
+   }
22
 
23
    return userptr.handle;
24
 }
(-)graphics/mesa-dri/files/patch-src_intel_vulkan_anv__queue.c (-1 / +11 lines)
Lines 1-4 Link Here
1
Drop header that was never used
1
- Drop header that was never used
2
- Work around early timeouts with I915_USERPTR_UNSYNCHRONIZED
2
3
3
--- src/intel/vulkan/anv_queue.c.orig	2017-08-12 16:09:52 UTC
4
--- src/intel/vulkan/anv_queue.c.orig	2017-08-12 16:09:52 UTC
4
+++ src/intel/vulkan/anv_queue.c
5
+++ src/intel/vulkan/anv_queue.c
Lines 10-12 Drop header that was never used Link Here
10
 
11
 
11
 #include "anv_private.h"
12
 #include "anv_private.h"
12
 #include "vk_util.h"
13
 #include "vk_util.h"
14
@@ -102,7 +102,7 @@ anv_device_submit_simple_batch(struct anv_device *devi
15
    if (result != VK_SUCCESS)
16
       goto fail;
17
 
18
-   result = anv_device_wait(device, &bo, INT64_MAX);
19
+   result = anv_device_wait(device, &bo, INT32_MAX);
20
 
21
  fail:
22
    anv_bo_pool_free(&device->batch_bo_pool, &bo);

Return to bug 221540