From: Greg Hackmann Date: Fri, 13 Dec 2013 22:24:00 +0000 (-0800) Subject: gpu: ion: fix page offset in dma_buf_kmap() X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=12edf53db310345693fb7227c50e70a9b1fce434;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git gpu: ion: fix page offset in dma_buf_kmap() Signed-off-by: Greg Hackmann [jstultz: modified patch to apply to staging directory] Signed-off-by: John Stultz Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/android/ion/ion.c b/drivers/staging/android/ion/ion.c index 4d91d20a4a81..84229bd9bfbc 100644 --- a/drivers/staging/android/ion/ion.c +++ b/drivers/staging/android/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,