libgralloc-qsd8k: Flush the cache after buffer allocation

Change-Id: Idb720b8c64b323216f77de834c83c328caccd6ef
This commit is contained in:
Naomi Luis 2011-02-10 10:27:59 -08:00 committed by Govind Surti
parent 36342178c2
commit e03a345a11
2 changed files with 4 additions and 2 deletions

View File

@ -30,7 +30,7 @@ LOCAL_SRC_FILES := \
pmemalloc.cpp
LOCAL_MODULE := gralloc.$(TARGET_BOARD_PLATFORM)
LOCAL_CFLAGS:= -DLOG_TAG=\"$(TARGET_BOARD_PLATFORM).gralloc\"
LOCAL_CFLAGS:= -DLOG_TAG=\"$(TARGET_BOARD_PLATFORM).gralloc\" -DHOST
ifneq (, $(filter msm7625_ffa msm7625_surf msm7627_ffa msm7627_surf msm7627_7x_ffa msm7627_7x_surf, $(QCOM_TARGET_PRODUCT)))
LOCAL_CFLAGS += -DTARGET_MSM7x27

View File

@ -181,7 +181,9 @@ int PmemUserspaceAllocator::alloc_pmem_buffer(size_t size, int usage,
} else {
LOGV("%s: mapped fd %d at offset %d, size %d", pmemdev, fd, offset, size);
memset((char*)base + offset, 0, size);
//cacheflush(intptr_t(base) + offset, intptr_t(base) + offset + size, 0);
#ifdef HOST
cacheflush(intptr_t(base) + offset, intptr_t(base) + offset + size, 0);
#endif
*pBase = base;
*pOffset = offset;
*pFd = fd;