summaryrefslogtreecommitdiff
path: root/libcopybit/copybit_c2d.cpp
diff options
context:
space:
mode:
authorLinux Build Service Account <lnxbuild@localhost>2013-03-27 14:34:49 -0700
committerGerrit - the friendly Code Review server <code-review@localhost>2013-03-27 14:34:49 -0700
commit86acaa7718a7dd3575fc21fa6a11231c7b80cfc5 (patch)
treed212d7622521ca131fea88fba9fcde6e08d7c20d /libcopybit/copybit_c2d.cpp
parentc5821dc32d4fa097e155156a6b070ecc3a7de062 (diff)
parentaeab91f9777e8e0b7ac85c7569514ce7fb80af66 (diff)
downloaddisplay-86acaa7718a7dd3575fc21fa6a11231c7b80cfc5.tar.gz
Merge "display: Use cache invalidate and clean correctly"
Diffstat (limited to 'libcopybit/copybit_c2d.cpp')
-rw-r--r--libcopybit/copybit_c2d.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/libcopybit/copybit_c2d.cpp b/libcopybit/copybit_c2d.cpp
index efbd350d..5c58dd36 100644
--- a/libcopybit/copybit_c2d.cpp
+++ b/libcopybit/copybit_c2d.cpp
@@ -1259,10 +1259,11 @@ static int stretch_copybit_internal(
return status;
}
- // Flush the cache
+ // Clean the cache
IMemAlloc* memalloc = sAlloc->getAllocator(src_hnd->flags);
if (memalloc->clean_buffer((void *)(src_hnd->base), src_hnd->size,
- src_hnd->offset, src_hnd->fd)) {
+ src_hnd->offset, src_hnd->fd,
+ gralloc::CACHE_CLEAN)) {
ALOGE("%s: clean_buffer failed", __FUNCTION__);
delete_handle(dst_hnd);
delete_handle(src_hnd);
@@ -1343,10 +1344,11 @@ static int stretch_copybit_internal(
unmap_gpuaddr(ctx, mapped_src_idx);
return status;
}
- // Invalidate the cache.
+ // Clean the cache.
IMemAlloc* memalloc = sAlloc->getAllocator(dst_hnd->flags);
memalloc->clean_buffer((void *)(dst_hnd->base), dst_hnd->size,
- dst_hnd->offset, dst_hnd->fd);
+ dst_hnd->offset, dst_hnd->fd,
+ gralloc::CACHE_CLEAN);
}
delete_handle(dst_hnd);
delete_handle(src_hnd);