FreeBSD Bugzilla – Attachment 212502 Details for
Bug 244877
graphics/mesa-dri: Fix vulkan by switching to unsynchronized userptr ioctls
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
mesa-dri: patch for anv_gem.c
mesa-dri-unsynchronized-v1.diff (text/plain), 1.19 KB, created by
Austin Shafer
on 2020-03-18 17:43:26 UTC
(
hide
)
Description:
mesa-dri: patch for anv_gem.c
Filename:
MIME Type:
Creator:
Austin Shafer
Created:
2020-03-18 17:43:26 UTC
Size:
1.19 KB
patch
obsolete
>Index: files/patch-src_intel_vulkan_anv__gem.c >=================================================================== >--- files/patch-src_intel_vulkan_anv__gem.c (revision 527733) >+++ files/patch-src_intel_vulkan_anv__gem.c (working copy) >@@ -1,6 +1,6 @@ > - Define ETIME if missing > >---- src/intel/vulkan/anv_gem.c.orig 2017-10-23 13:21:18 UTC >+--- src/intel/vulkan/anv_gem.c.orig 2019-01-17 11:26:23 UTC > +++ src/intel/vulkan/anv_gem.c > @@ -26,6 +26,9 @@ > #include <sys/mman.h> >@@ -12,3 +12,25 @@ > #include <unistd.h> > #include <fcntl.h> > >+@@ -116,9 +119,19 @@ anv_gem_userptr(struct anv_device *device, void *mem, >+ .flags = 0, >+ }; >+ >+- int ret = anv_ioctl(device->fd, DRM_IOCTL_I915_GEM_USERPTR, &userptr); >+- if (ret == -1) >++ int ret; >++retry: >++ ret = anv_ioctl(device->fd, DRM_IOCTL_I915_GEM_USERPTR, &userptr); >++ if (ret == -1) { >++ if (errno == ENODEV && userptr.flags == 0) { >++ userptr.flags = I915_USERPTR_UNSYNCHRONIZED; >++ goto retry; >++ } >++ if (geteuid() != 0) { >++ fprintf(stderr, "%s", "ioctl(I915_GEM_USERPTR) failed. Try running as root but expect poor stability.\n"); >++ } >+ return 0; >++ } >+ >+ return userptr.handle; >+ }
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 244877
:
212484
| 212502