Explicit synchronization is the future. At least, that seems to be what
most userspace APIs are agreeing on at this point. However, most of our
Linux APIs (both userspace and kernel UAPI) are currently built around
implicit synchronization with dma-buf. While work is ongoing to change
many of the userspace APIs and protocols to an explicit synchronization
model, switching over piecemeal is difficult due to the number of
potential components involved. On the kernel side, many drivers use
dma-buf including GPU (3D/compute), display, v4l, and others. In
userspace, we have X11, several Wayland compositors, 3D drivers, compute
drivers (OpenCL etc.), media encode/decode, and the list goes on.
This patch provides a path forward by allowing userspace to manually
manage the fences attached to a dma-buf. Alternatively, one can think
of this as making dma-buf's implicit synchronization simply a carrier
for an explicit fence. This is accomplished by adding two IOCTLs to
dma-buf for importing and exporting a sync file to/from the dma-buf.
This way a userspace component which is uses explicit synchronization,
such as a Vulkan driver, can manually set the write fence on a buffer
before handing it off to an implicitly synchronized component such as a
Wayland compositor or video encoder. In this way, each of the different
components can be upgraded to an explicit synchronization model one at a
time as long as the userspace pieces connecting them are aware of it and
import/export fences at the right times.
There is a potential race condition with this API if userspace is not
careful. A typical use case for implicit synchronization is to wait for
the dma-buf to be ready, use it, and then signal it for some other
component. Because a sync_file cannot be created until it is guaranteed
to complete in finite time, userspace can only signal the dma-buf after
it has already submitted the work which uses it to the kernel and has
received a sync_file back. There is no way to atomically submit a
wait-use-signal operation. This is not, however, really a problem with
this API so much as it is a problem with explicit synchronization
itself. The way this is typically handled is to have very explicit
ownership transfer points in the API or protocol which ensure that only
one component is using it at any given time. Both X11 (via the PRESENT
extension) and Wayland provide such ownership transfer points via
explicit present and idle messages.
The decision was intentionally made in this patch to make the import and
export operations IOCTLs on the dma-buf itself rather than as a DRM
IOCTL. This makes it the import/export operation universal across all
components which use dma-buf including GPU, display, v4l, and others.
It also means that a userspace component can do the import/export
without access to the DRM fd which may be tricky to get in cases where
the client communicates with DRM via a userspace API such as OpenGL or
Vulkan. At a future date we may choose to add direct import/export APIs
to components such as drm_syncobj to avoid allocating a file descriptor
and going through two ioctls. However, that seems to be something of a
micro-optimization as import/export operations are likely to happen at a
rate of a few per frame of rendered or decoded video.
Signed-off-by: Jason Ekstrand <jason(a)jlekstrand.net>
---
This is marked as an RFC because I intend it to start a discussion about
how to solve a problem. The current patch compiles but that's it for now.
I'll be writing IGT tests and Vulkan driver patches which exercise it over
the next couple of days. In the mean time, feel free to tell me why you
think this is a great and/or terrible idea. :-)
--Jason
drivers/dma-buf/dma-buf.c | 115 +++++++++++++++++++++++++++++++++++
include/uapi/linux/dma-buf.h | 13 +++-
2 files changed, 126 insertions(+), 2 deletions(-)
diff --git a/drivers/dma-buf/dma-buf.c b/drivers/dma-buf/dma-buf.c
index d4097856c86b..3845b87e209e 100644
--- a/drivers/dma-buf/dma-buf.c
+++ b/drivers/dma-buf/dma-buf.c
@@ -20,6 +20,7 @@
#include <linux/debugfs.h>
#include <linux/module.h>
#include <linux/seq_file.h>
+#include <linux/sync_file.h>
#include <linux/poll.h>
#include <linux/dma-resv.h>
#include <linux/mm.h>
@@ -348,6 +349,114 @@ static long dma_buf_set_name(struct dma_buf *dmabuf, const char __user *buf)
return ret;
}
+static long dma_buf_wait_sync_file(struct dma_buf *dmabuf,
+ const void __user *user_data)
+{
+ struct dma_buf_sync_file arg;
+ struct dma_fence *fence;
+
+ if (copy_from_user(&arg, user_data, sizeof(arg)))
+ return -EFAULT;
+
+ if (arg.flags != 0 && arg.flags != DMA_BUF_SYNC_FILE_SYNC_WRITE)
+ return -EINVAL;
+
+ fence = sync_file_get_fence(arg.fd);
+ if (!fence)
+ return -EINVAL;
+
+ if (arg.flags & DMA_BUF_SYNC_FILE_SYNC_WRITE) {
+ dma_resv_add_excl_fence(dmabuf->resv, fence);
+ } else {
+ dma_resv_add_shared_fence(dmabuf->resv, fence);
+ }
+
+ return 0;
+}
+
+static long dma_buf_signal_sync_file(struct dma_buf *dmabuf,
+ void __user *user_data)
+{
+ struct dma_buf_sync_file arg;
+ struct dma_fence *fence = NULL;
+ struct sync_file *sync_file;
+ int fd, ret;
+
+ if (copy_from_user(&arg, user_data, sizeof(arg)))
+ return -EFAULT;
+
+ if (arg.flags != 0 && arg.flags != DMA_BUF_SYNC_FILE_SYNC_WRITE)
+ return -EINVAL;
+
+ fd = get_unused_fd_flags(O_CLOEXEC);
+ if (fd < 0)
+ return fd;
+
+ if (arg.flags & DMA_BUF_SYNC_FILE_SYNC_WRITE) {
+ /* We need to include both the exclusive fence and all of
+ * the shared fences in our fence.
+ */
+ struct dma_fence **fences = NULL;
+ unsigned i, num_fences = 0;
+
+ ret = dma_resv_get_fences_rcu(dmabuf->resv, NULL,
+ &num_fences, &fences);
+ if (ret)
+ goto err_put_fd;
+
+ if (num_fences == 0) {
+ fence = dma_fence_get_stub();
+ } else if (num_fences == 1) {
+ fence = fences[0];
+ kfree(fences);
+ } else {
+ struct dma_fence_array *fence_arr;
+
+ fence_arr = dma_fence_array_create(num_fences, fences,
+ dma_fence_context_alloc(1),
+ 1, false);
+ if (!fence_arr) {
+ for (i = 0; i < num_fences; i++)
+ dma_fence_put(fences[i]);
+ kfree(fences);
+ ret = -ENOMEM;
+ goto err_put_fd;
+ }
+
+ /* The fence array now owns fences_arr and our
+ * references to each of the individual fences. We
+ * only own a reference to the one array fence.
+ */
+ fence = &fence_arr->base;
+ }
+ } else {
+ fence = dma_resv_get_excl_rcu(dmabuf->resv);
+ if (!fence)
+ fence = dma_fence_get_stub();
+ }
+
+ sync_file = sync_file_create(fence);
+
+ dma_fence_put(fence);
+
+ if (!sync_file) {
+ ret = -EINVAL;
+ goto err_put_fd;
+ }
+
+ fd_install(fd, sync_file->file);
+
+ arg.fd = fd;
+ if (copy_to_user(user_data, &arg, sizeof(arg)))
+ return -EFAULT;
+
+ return 0;
+
+err_put_fd:
+ put_unused_fd(fd);
+ return ret;
+}
+
static long dma_buf_ioctl(struct file *file,
unsigned int cmd, unsigned long arg)
{
@@ -390,6 +499,12 @@ static long dma_buf_ioctl(struct file *file,
case DMA_BUF_SET_NAME:
return dma_buf_set_name(dmabuf, (const char __user *)arg);
+ case DMA_BUF_IOCTL_WAIT_SYNC_FILE:
+ return dma_buf_wait_sync_file(dmabuf, (const void __user *)arg);
+
+ case DMA_BUF_IOCTL_SIGNAL_SYNC_FILE:
+ return dma_buf_signal_sync_file(dmabuf, (void __user *)arg);
+
default:
return -ENOTTY;
}
diff --git a/include/uapi/linux/dma-buf.h b/include/uapi/linux/dma-buf.h
index dbc7092e04b5..825b9a913c89 100644
--- a/include/uapi/linux/dma-buf.h
+++ b/include/uapi/linux/dma-buf.h
@@ -37,8 +37,17 @@ struct dma_buf_sync {
#define DMA_BUF_NAME_LEN 32
+struct dma_buf_sync_file {
+ __u32 flags;
+ __s32 fd;
+};
+
+#define DMA_BUF_SYNC_FILE_SYNC_WRITE (1 << 0)
+
#define DMA_BUF_BASE 'b'
-#define DMA_BUF_IOCTL_SYNC _IOW(DMA_BUF_BASE, 0, struct dma_buf_sync)
-#define DMA_BUF_SET_NAME _IOW(DMA_BUF_BASE, 1, const char *)
+#define DMA_BUF_IOCTL_SYNC _IOW(DMA_BUF_BASE, 0, struct dma_buf_sync)
+#define DMA_BUF_SET_NAME _IOW(DMA_BUF_BASE, 1, const char *)
+#define DMA_BUF_IOCTL_WAIT_SYNC_FILE _IOW(DMA_BUF_BASE, 2, struct dma_buf_sync)
+#define DMA_BUF_IOCTL_SIGNAL_SYNC_FILE _IOW(DMA_BUF_BASE, 3, struct dma_buf_sync)
#endif
--
2.24.1
We're getting some random other stuff that we're not relly interested
in, so match only word boundaries. Also avoid the capture group while
at it.
Suggested by Joe Perches.
Cc: linux-media(a)vger.kernel.org
Cc: dri-devel(a)lists.freedesktop.org
Cc: linaro-mm-sig(a)lists.linaro.org
Cc: Joe Perches <joe(a)perches.com>
Cc: Sumit Semwal <sumit.semwal(a)linaro.org>
Signed-off-by: Daniel Vetter <daniel.vetter(a)intel.com>
---
MAINTAINERS | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/MAINTAINERS b/MAINTAINERS
index 3005be638c2c..fc5d5aa53147 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -5025,7 +5025,7 @@ F: include/linux/dma-buf*
F: include/linux/reservation.h
F: include/linux/*fence.h
F: Documentation/driver-api/dma-buf.rst
-K: dma_(buf|fence|resv)
+K: '\bdma_(?:buf|fence|resv)\b'
T: git git://anongit.freedesktop.org/drm/drm-misc
DMA-BUF HEAPS FRAMEWORK
--
2.25.1
On Fri, Mar 13, 2020 at 09:17:42AM -0300, Jason Gunthorpe wrote:
> On Fri, Mar 13, 2020 at 04:21:39AM -0700, Christoph Hellwig wrote:
> > On Thu, Mar 12, 2020 at 11:19:28AM -0300, Jason Gunthorpe wrote:
> > > The non-page scatterlist is also a big concern for RDMA as we have
> > > drivers that want the page list, so even if we did as this series
> > > contemplates I'd have still have to split the drivers and create the
> > > notion of a dma-only SGL.
> >
> > The drivers I looked at want a list of IOVA address, aligned to the
> > device "page size". What other data do drivers want? Execept for the
> > software protocol stack drivers, which of couse need pages for the
> > stack futher down.
>
> In principle it is possible to have just an aligned page list -
> however the page size is variable, following certain rules, and today
> the drivers still determine the correct page size largely on their
> own.
>
> Some progress was made recently to consolidate this, but more is
> needed.
>
> If the common code doesn't know the device page size in advance then
> today's approach of sending largest possible dma mapped SGLs into the
> device driver is best. The driver only has to do splitting.
The point was that drivers don't need pages, drivers need IOVAs. In
what form they are stuffed into the hardware is the drivers problem.
On Thu, Mar 12, 2020 at 11:19:28AM -0300, Jason Gunthorpe wrote:
> The non-page scatterlist is also a big concern for RDMA as we have
> drivers that want the page list, so even if we did as this series
> contemplates I'd have still have to split the drivers and create the
> notion of a dma-only SGL.
The drivers I looked at want a list of IOVA address, aligned to the
device "page size". What other data do drivers want? Execept for the
software protocol stack drivers, which of couse need pages for the
stack futher down.
> I haven't used bio_vecs before, do they support chaining like SGL so
> they can be very big? RDMA dma maps gigabytes of memory
bio_vecs itself don't have the chaining, but the bios build around them
do. But each entry can map a huge pile. If needed we could use the
same chaining scheme we use for scatterlists for bio_vecs as well, but
lets see if we really end up needing that.
> So I'm guessing the path forward is something like
>
> - Add some generic dma_sg data structure and helper
> - Add dma mapping code to go from pages to dma_sg
That has been on my todo list for a while. All the DMA consolidatation
is to prepare for that and we're finally getting close.
Am 12.03.20 um 15:19 schrieb Jason Gunthorpe:
> On Thu, Mar 12, 2020 at 03:47:29AM -0700, Christoph Hellwig wrote:
>> On Thu, Mar 12, 2020 at 11:31:35AM +0100, Christian König wrote:
>>> But how should we then deal with all the existing interfaces which already
>>> take a scatterlist/sg_table ?
>>>
>>> The whole DMA-buf design and a lot of drivers are build around
>>> scatterlist/sg_table and to me that actually makes quite a lot of sense.
>>>
>> Replace them with a saner interface that doesn't take a scatterlist.
>> At very least for new functionality like peer to peer DMA, but
>> especially this code would also benefit from a general move away
>> from the scatterlist.
> If dma buf can do P2P I'd like to see support for consuming a dmabuf
> in RDMA.
That would indeed be awesome.
> Looking at how.. there is an existing sgl based path starting
> from get_user_pages through dma map to the drivers. (ib_umem)
>
> I can replace the driver part with something else (dma_sg), but not
> until we get a way to DMA map pages directly into that something
> else..
>
> The non-page scatterlist is also a big concern for RDMA as we have
> drivers that want the page list, so even if we did as this series
> contemplates I'd have still have to split the drivers and create the
> notion of a dma-only SGL.
Yeah that's my concern as well. For GPU drivers I don't think we need
the struct pages anywhere, but that might not be true for others.
>>> I mean we could come up with a new structure for this, but to me that just
>>> looks like reinventing the wheel. Especially since drivers need to be able
>>> to handle both I/O to system memory and I/O to PCIe BARs.
>> The structure for holding the struct page side of the scatterlist is
>> called struct bio_vec, so far mostly used by the block and networking
>> code.
> I haven't used bio_vecs before, do they support chaining like SGL so
> they can be very big? RDMA dma maps gigabytes of memory
>
>> The structure for holding dma addresses doesn't really exist
>> in a generic form, but would be an array of these structures:
>>
>> struct dma_sg {
>> dma_addr_t addr;
>> u32 len;
>> };
> Same question, RDMA needs to represent gigabytes of pages in a DMA
> list, we will need some generic way to handle that. I suspect GPU has
> a similar need? Can it be accomidated in some generic dma_sg?
Yes, we easily have ranges of >1GB. So I would certainly say u64 for the
len here.
> So I'm guessing the path forward is something like
>
> - Add some generic dma_sg data structure and helper
> - Add dma mapping code to go from pages to dma_sg
> - Rework RDMA to use dma_sg and the new dma mapping code
> - Rework dmabuf to support dma mapping to a dma_sg
> - Rework GPU drivers to use dma_sg
> - Teach p2pdma to generate a dma_sg from a BAR page list
> - This series
>
> ?
Sounds pretty much like a plan to me, but unfortunately like a rather
huge one.
Because of this and cause I don't know if all drivers can live with
dma_sg I'm not sure if we shouldn't have the switch from scatterlist to
dma_sg separately to this peer2peer work.
Christian.
>
> Jason
This is the third and final part of my series to start supporting P2P with DMA-buf.
The implementation is straight forward, apart from a helper to aid constructing scatterlists without having struct pages we only add a new flag indicating that an DMA-buf importer can handle peer2peer.
The exporter can then check if P2P is general possible using the pci_p2pdma_distance_many() function and if necessary can also clear the flag.
The rest is an example how to implementing the necessary functionality into the amdgpu driver to setup scatterlists pointing to device memory.
Please review and comment,
Christian.
Am 11.03.20 um 15:38 schrieb Jason Gunthorpe:
> On Wed, Mar 11, 2020 at 03:33:01PM +0100, Christian König wrote:
>> Am 11.03.20 um 15:04 schrieb Jason Gunthorpe:
>>> On Wed, Mar 11, 2020 at 02:51:56PM +0100, Christian König wrote:
>>>> Check if we can do peer2peer on the PCIe bus.
>>>>
>>>> Signed-off-by: Christian König <christian.koenig(a)amd.com>
>>>> drivers/gpu/drm/amd/amdgpu/amdgpu_dma_buf.c | 4 ++++
>>>> 1 file changed, 4 insertions(+)
>>>>
>>>> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_dma_buf.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_dma_buf.c
>>>> index aef12ee2f1e3..bbf67800c8a6 100644
>>>> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_dma_buf.c
>>>> @@ -38,6 +38,7 @@
>>>> #include <drm/amdgpu_drm.h>
>>>> #include <linux/dma-buf.h>
>>>> #include <linux/dma-fence-array.h>
>>>> +#include <linux/pci-p2pdma.h>
>>>> /**
>>>> * amdgpu_gem_prime_vmap - &dma_buf_ops.vmap implementation
>>>> @@ -179,6 +180,9 @@ static int amdgpu_dma_buf_attach(struct dma_buf *dmabuf,
>>>> struct amdgpu_device *adev = amdgpu_ttm_adev(bo->tbo.bdev);
>>>> int r;
>>>> + if (pci_p2pdma_distance_many(adev->pdev, &attach->dev, 1, true) < 0)
>>>> + attach->peer2peer = false;
>>>> +
>>> Are there other related patches than this series?
>>>
>>> p2p dma mapping needs to be done in common code, in p2pdma.c - ie this
>>> open coding is missing the bus_offset stuff, at least.
>> Yeah, I'm aware of this. But I couldn't find a better way for now.
> Well, it isn't optional :)
>
>>> I really do not want to see drivers open code this stuff.
>>>
>>> We already have a p2pdma API for handling the struct page case, so I
>>> suggest adding some new p2pdma API to handle this for non-struct page
>>> cases.
>>>
>>> ie some thing like:
>>>
>>> int 'p2pdma map bar'(
>>> struct pci_device *source,
>>> unsigned int source_bar_number,
>>> struct pci_device *dest,
>>> physaddr&len *array_of_offsets & length pairs into source bar,
>>> struct scatterlist *output_sgl)
>> Well that's exactly what I have to avoid since I don't have the array of
>> offsets around and want to avoid constructing it.
> Maybe it doesn't need an array of offsets - just a single offset and
> callers can iterate the API?
Yes, that would of course work as well.
But I was assuming that p2pdma_map_bar() needs some state between those
calls.
>
>> Similar problem for dma_map_resource(). My example does this on demand, but
>> essentially we also have use cases where this is done only once.
> I'm not sure if this is portable. Does any IOMMU HW need to know P2P
> is happening to setup successfully? We currently support such a narrow
> scope of HW for P2P..
On the AMD hardware I'm testing this calling dma_map_resource() already
seems to work with IOMMU enabled. (Well at least it seemed so 6month ago
when I last tested this).
>> Ideally we would have some function to create an sgl based on some arbitrary
>> collection of offsets and length inside a BAR.
> Isn't that what I just proposed above ?
Yes, just didn't thought that this would easily possible. I will double
check the p2pdma code again.
Thanks,
Christian.
>
> Jason
Am 11.03.20 um 15:04 schrieb Jason Gunthorpe:
> On Wed, Mar 11, 2020 at 02:51:56PM +0100, Christian König wrote:
>> Check if we can do peer2peer on the PCIe bus.
>>
>> Signed-off-by: Christian König <christian.koenig(a)amd.com>
>> drivers/gpu/drm/amd/amdgpu/amdgpu_dma_buf.c | 4 ++++
>> 1 file changed, 4 insertions(+)
>>
>> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_dma_buf.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_dma_buf.c
>> index aef12ee2f1e3..bbf67800c8a6 100644
>> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_dma_buf.c
>> @@ -38,6 +38,7 @@
>> #include <drm/amdgpu_drm.h>
>> #include <linux/dma-buf.h>
>> #include <linux/dma-fence-array.h>
>> +#include <linux/pci-p2pdma.h>
>>
>> /**
>> * amdgpu_gem_prime_vmap - &dma_buf_ops.vmap implementation
>> @@ -179,6 +180,9 @@ static int amdgpu_dma_buf_attach(struct dma_buf *dmabuf,
>> struct amdgpu_device *adev = amdgpu_ttm_adev(bo->tbo.bdev);
>> int r;
>>
>> + if (pci_p2pdma_distance_many(adev->pdev, &attach->dev, 1, true) < 0)
>> + attach->peer2peer = false;
>> +
> Are there other related patches than this series?
>
> p2p dma mapping needs to be done in common code, in p2pdma.c - ie this
> open coding is missing the bus_offset stuff, at least.
Yeah, I'm aware of this. But I couldn't find a better way for now.
> I really do not want to see drivers open code this stuff.
>
> We already have a p2pdma API for handling the struct page case, so I
> suggest adding some new p2pdma API to handle this for non-struct page
> cases.
>
> ie some thing like:
>
> int 'p2pdma map bar'(
> struct pci_device *source,
> unsigned int source_bar_number,
> struct pci_device *dest,
> physaddr&len *array_of_offsets & length pairs into source bar,
> struct scatterlist *output_sgl)
Well that's exactly what I have to avoid since I don't have the array of
offsets around and want to avoid constructing it.
Similar problem for dma_map_resource(). My example does this on demand,
but essentially we also have use cases where this is done only once.
Ideally we would have some function to create an sgl based on some
arbitrary collection of offsets and length inside a BAR.
Regards,
Christian.
>
> Jason
Am 26.02.20 um 17:46 schrieb Bas Nieuwenhuizen:
> On Wed, Feb 26, 2020 at 4:29 PM Jason Ekstrand <jason(a)jlekstrand.net> wrote:
>> On Wed, Feb 26, 2020 at 4:05 AM Daniel Vetter <daniel(a)ffwll.ch> wrote:
>>> On Wed, Feb 26, 2020 at 10:16:05AM +0100, Christian König wrote:
>>> [SNIP]
>>>> Just imagine that you access some DMA-buf with a shader and that operation
>>>> is presented as a fence on the DMA-bufs reservation object. And now you can
>>>> go ahead and replace that fence and free up the memory.
>>>>
>>>> Tricking the Linux kernel into allocating page tables in that freed memory
>>>> is trivial and that's basically it you can overwrite page tables with your
>>>> shader and gain access to all of system memory :)
>>>>
>>>> What we could do is to always make sure that the added fences will complete
>>>> later than the already existing ones, but that is also rather tricky to get
>>>> right. I wouldn't do that if we don't have a rather big use case for this.
>> Right. I thought about that but I'm still learning how dma_resv
>> works. It'd be easy enough to make a fence array that contains both
>> the old fence and the new fence and replace the old fence with that.
>> What I don't know is the proper way to replace the exclusive fence
>> safely. Some sort of atomic_cpxchg loop, perhaps? I presume there's
>> some way of doing it properly because DRM drivers are doing it all the
>> time.
First of all you need to grab the lock of the dma_resv object or you
can't replace the exclusive nor the shared ones.
This way you don't need to do a atomic_cmpxchg or anything else and
still guarantee correct ordering.
> I think for an exclusive fence you may need to create a fence array
> that includes the existing exclusive and shared fences in the dma_resv
> combined with the added fence.
Yes, that at least gives us the correct synchronization.
> However, I'm not sure what the best way is to do garbage collection on
> that so that we don't get an impossibly list of fence arrays.
Exactly yes. That's also the reason why the dma_fence_chain container I
came up with for the sync timeline stuff has such a rather sophisticated
garbage collection.
When some of the included fences signal you need to free up the
array/chain and make sure that the memory for the container can be reused.
> (Note
> the dma_resv has a lock that needs to be taken before adding an
> exclusive fence, might be useful). Some code that does a thing like
> this is __dma_resv_make_exclusive in
> drivers/gpu/drm/amd/amdgpu/amdgpu_dma_buf.c
Wanted to move that into dma_resv.c for quite a while since there are
quite a few other cases where we need this.
Regards,
Christian.
> The other piece of the puzzle is that on the submit path this would
> need something to ignore implicit fences. And there semantically the
> question comes up whether it is safe for a driver to ignore exclusive
> fences from another driver. (and then we have amdgpu which has its own
> rules on exclusiveness of its shared fences based on the context. e.g.
> the current option to ignore implicit fences for a buffer still syncs
> on exclusive fences on the buffer).