mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-21 09:14:47 +08:00
fix: Defer MOCS to PAT
Related-To: NEO-10556 Signed-off-by: Lukasz Jobczyk <lukasz.jobczyk@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
a787686ac5
commit
a9269939f6
@@ -9,7 +9,7 @@
|
||||
#include "shared/source/gmm_helper/gmm_lib.h"
|
||||
|
||||
namespace CacheSettings {
|
||||
inline constexpr uint32_t unknownMocs = GMM_RESOURCE_USAGE_UNKNOWN;
|
||||
inline constexpr uint32_t unknownMocs = -1;
|
||||
} // namespace CacheSettings
|
||||
|
||||
namespace NEO {
|
||||
|
||||
@@ -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->deferMOCSToPatIndex()) {
|
||||
return 0u;
|
||||
}
|
||||
|
||||
MEMORY_OBJECT_CONTROL_STATE mocs = gmmClientContext->cachePolicyGetMemoryObject(nullptr, static_cast<GMM_RESOURCE_USAGE_TYPE>(type));
|
||||
|
||||
return static_cast<uint32_t>(mocs.DwordValue);
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2018-2023 Intel Corporation
|
||||
* Copyright (C) 2018-2024 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
@@ -33,6 +33,7 @@ class GmmHelper {
|
||||
void setAddressWidth(uint32_t width) { addressWidth = width; };
|
||||
|
||||
bool isValidCanonicalGpuAddress(uint64_t address);
|
||||
bool deferMOCSToPatIndex() const;
|
||||
|
||||
GmmClientContext *getClientContext() const;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user