mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-04 15:53:45 +08:00
Add regkey to set preferred location for kmd-migrated shared allocation
The regkey SetVmAdvisePreferredLocation sets the KMD VM advise with preferred location for KMD-migrated shared allocation (default - none, 1 - system, 2 - device memory). Related-To: NEO-7252 Signed-off-by: Milczarek, Slawomir <slawomir.milczarek@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
f522744886
commit
5936734550
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2022 Intel Corporation
|
||||
* Copyright (C) 2022-2023 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
@@ -228,7 +228,7 @@ int DrmMockPrelimContext::handlePrelimRequest(DrmIoctl request, void *arg) {
|
||||
} break;
|
||||
case DrmIoctl::GemVmAdvise: {
|
||||
const auto req = reinterpret_cast<prelim_drm_i915_gem_vm_advise *>(arg);
|
||||
receivedVmAdvise = VmAdvise{req->handle, req->attribute};
|
||||
receivedVmAdvise = VmAdvise{req->handle, req->attribute, {req->region.memory_class, req->region.memory_instance}};
|
||||
return vmAdviseReturn;
|
||||
} break;
|
||||
case DrmIoctl::UuidRegister: {
|
||||
@@ -572,3 +572,7 @@ uint32_t DrmPrelimHelper::getVmAdviseDeviceFlag() {
|
||||
uint32_t DrmPrelimHelper::getVmAdviseSystemFlag() {
|
||||
return PRELIM_I915_VM_ADVISE_ATOMIC_SYSTEM;
|
||||
}
|
||||
|
||||
uint32_t DrmPrelimHelper::getPreferredLocationAdvise() {
|
||||
return PRELIM_I915_VM_ADVISE_PREFERRED_LOCATION;
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2022 Intel Corporation
|
||||
* Copyright (C) 2022-2023 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
@@ -75,6 +75,7 @@ struct UserFenceVmBindExt {
|
||||
struct VmAdvise {
|
||||
uint32_t handle{0};
|
||||
uint32_t flags{0};
|
||||
MemoryClassInstance memoryRegions{0};
|
||||
};
|
||||
|
||||
struct UuidVmBindExt {
|
||||
@@ -179,4 +180,5 @@ uint64_t getMemoryRegionsParamFlag();
|
||||
uint32_t getVmAdviseNoneFlag();
|
||||
uint32_t getVmAdviseDeviceFlag();
|
||||
uint32_t getVmAdviseSystemFlag();
|
||||
uint32_t getPreferredLocationAdvise();
|
||||
}; // namespace DrmPrelimHelper
|
||||
|
||||
Reference in New Issue
Block a user