Add support for IPC handles with implicit scaling

When using implicit scaling, device allocations may have
more than one internal allocation created internally. In that case,
a separate dma-buf handle per internal allocation needs to be
exported.

So introduced two driver experimental extensions to export and
import more than one IPC handle:

- zexMemGetIpcHandles
- zexMemOpenIpcHandles

Related-To: LOCI-2919

Signed-off-by: Jaime Arteaga <jaime.a.arteaga.molina@intel.com>
This commit is contained in:
Jaime Arteaga
2022-01-31 23:29:01 +00:00
committed by Compute-Runtime-Automation
parent c0de4fd243
commit 3f26f45c10
38 changed files with 1311 additions and 52 deletions

View File

@ -176,6 +176,17 @@ class GraphicsAllocation : public IDNode<GraphicsAllocation> {
virtual std::string getAllocationInfoString() const;
virtual uint64_t peekInternalHandle(MemoryManager *memoryManager) { return 0llu; }
virtual uint64_t peekInternalHandle(MemoryManager *memoryManager, uint32_t handleId) {
return 0u;
}
virtual uint32_t getNumHandles() {
return 0u;
}
virtual void setNumHandles(uint32_t numHandles) {
}
static bool isCpuAccessRequired(AllocationType allocationType) {
return allocationType == AllocationType::COMMAND_BUFFER ||
allocationType == AllocationType::CONSTANT_SURFACE ||