libgralloc-qsd8k: Flush the cache after buffer allocation
Change-Id: Idb720b8c64b323216f77de834c83c328caccd6ef
This commit is contained in:
		| @@ -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 | ||||
|   | ||||
| @@ -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; | ||||
|   | ||||
		Reference in New Issue
	
	Block a user