- createGraphicsAllocationFromSharedHandle was not threadsafe,
instead of reusing BufferObject for a single handle when
multiple threads were creating memory objects from a single VASurface,
new BO could be created and placed in container with BOs for reuse.
This was leading to errors in ioctl calls.
- add lock for following set of operations:
1. find BufferObject with a given handle in container
2. create shared BO when not found
3. add shared BO to container
prevents creating multiple BOs for a single handle
- replace recursive mutex with regular mutex as mutex shouldn't
be locked recursively
Change-Id: I0937e2abf3bf1c672c6d77422d46e441f7216a68
- do not always expect failures in tests with failure injections
there is retry mechanism for some cases
Change-Id: If7589d2dacc41216d2f3b08f861209bbab179615
- new ExtendableEnum struct that serves as enum but can
be extended with values
- decrease dependencies on graphics_allocation.h header -
use forward class declaration when possible
- memoryPool indicates what kind of memory is allocated
for a given GraphicsAllocation
Change-Id: I7a707c28dc4544cc73abc5f0ed5263ba5be17452
- replace createGraphicsAllocationWithRequiredBitness with more general
methodallocateGraphicsMemoryInPreferredPool based on passed
AllocationData
- proper flags for allocation selected based on AllocationType
- remove allocateGraphicsMemory(size_t size, size_t alignment)
and use allocateGraphicsMemory(size_t size) instead where default
alignment is sufficient, otherwise use full options version:
allocateGraphicsMemory(size_t size, size_t alignment,
bool forcePin, bool uncacheable)
Change-Id: I2da891f372ee181253cb840568a61b33c0d71fc9
- change GraphicsAllocatoin::AllocationType to scoped enumeration
so that ALLOCATION_TYPE_ prefix in every enum value can be removed
- all accesses are typed (example AllocationType::IMAGE)
- Rename allocationType to AllocationUsage to eliminate confusion
with multiple AllocationType enums / types
Change-Id: I16003297ecfcb0aaa5779ad00706c5d983914bbe
- Allocator now uses uint64_t instead of void*.
- This is due to the fact that it is required to work on 64 bit addresses
in 32 bit dll.
Change-Id: Ia715ea7913efc95a2974aff8dff390203d8125a8
- do not store fragment in map until hostPointerValidation
is done
- set pointers to nullptr after delete in cleanOsHandles
Change-Id: I0bf99c3215c4b91ce059bb4e94716671c49f1946
- when pinning fails with EFAULT due to read-only memory
used for allocation (BO), mark the allocated fragments
to be freed, as cpu copy will be used.
- prevent possible leaks
Change-Id: I200ba276da5e3a8557df28fe2e411ef30d69a86a
- when fragment is already allocated, allcoating is
skipped and index is incremented,
separate index must be used for allocated bos array
Change-Id: I856a99ba4ebdad5375829a43d721c7e1490b18d3
- read only memory cannot be used for allocation,
Oses cannot create graphics alocation for such memory
- if memory allocation fails for host_ptr passed
to enqueueWrite calls, then try doing new allocation
and copy host_ptr on cpu
Change-Id: I415a4673ae1319ea8f77e53bd8fba7489fe85218
This commit fixes the issue with image contents writes
in the configuration of CSR HW with AUB dump.
Change-Id: Id0c4f36d4f9eee5175267384d42cb75bf41062f3
-Do not create allocator 32 bit with every DRM memory manager
-This is not needed for apps that do not use this.
-Add allocation of allocator to setForce32BitAddressing
Change-Id: I836b60f6b74eecf678cc9d56851797d0db176107
- Add new entry point in memory manager for internal allocations.
- Route to allocate32BitGraphicsMemory
- Add new enum to control memory region
- Change mm to memoryManager
Change-Id: I2ee069aa9baf7f69f652022e026569ec4fdb9d77
- Fix tests that were triggering the UNRECOVERABLE scenario
- Change UNRECOVERABLE to DEBUG_BREAK in some places
Change-Id: I479baac4941b485af9ea81a61a1a03d2f3f42e6a