libgralloc-qsd8k: Do not use the physical address of surfaces/framebuffer
The GPU now correctly maps everything throug hthe MMU so physical addresses are no longer needed. Change-Id: Id16a690f63d7141c8ee6694b246b1955f450b8ed Signed-off-by: Dima Zavin <dima@android.com>
This commit is contained in:
parent
3b81370104
commit
be6f97aad3
@ -329,7 +329,6 @@ 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;
|
||||
}
|
||||
|
@ -112,7 +112,6 @@ struct private_module_t HAL_MODULE_INFO_SYM = {
|
||||
currentBuffer: 0,
|
||||
pmem_master: -1,
|
||||
pmem_master_base: 0,
|
||||
master_phys: 0
|
||||
};
|
||||
|
||||
/*****************************************************************************/
|
||||
@ -166,7 +165,6 @@ static int gralloc_alloc_framebuffer_locked(alloc_device_t* dev,
|
||||
|
||||
hnd->base = vaddr;
|
||||
hnd->offset = vaddr - intptr_t(m->framebuffer->base);
|
||||
hnd->phys = intptr_t(m->framebuffer->phys) + hnd->offset;
|
||||
*pHandle = hnd;
|
||||
|
||||
return 0;
|
||||
@ -206,15 +204,6 @@ static int init_pmem_area_locked(private_module_t* m)
|
||||
base = 0;
|
||||
close(master_fd);
|
||||
master_fd = -1;
|
||||
} else {
|
||||
// FIXME: get physical address, eventually this will have to go away
|
||||
pmem_region region;
|
||||
err = ioctl(master_fd, PMEM_GET_PHYS, ®ion);
|
||||
if (err < 0) {
|
||||
LOGE("PMEM_GET_PHYS failed (%s)", strerror(-errno));
|
||||
} else {
|
||||
m->master_phys = (unsigned long)region.offset;
|
||||
}
|
||||
}
|
||||
m->pmem_master = master_fd;
|
||||
m->pmem_master_base = base;
|
||||
@ -329,11 +318,6 @@ try_ashmem:
|
||||
hnd->offset = offset;
|
||||
hnd->base = int(base)+offset;
|
||||
hnd->lockState = lockState;
|
||||
if (flags & private_handle_t::PRIV_FLAGS_USES_PMEM) {
|
||||
private_module_t* m = reinterpret_cast<private_module_t*>(
|
||||
dev->common.module);
|
||||
hnd->phys = m->master_phys + offset;
|
||||
}
|
||||
*pHandle = hnd;
|
||||
}
|
||||
|
||||
|
@ -46,7 +46,6 @@ struct private_module_t {
|
||||
buffer_handle_t currentBuffer;
|
||||
int pmem_master;
|
||||
void* pmem_master_base;
|
||||
unsigned long master_phys;
|
||||
|
||||
struct fb_var_screeninfo info;
|
||||
struct fb_fix_screeninfo finfo;
|
||||
@ -93,7 +92,7 @@ struct private_handle_t {
|
||||
int base;
|
||||
int lockState;
|
||||
int writeOwner;
|
||||
int phys; // The physical address of that chunk of memory. If using ashmem, set to 0 They don't care
|
||||
int gpuaddr; // The gpu address mapped into the mmu. If using ashmem, set to 0 They don't care
|
||||
int pid;
|
||||
|
||||
#ifdef __cplusplus
|
||||
@ -103,7 +102,7 @@ struct private_handle_t {
|
||||
|
||||
private_handle_t(int fd, int size, int flags) :
|
||||
fd(fd), magic(sMagic), flags(flags), size(size), offset(0), gpu_fd(-1),
|
||||
base(0), lockState(0), writeOwner(0), phys(0), pid(getpid())
|
||||
base(0), lockState(0), writeOwner(0), gpuaddr(0), pid(getpid())
|
||||
{
|
||||
version = sizeof(native_handle);
|
||||
numInts = sNumInts;
|
||||
|
Loading…
Reference in New Issue
Block a user