search for: virtio_dma_buf_get_uuid

Displaying 8 results from an estimated 8 matches for "virtio_dma_buf_get_uuid".

2020 Jun 04
2
[PATCH v4 1/3] virtio: add dma-buf support for exported objects
...true if the given dma-buf is a virtio dma-buf > + * @dma_buf: buffer to query > + */ > +bool is_virtio_dma_buf(struct dma_buf *dma_buf) > +{ > + return dma_buf->ops->attach == &virtio_dma_buf_attach; > +} > +EXPORT_SYMBOL(is_virtio_dma_buf); > + > +/** > + * virtio_dma_buf_get_uuid - gets the uuid of the virtio dma-buf's exported object > + * @dma_buf: [in] buffer to query > + * @uuid: [out] the uuid > + * > + * Returns: 0 on success, negative on failure. > + */ > +int virtio_dma_buf_get_uuid(struct dma_buf *dma_buf, > + uuid_t *uuid) > +{ &g...
2020 Jun 04
2
[PATCH v4 1/3] virtio: add dma-buf support for exported objects
...true if the given dma-buf is a virtio dma-buf > + * @dma_buf: buffer to query > + */ > +bool is_virtio_dma_buf(struct dma_buf *dma_buf) > +{ > + return dma_buf->ops->attach == &virtio_dma_buf_attach; > +} > +EXPORT_SYMBOL(is_virtio_dma_buf); > + > +/** > + * virtio_dma_buf_get_uuid - gets the uuid of the virtio dma-buf's exported object > + * @dma_buf: [in] buffer to query > + * @uuid: [out] the uuid > + * > + * Returns: 0 on success, negative on failure. > + */ > +int virtio_dma_buf_get_uuid(struct dma_buf *dma_buf, > + uuid_t *uuid) > +{ &g...
2020 Sep 10
0
[PATCH v7 1/3] virtio: add dma-buf support for exported objects
...true if the given dma-buf is a virtio dma-buf > + * @dma_buf: buffer to query > + */ > +bool is_virtio_dma_buf(struct dma_buf *dma_buf) > +{ > + return dma_buf->ops->attach == &virtio_dma_buf_attach; > +} > +EXPORT_SYMBOL(is_virtio_dma_buf); > + > +/** > + * virtio_dma_buf_get_uuid - gets a virtio dma-buf's exported object's uuid > + * @dma_buf: [in] buffer to query > + * @uuid: [out] the uuid > + * > + * Returns: 0 on success, negative on failure. > + */ > +int virtio_dma_buf_get_uuid(struct dma_buf *dma_buf, > + uuid_t *uuid) > +{ >...
2020 Jun 19
0
[PATCH v4 1/3] virtio: add dma-buf support for exported objects
...irtio_dma_buf(struct dma_buf *dma_buf) > > > > +{ > > > > + return dma_buf->ops->attach == &virtio_dma_buf_attach; > > > > +} > > > > +EXPORT_SYMBOL(is_virtio_dma_buf); > > > > + > > > > +/** > > > > + * virtio_dma_buf_get_uuid - gets the uuid of the virtio dma-buf's exported object > > > > + * @dma_buf: [in] buffer to query > > > > + * @uuid: [out] the uuid > > > > + * > > > > + * Returns: 0 on success, negative on failure. > > > > + */ > > > > +...
2020 May 14
0
[PATCH v3 1/4] dma-buf: add support for virtio exported objects
...generic interface is rather awkward, > > eventually everyone wants that and we end up in a mess. I think the > > best solution here would be if we create a struct virtio_dma_buf which > > subclasses dma-buf, add a (hopefully safe) runtime upcasting > > functions, and then a virtio_dma_buf_get_uuid() function. Just storing > > the uuid should be doable (assuming this doesn't change during the > > lifetime of the buffer), so no need for a callback. > > So you would prefer a solution similar to the original version of this > patchset? https://markmail.org/message/z7if4...
2020 May 13
2
[PATCH v3 1/4] dma-buf: add support for virtio exported objects
...-alone - adding very specific ops to the generic interface is rather awkward, eventually everyone wants that and we end up in a mess. I think the best solution here would be if we create a struct virtio_dma_buf which subclasses dma-buf, add a (hopefully safe) runtime upcasting functions, and then a virtio_dma_buf_get_uuid() function. Just storing the uuid should be doable (assuming this doesn't change during the lifetime of the buffer), so no need for a callback. - for the runtime upcasting the usual approach is to check the ->ops pointer. Which means that would need to be the same for all virtio dma_bufs, wh...
2020 May 13
2
[PATCH v3 1/4] dma-buf: add support for virtio exported objects
...-alone - adding very specific ops to the generic interface is rather awkward, eventually everyone wants that and we end up in a mess. I think the best solution here would be if we create a struct virtio_dma_buf which subclasses dma-buf, add a (hopefully safe) runtime upcasting functions, and then a virtio_dma_buf_get_uuid() function. Just storing the uuid should be doable (assuming this doesn't change during the lifetime of the buffer), so no need for a callback. - for the runtime upcasting the usual approach is to check the ->ops pointer. Which means that would need to be the same for all virtio dma_bufs, wh...
2020 Jun 08
0
[PATCH v4 1/3] virtio: add dma-buf support for exported objects
...asons for the BUILD_BUG_ON being there, checking struct sizes like this is a clear sign of something strange going on. But really this is just unnecessary complexity anyway. The only difference with dma_buf is get_uuid and device_attacj, isn't it? And they are called like this: + */ +int virtio_dma_buf_get_uuid(struct dma_buf *dma_buf, + uuid_t *uuid) +{ + const struct virtio_dma_buf_ops *ops = container_of( + dma_buf->ops, const struct virtio_dma_buf_ops, ops); + + if (!is_virtio_dma_buf(dma_buf)) + return -EINVAL; + +...