Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8eec9d08 authored by Lajos Molnar's avatar Lajos Molnar
Browse files

codec2: cache ion buffers with CPU access flags.

Bug: 131600580
Bug: 132046952
Change-Id: I72a63c18ee1e43bf55507683e01c6746eba6ade9
parent f9b3d532
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -554,7 +554,11 @@ c2_status_t C2AllocatorIon::mapUsage(
        } else {
            *align = 0; // TODO make this 1
            *heapMask = ~0; // default mask
            if (usage.expected & (C2MemoryUsage::CPU_READ | C2MemoryUsage::CPU_WRITE)) {
                *flags = ION_FLAG_CACHED; // cache CPU accessed buffers
            } else {
                *flags = 0;  // default flags
            }
            res = C2_NO_INIT;
        }
        // add usage to cache