Commit 12edf53d authored by Greg Hackmann's avatar Greg Hackmann Committed by Greg Kroah-Hartman

gpu: ion: fix page offset in dma_buf_kmap()

Signed-off-by: default avatarGreg Hackmann <ghackmann@google.com>
[jstultz: modified patch to apply to staging directory]
Signed-off-by: default avatarJohn Stultz <john.stultz@linaro.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 708f0cac
...@@ -846,7 +846,7 @@ static void ion_dma_buf_release(struct dma_buf *dmabuf) ...@@ -846,7 +846,7 @@ static void ion_dma_buf_release(struct dma_buf *dmabuf)
static void *ion_dma_buf_kmap(struct dma_buf *dmabuf, unsigned long offset) static void *ion_dma_buf_kmap(struct dma_buf *dmabuf, unsigned long offset)
{ {
struct ion_buffer *buffer = dmabuf->priv; struct ion_buffer *buffer = dmabuf->priv;
return buffer->vaddr + offset; return buffer->vaddr + offset * PAGE_SIZE;
} }
static void ion_dma_buf_kunmap(struct dma_buf *dmabuf, unsigned long offset, static void ion_dma_buf_kunmap(struct dma_buf *dmabuf, unsigned long offset,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment