fix: read scratch page options during init

Previous logic to initialize scratch page options during Drm::create
causes issues when PerContextVm is used, so moved the location of logic
to be configured before creating VM.

Related-To: GSD-7611
Signed-off-by: Young Jin Yoon <young.jin.yoon@intel.com>
This commit is contained in:
Young Jin Yoon
2024-06-06 16:26:42 +00:00
committed by Compute-Runtime-Automation
parent 0f0e7403bd
commit 1fc2a936fc
4 changed files with 36 additions and 3 deletions

View File

@@ -98,6 +98,9 @@ Drm *Drm::create(std::unique_ptr<HwDeviceIdDrm> &&hwDeviceId, RootDeviceEnvironm
drm->isSetPairAvailable();
drm->isChunkingAvailable();
drm->configureScratchPagePolicy();
drm->configureGpuFaultCheckThreshold();
if (!drm->isPerContextVMRequired()) {
if (!drm->createVirtualMemoryAddressSpace(GfxCoreHelper::getSubDevicesCount(rootDeviceEnvironment.getHardwareInfo()))) {
printDebugString(debugManager.flags.PrintDebugMessages.get(), stderr, "%s", "INFO: Device doesn't support GEM Virtual Memory\n");
@@ -106,9 +109,6 @@ Drm *Drm::create(std::unique_ptr<HwDeviceIdDrm> &&hwDeviceId, RootDeviceEnvironm
drm->queryAdapterBDF();
drm->configureScratchPagePolicy();
drm->configureGpuFaultCheckThreshold();
return drm.release();
}