All of lore.kernel.org
 help / color / mirror / Atom feed
From: Greg KH <gregkh@linuxfoundation.org>
To: Alexey Skidanov <alexey.skidanov@intel.com>
Cc: devel@driverdev.osuosl.org, tkjos@android.com, rve@android.com,
	linux-kernel@vger.kernel.org, maco@android.com,
	sumit.semwal@linaro.org
Subject: Re: [PATCH v3] staging: android: ion: Add implementation of dma_buf_vmap and dma_buf_vunmap
Date: Wed, 31 Jan 2018 14:00:47 +0100	[thread overview]
Message-ID: <20180131130047.GA22917@kroah.com> (raw)
In-Reply-To: <1517400222-2854-1-git-send-email-alexey.skidanov@intel.com>

On Wed, Jan 31, 2018 at 02:03:42PM +0200, Alexey Skidanov wrote:
> Any driver may access shared buffers, created by ion, using dma_buf_vmap and
> dma_buf_vunmap dma-buf API that maps/unmaps previosuly allocated buffers into
> the kernel virtual address space. The implementation of these API is missing in
> the current ion implementation.
> 
> Signed-off-by: Alexey Skidanov <alexey.skidanov@intel.com>
> ---

No review from any other Intel developers? :(

Anyway, what in-tree driver needs access to these functions?

And are you sure that you don't need to do any "real" logic in the
vmap/vunmap calls?  That feels like there would be some reference
counting problems here.

>  drivers/staging/android/ion/ion.c | 13 +++++++++++++
>  1 file changed, 13 insertions(+)
> 
> diff --git a/drivers/staging/android/ion/ion.c b/drivers/staging/android/ion/ion.c
> index f480885..4f1dc7f 100644
> --- a/drivers/staging/android/ion/ion.c
> +++ b/drivers/staging/android/ion/ion.c
> @@ -327,6 +327,17 @@ static void ion_dma_buf_kunmap(struct dma_buf *dmabuf, unsigned long offset,
>  {
>  }
>  
> +static void *ion_dma_buf_vmap(struct dma_buf *dmabuf)
> +{
> +	struct ion_buffer *buffer = dmabuf->priv;
> +
> +	return buffer->vaddr;

Just call ion_dma_buf_kmap(dmabuf, 0)?

Again, please get this reviewed by someone else in Intel first.  Don't
ignore the resources you have, to do so would be foolish :)

thanks,

greg k-h
_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

  reply	other threads:[~2018-01-31 13:00 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-31 12:03 [PATCH v3] staging: android: ion: Add implementation of dma_buf_vmap and dma_buf_vunmap Alexey Skidanov
2018-01-31 13:00 ` Greg KH [this message]
2018-02-01  6:10   ` Alexey Skidanov
2018-02-06 23:56     ` Laura Abbott
2018-02-07  5:25       ` Alexey Skidanov
2018-12-16  5:20         ` Liam Mark
2018-12-16  6:35           ` Alexey Skidanov
2018-12-17 18:42             ` Liam Mark
2018-12-18 16:24               ` Alexey Skidanov
2019-01-04 17:41                 ` Liam Mark
2019-01-04 22:11                   ` Skidanov, Alexey
2019-01-29 23:56                     ` Liam Mark

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=20180131130047.GA22917@kroah.com \
    --to=gregkh@linuxfoundation.org \
    --cc=alexey.skidanov@intel.com \
    --cc=devel@driverdev.osuosl.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=maco@android.com \
    --cc=rve@android.com \
    --cc=sumit.semwal@linaro.org \
    --cc=tkjos@android.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.