gralloc8k: make sure to set the physical address of the framebuffer

Signed-off-by: Dima Zavin <dima@android.com>
This commit is contained in:
Dima Zavin 2009-08-07 15:58:07 -07:00
parent 8b9940f048
commit 3e49b7a81f
2 changed files with 3 additions and 1 deletions

View File

@ -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;
}

View File

@ -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;