summaryrefslogtreecommitdiff
authorGuosong Zhou <guosong.zhou@amlogic.com>2016-04-25 06:10:39 (GMT)
committer Frank Chen <frank.chen@amlogic.com>2016-04-29 07:25:50 (GMT)
commitdf835268c0e743e32efbf72c16c87278d8a17515 (patch)
treed049e3da7f9bd722b885d6734f9ccd900b78f46c
parentd14a335461528b0d7ae0d6627e011b487cde671d (diff)
downloadgralloc-df835268c0e743e32efbf72c16c87278d8a17515.zip
gralloc-df835268c0e743e32efbf72c16c87278d8a17515.tar.gz
gralloc-df835268c0e743e32efbf72c16c87278d8a17515.tar.bz2
PD#121570: gralloc: set cache flag for encoder input surface buffer
Change-Id: I0052e5ad23ec07325f880daf5cf837252fe8d8ed
Diffstat
-rw-r--r--alloc_ion.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/alloc_ion.cpp b/alloc_ion.cpp
index 184f562..15bfd24 100644
--- a/alloc_ion.cpp
+++ b/alloc_ion.cpp
@@ -73,6 +73,11 @@ int alloc_backend_alloc(alloc_device_t* dev, size_t size, int usage, buffer_hand
ion_flags = ION_FLAG_CACHED | ION_FLAG_CACHED_NEEDS_SYNC;
}
+ if (usage & GRALLOC_USAGE_HW_VIDEO_ENCODER)
+ {
+ ion_flags = ION_FLAG_CACHED | ION_FLAG_CACHED_NEEDS_SYNC;
+ }
+
if (usage & GRALLOC_USAGE_AML_DMA_BUFFER)
{
ret = ion_alloc(m->ion_client, size, 0, ION_HEAP_CARVEOUT_MASK,