From 3e49b7a81fc66cd5c6d34713459ff79b46930488 Mon Sep 17 00:00:00 2001 From: Dima Zavin Date: Fri, 7 Aug 2009 15:58:07 -0700 Subject: [PATCH] gralloc8k: make sure to set the physical address of the framebuffer Signed-off-by: Dima Zavin --- framebuffer.cpp | 1 + gralloc.cpp | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/framebuffer.cpp b/framebuffer.cpp index d01cdae..af8f1fb 100644 --- a/framebuffer.cpp +++ b/framebuffer.cpp @@ -301,6 +301,7 @@ int mapFrameBufferLocked(struct private_module_t* module) return -errno; } module->framebuffer->base = intptr_t(vaddr); + module->framebuffer->phys = intptr_t(finfo.smem_start); memset(vaddr, 0, fbSize); return 0; } diff --git a/gralloc.cpp b/gralloc.cpp index 536d1c4..89d1fe3 100644 --- a/gralloc.cpp +++ b/gralloc.cpp @@ -155,9 +155,10 @@ static int gralloc_alloc_framebuffer_locked(alloc_device_t* dev, } vaddr += bufferSize; } - + hnd->base = vaddr; hnd->offset = vaddr - intptr_t(m->framebuffer->base); + hnd->phys = intptr_t(m->framebuffer->phys) + hnd->offset; *pHandle = hnd; return 0;