performance: program pat index on mtl linux

Enable programming pat indexes on mtl linux for device buffers.

Change DrmMemoryManager::allocateMemoryByKMD to use gemCreateExt.

Set mmap flags based on coherency.
Map as write back on legacy and coherent.
On non-coherent map as write combined.

Changes currently disabled, to enable use debug keys:
DisableGemCreateExtSetPat=0
UseGemCreateExtInAllocateMemoryByKMD=1

Reorder BufferObject to decrease padding.

Related-To: NEO-7896

Signed-off-by: Dominik Dabek <dominik.dabek@intel.com>
This commit is contained in:
Dominik Dabek
2024-02-16 16:26:30 +00:00
committed by Compute-Runtime-Automation
parent be7b80746b
commit 0120d8a58d
13 changed files with 171 additions and 39 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2018-2023 Intel Corporation
* Copyright (C) 2018-2024 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
@@ -81,7 +81,7 @@ BufferObject::BufferObject(uint32_t rootDeviceIndex, Drm *drm, uint64_t patIndex
: BufferObject(rootDeviceIndex, drm, patIndex, BufferObjectHandleWrapper{handle}, size, maxOsContextCount) {}
BufferObject::BufferObject(uint32_t rootDeviceIndex, Drm *drm, uint64_t patIndex, BufferObjectHandleWrapper &&handle, size_t size, size_t maxOsContextCount)
: drm(drm), refCount(1), rootDeviceIndex(rootDeviceIndex), handle(std::move(handle)), size(size) {
: drm(drm), size(size), handle(std::move(handle)), refCount(1), rootDeviceIndex(rootDeviceIndex) {
auto ioctlHelper = drm->getIoctlHelper();
this->tilingMode = ioctlHelper->getDrmParamValue(DrmParam::tilingNone);