fix: Defer MOCS to PAT

Related-To: NEO-10556

Signed-off-by: Lukasz Jobczyk <lukasz.jobczyk@intel.com>
This commit is contained in:
Lukasz Jobczyk
2024-05-24 13:34:24 +00:00
committed by Compute-Runtime-Automation
parent 913d5dc3b1
commit 6c75ec3116
9 changed files with 60 additions and 4 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2019-2023 Intel Corporation
* Copyright (C) 2019-2024 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
@@ -15,6 +15,7 @@
#include "shared/source/helpers/gfx_core_helper.h"
#include "shared/source/helpers/hw_info.h"
#include "shared/source/memory_manager/graphics_allocation.h"
#include "shared/source/os_interface/product_helper.h"
#include <algorithm>
@@ -37,6 +38,10 @@ uint32_t GmmHelper::getMOCS(uint32_t type) const {
type = GMM_RESOURCE_USAGE_OCL_BUFFER_CACHELINE_MISALIGNED;
}
if (this->rootDeviceEnvironment.getProductHelper().isNewCoherencyModelSupported()) {
return 0u;
}
MEMORY_OBJECT_CONTROL_STATE mocs = gmmClientContext->cachePolicyGetMemoryObject(nullptr, static_cast<GMM_RESOURCE_USAGE_TYPE>(type));
return static_cast<uint32_t>(mocs.DwordValue);