From: Sumit Semwal <sumit.semwal@linaro.org>
To: Daniel Vetter <daniel@ffwll.ch>
Cc: "Christian König" <ckoenig.leichtzumerken@gmail.com>,
dri-devel@lists.freedesktop.org,
"amd-gfx list" <amd-gfx@lists.freedesktop.org>
Subject: Re: [PATCH 1/6] dma-buf: add peer2peer flag
Date: Wed, 1 Apr 2020 08:09:27 +0530 [thread overview]
Message-ID: <CAO_48GGs4U_cAOMfAQ7qDwTciv+b28uYXjCdPXhYpAv5Um9GHg@mail.gmail.com> (raw)
In-Reply-To: <20200331084602.GJ2363188@phenom.ffwll.local>
[-- Attachment #1.1: Type: text/plain, Size: 2930 bytes --]
Hi Christian,
On Tue, 31 Mar 2020, 14:16 Daniel Vetter, <daniel@ffwll.ch> wrote:
> On Mon, Mar 30, 2020 at 03:55:31PM +0200, Christian König wrote:
> > Add a peer2peer flag noting that the importer can deal with device
> > resources which are not backed by pages.
> >
> > Signed-off-by: Christian König <christian.koenig@amd.com>
>
> On the series:
>
> Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
>
Fwiw, for the series,
Acked-by: Sumit Semwal <sumit.semwal@linaro.org>
> ---
> > drivers/dma-buf/dma-buf.c | 2 ++
> > include/linux/dma-buf.h | 10 ++++++++++
> > 2 files changed, 12 insertions(+)
> >
> > diff --git a/drivers/dma-buf/dma-buf.c b/drivers/dma-buf/dma-buf.c
> > index ccc9eda1bc28..570c923023e6 100644
> > --- a/drivers/dma-buf/dma-buf.c
> > +++ b/drivers/dma-buf/dma-buf.c
> > @@ -690,6 +690,8 @@ dma_buf_dynamic_attach(struct dma_buf *dmabuf,
> struct device *dev,
> >
> > attach->dev = dev;
> > attach->dmabuf = dmabuf;
> > + if (importer_ops)
> > + attach->peer2peer = importer_ops->allow_peer2peer;
> > attach->importer_ops = importer_ops;
> > attach->importer_priv = importer_priv;
> >
> > diff --git a/include/linux/dma-buf.h b/include/linux/dma-buf.h
> > index 1ade486fc2bb..82e0a4a64601 100644
> > --- a/include/linux/dma-buf.h
> > +++ b/include/linux/dma-buf.h
> > @@ -334,6 +334,14 @@ struct dma_buf {
> > * Attachment operations implemented by the importer.
> > */
> > struct dma_buf_attach_ops {
> > + /**
> > + * @allow_peer2peer:
> > + *
> > + * If this is set to true the importer must be able to handle peer
> > + * resources without struct pages.
> > + */
> > + bool allow_peer2peer;
> > +
> > /**
> > * @move_notify
> > *
> > @@ -362,6 +370,7 @@ struct dma_buf_attach_ops {
> > * @node: list of dma_buf_attachment, protected by dma_resv lock of the
> dmabuf.
> > * @sgt: cached mapping.
> > * @dir: direction of cached mapping.
> > + * @peer2peer: true if the importer can handle peer resources without
> pages.
> > * @priv: exporter specific attachment data.
> > * @importer_ops: importer operations for this attachment, if provided
> > * dma_buf_map/unmap_attachment() must be called with the dma_resv lock
> held.
> > @@ -382,6 +391,7 @@ struct dma_buf_attachment {
> > struct list_head node;
> > struct sg_table *sgt;
> > enum dma_data_direction dir;
> > + bool peer2peer;
> > const struct dma_buf_attach_ops *importer_ops;
> > void *importer_priv;
> > void *priv;
> > --
> > 2.17.1
> >
>
> --
> Daniel Vetter
> Software Engineer, Intel Corporation
> http://blog.ffwll.ch
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel
>
[-- Attachment #1.2: Type: text/html, Size: 4382 bytes --]
[-- Attachment #2: Type: text/plain, Size: 160 bytes --]
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
next prev parent reply other threads:[~2020-04-01 2:39 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-03-30 13:55 [PATCH 1/6] dma-buf: add peer2peer flag Christian König
2020-03-30 13:55 ` [PATCH 2/6] drm/ttm: lock resv object during destruction Christian König
2020-03-30 13:55 ` [PATCH 3/6] drm/amdgpu: note that we can handle peer2peer DMA-buf Christian König
2020-03-30 13:55 ` [PATCH 4/6] drm/amdgpu: add checks if DMA-buf P2P is supported Christian König
2020-03-30 13:55 ` [PATCH 5/6] drm/amdgpu: add support for exporting VRAM using DMA-buf v3 Christian König
2020-03-30 13:55 ` [PATCH 6/6] drm/amdgpu: improve amdgpu_gem_info debugfs file Christian König
2020-03-31 8:46 ` [PATCH 1/6] dma-buf: add peer2peer flag Daniel Vetter
2020-04-01 2:39 ` Sumit Semwal [this message]
2020-04-01 11:34 ` Daniel Vetter
2020-04-01 16:04 ` Ruhl, Michael J
2020-04-03 8:32 ` Daniel Vetter
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAO_48GGs4U_cAOMfAQ7qDwTciv+b28uYXjCdPXhYpAv5Um9GHg@mail.gmail.com \
--to=sumit.semwal@linaro.org \
--cc=amd-gfx@lists.freedesktop.org \
--cc=ckoenig.leichtzumerken@gmail.com \
--cc=daniel@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).