mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-11 08:07:19 +08:00
fix: align NEO to new Xe KMD header
Align to the new PAT and cache coherency support xe_drm.h header is generated from the series "PAT and cache coherency support" from https://patchwork.freedesktop.org/series/123027/ Related-To: NEO-9421, NEO-8324 Signed-off-by: Naklicki, Mateusz <mateusz.naklicki@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
2146cd07ee
commit
f68b8a2c97
@@ -533,6 +533,15 @@ void IoctlHelperXe::setDefaultEngine() {
|
||||
}
|
||||
}
|
||||
|
||||
uint16_t IoctlHelperXe::getCpuCachingMode() {
|
||||
uint16_t cpuCachingMode = DRM_XE_GEM_CPU_CACHING_WC;
|
||||
if (debugManager.flags.OverrideCpuCaching.get() != -1) {
|
||||
cpuCachingMode = debugManager.flags.OverrideCpuCaching.get();
|
||||
}
|
||||
|
||||
return cpuCachingMode;
|
||||
}
|
||||
|
||||
int IoctlHelperXe::createGemExt(const MemRegionsVec &memClassInstances, size_t allocSize, uint32_t &handle, uint64_t patIndex, std::optional<uint32_t> vmId, int32_t pairHandle, bool isChunked, uint32_t numOfChunks) {
|
||||
struct drm_xe_gem_create create = {};
|
||||
uint32_t regionsSize = static_cast<uint32_t>(memClassInstances.size());
|
||||
@@ -553,6 +562,7 @@ int IoctlHelperXe::createGemExt(const MemRegionsVec &memClassInstances, size_t a
|
||||
memoryInstances.set(memoryClassInstance.memoryInstance);
|
||||
}
|
||||
create.flags = static_cast<uint32_t>(memoryInstances.to_ulong());
|
||||
create.cpu_caching = this->getCpuCachingMode();
|
||||
|
||||
auto ret = IoctlHelper::ioctl(DrmIoctl::gemCreate, &create);
|
||||
handle = create.handle;
|
||||
@@ -586,6 +596,7 @@ uint32_t IoctlHelperXe::createGem(uint64_t size, uint32_t memoryBanks) {
|
||||
memoryInstances.set(regionClassAndInstance.memoryInstance);
|
||||
}
|
||||
create.flags = static_cast<uint32_t>(memoryInstances.to_ulong());
|
||||
create.cpu_caching = this->getCpuCachingMode();
|
||||
[[maybe_unused]] auto ret = ioctl(DrmIoctl::gemCreate, &create);
|
||||
DEBUG_BREAK_IF(ret != 0);
|
||||
updateBindInfo(create.handle, 0u, create.size);
|
||||
@@ -1254,6 +1265,7 @@ int IoctlHelperXe::xeVmBind(const VmBindParams &vmBindParams, bool isBind) {
|
||||
bind.bind.addr = gmmHelper->decanonize(vmBindParams.start);
|
||||
bind.bind.flags = DRM_XE_VM_BIND_FLAG_ASYNC;
|
||||
bind.bind.obj_offset = vmBindParams.offset;
|
||||
bind.bind.pat_index = vmBindParams.patIndex;
|
||||
|
||||
if (isBind) {
|
||||
bind.bind.op = DRM_XE_VM_BIND_OP_MAP;
|
||||
|
||||
Reference in New Issue
Block a user