From: Greg Hackmann Date: Thu, 23 Aug 2012 00:38:04 +0000 (-0700) Subject: gpu: ion: fix page offset in dma_buf_kmap() X-Git-Tag: firefly_0821_release~4090^2~686 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=2c5cfa4d04bf4eb0cbba57df718564c54bed6eda;p=firefly-linux-kernel-4.4.55.git gpu: ion: fix page offset in dma_buf_kmap() Change-Id: I1c975f0ffde5c75d6166ae20d379991d3f770a26 Signed-off-by: Greg Hackmann --- diff --git a/drivers/gpu/ion/ion.c b/drivers/gpu/ion/ion.c index 658c9ce5c9c6..ddf8c007a75d 100644 --- a/drivers/gpu/ion/ion.c +++ b/drivers/gpu/ion/ion.c @@ -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) { 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,