libdmabufheap: test: Don't create mapping if heap is supported neither in DMA-BUF heaps nor ION
If a client creates a legacy ION mapping for the system-uncached DMA-BUF heap
but neither supports the DMA-BUF heap nor its ION version, the
AllocSystem() API fails when 'cpu_access_needed' argument is false.
The API first tries to allocate in the system-uncached DMA-BUF heap.
When it finds the heap unsupported, it looks for any existing mappings
and assumes that since a legacy ION mapping has been created, the ION
variant of the heap must be supported.
Since it is not mandatory to support system-uncached DMA-BUF heap or its
ION variant, this patch fixes the usecase by creating the legacy mapping
only when ION is supported on the device.
Bug: 196079974
Test: atest dmabufheap-vts-unit-tests
Change-Id: I03e81235df381a080edbd506596f04bbeafaefda
Signed-off-by: Hridya Valsaraju <hridya@google.com>
1 file changed