public inbox for linux-media@vger.kernel.org
 help / color / mirror / Atom feed
From: Dmitry Osipenko <dmitry.osipenko@collabora.com>
To: Lukasz Wiecaszek <lukasz.wiecaszek@googlemail.com>,
	Gerd Hoffmann <kraxel@redhat.com>
Cc: "Lukasz Wiecaszek" <lukasz.wiecaszek@gmail.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: Sun, 13 Nov 2022 19:35:20 +0300	[thread overview]
Message-ID: <50cece73-a499-eba3-7018-9e92e0791c88@collabora.com> (raw)
In-Reply-To: <20221113150511.8878-1-lukasz.wiecaszek@gmail.com>

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


  parent reply	other threads:[~2022-11-13 16:35 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 [this message]
2022-11-14  5:29   ` Lukasz Wiecaszek

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=50cece73-a499-eba3-7018-9e92e0791c88@collabora.com \
    --to=dmitry.osipenko@collabora.com \
    --cc=christian.koenig@amd.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=lukasz.wiecaszek@gmail.com \
    --cc=lukasz.wiecaszek@googlemail.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