From: Lukasz Wiecaszek <lukasz.wiecaszek@googlemail.com>
To: Dmitry Osipenko <dmitry.osipenko@collabora.com>
Cc: "Lukasz Wiecaszek" <lukasz.wiecaszek@googlemail.com>,
"Gerd Hoffmann" <kraxel@redhat.com>,
"kernel test robot" <lkp@intel.com>,
"Sumit Semwal" <sumit.semwal@linaro.org>,
"Christian König" <christian.koenig@amd.com>,
dri-devel@lists.freedesktop.org, linux-media@vger.kernel.org,
linaro-mm-sig@lists.linaro.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] udmabuf: add vmap method to udmabuf_ops
Date: Mon, 14 Nov 2022 06:29:44 +0100 [thread overview]
Message-ID: <20221114052944.GA7264@thinkpad-p72> (raw)
In-Reply-To: <50cece73-a499-eba3-7018-9e92e0791c88@collabora.com>
On Sun, Nov 13, 2022 at 07:35:20PM +0300, Dmitry Osipenko wrote:
> On 11/13/22 18:05, Lukasz Wiecaszek wrote:
> > +static int vmap_udmabuf(struct dma_buf *buf, struct iosys_map *map)
> > +{
> > + struct udmabuf *ubuf = buf->priv;
> > +
> > + if (!ubuf->vaddr) {
> > + ubuf->vaddr = vm_map_ram(ubuf->pages, ubuf->pagecount, -1);
> > + if (!ubuf->vaddr)
> > + return -EINVAL;
> > + }
>
> Create a new mapping on each vmap_udmabuf() and add the corresponding
> vunmap.
>
> Otherwise persistent vmapping shall be released together with udmabuf.
> It doesn't look that persistent vmapping is needed for udmabufs.
>
> --
> Best regards,
> Dmitry
Right. Thanks for review and remarks. Adding vunmap sounds reasonable to
me. Will add it somehow this week.
Regards,
Lukasz
prev parent reply other threads:[~2022-11-14 5:29 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-13 15:05 [PATCH v2] udmabuf: add vmap method to udmabuf_ops Lukasz Wiecaszek
2022-11-13 16:27 ` Dmitry Osipenko
2022-11-13 16:35 ` Dmitry Osipenko
2022-11-14 5:29 ` Lukasz Wiecaszek [this message]
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=20221114052944.GA7264@thinkpad-p72 \
--to=lukasz.wiecaszek@googlemail.com \
--cc=christian.koenig@amd.com \
--cc=dmitry.osipenko@collabora.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=kraxel@redhat.com \
--cc=linaro-mm-sig@lists.linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=lkp@intel.com \
--cc=sumit.semwal@linaro.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).