mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-19 06:24:51 +08:00
Revert "fix: read scratch page options during init"
This reverts commit 9322495e7d.
Signed-off-by: Compute-Runtime-Validation <compute-runtime-validation@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
521add6ca7
commit
0f6ce05b93
@@ -14,7 +14,6 @@
|
||||
#include "shared/source/os_interface/driver_info.h"
|
||||
#include "shared/source/os_interface/linux/allocator_helper.h"
|
||||
#include "shared/source/os_interface/linux/i915.h"
|
||||
#include "shared/source/os_interface/linux/ioctl_helper.h"
|
||||
#include "shared/source/os_interface/linux/sys_calls.h"
|
||||
#include "shared/source/os_interface/os_interface.h"
|
||||
#include "shared/test/common/helpers/custom_event_listener.h"
|
||||
@@ -767,28 +766,6 @@ TEST_F(DrmTests, givenDrmIsCreatedWhenCreateVirtualMemoryFailsThenReturnVirtualM
|
||||
::testing::internal::GetCapturedStdout();
|
||||
}
|
||||
|
||||
TEST_F(DrmTests, givenDrmIsCreatedWithPerContextVmRequiredWhenCreateVirtualMemoryThenCapturedVirtualMemoryIsSettingScratchPageOptionCorrectly) {
|
||||
DebugManagerStateRestore dbgRestorer;
|
||||
debugManager.flags.PrintDebugMessages.set(true);
|
||||
debugManager.flags.DisableScratchPages.set(true);
|
||||
debugManager.flags.GpuFaultCheckThreshold.set(10);
|
||||
|
||||
VariableBackup<decltype(captureVirtualMemoryCreate)> backupCaptureVirtualMemoryCreate(&captureVirtualMemoryCreate);
|
||||
VariableBackup<decltype(capturedVmCreate)> backupCapturedVmCreate(&capturedVmCreate);
|
||||
|
||||
captureVirtualMemoryCreate = 1;
|
||||
capturedVmCreate = {};
|
||||
|
||||
auto drm = DrmWrap::createDrm(*mockRootDeviceEnvironment);
|
||||
EXPECT_NE(drm, nullptr);
|
||||
|
||||
auto disableScratch = drm.get()->checkToDisableScratchPage();
|
||||
auto ioctlHelper = drm.get()->getIoctlHelper();
|
||||
for (auto ctl : capturedVmCreate) {
|
||||
EXPECT_NE(0u, (ctl.flags & ioctlHelper->getFlagsForVmCreate(disableScratch, false, false)));
|
||||
}
|
||||
}
|
||||
|
||||
TEST(SysCalls, WhenSysCallsPollCalledThenCallIsRedirectedToOs) {
|
||||
struct pollfd pollFd;
|
||||
pollFd.fd = 0;
|
||||
|
||||
@@ -41,7 +41,6 @@ int failOnVirtualMemoryCreate = 0;
|
||||
int failOnSetPriority = 0;
|
||||
int failOnPreemption = 0;
|
||||
int failOnDrmVersion = 0;
|
||||
int captureVirtualMemoryCreate = 0;
|
||||
int accessCalledTimes = 0;
|
||||
int readLinkCalledTimes = 0;
|
||||
int fstatCalledTimes = 0;
|
||||
@@ -50,7 +49,6 @@ char providedDrmVersion[5] = {'i', '9', '1', '5', '\0'};
|
||||
uint64_t gpuTimestamp = 0;
|
||||
int ioctlSeq[8] = {0, 0, 0, 0, 0, 0, 0, 0};
|
||||
size_t ioctlCnt = 0;
|
||||
std::vector<NEO::GemVmControl> capturedVmCreate{};
|
||||
|
||||
int fstat(int fd, struct stat *buf) {
|
||||
++fstatCalledTimes;
|
||||
@@ -236,9 +234,6 @@ int drmVirtualMemoryCreate(NEO::GemVmControl *control) {
|
||||
if (!failOnVirtualMemoryCreate) {
|
||||
control->vmId = ++vmId;
|
||||
}
|
||||
if (captureVirtualMemoryCreate) {
|
||||
capturedVmCreate.push_back(*control);
|
||||
}
|
||||
return failOnVirtualMemoryCreate;
|
||||
}
|
||||
|
||||
|
||||
@@ -7,8 +7,6 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "shared/source/os_interface/linux/drm_wrappers.h"
|
||||
|
||||
#include <array>
|
||||
#include <cstdint>
|
||||
#include <cstdlib>
|
||||
@@ -18,7 +16,6 @@
|
||||
#include <stdarg.h>
|
||||
#include <sys/types.h>
|
||||
#include <unistd.h>
|
||||
#include <vector>
|
||||
|
||||
extern int (*openFunc)(const char *pathname, int flags, ...);
|
||||
extern int (*openFull)(const char *pathname, int flags, ...);
|
||||
@@ -41,7 +38,6 @@ extern int failOnSetPriority;
|
||||
extern int failOnPreemption;
|
||||
extern int havePreemption;
|
||||
extern int failOnDrmVersion;
|
||||
extern int captureVirtualMemoryCreate;
|
||||
extern char providedDrmVersion[5];
|
||||
extern int ioctlSeq[8];
|
||||
extern size_t ioctlCnt;
|
||||
@@ -51,4 +47,3 @@ extern int accessCalledTimes;
|
||||
extern int readLinkCalledTimes;
|
||||
extern int fstatCalledTimes;
|
||||
extern bool forceExtraIoctlDuration;
|
||||
extern std::vector<NEO::GemVmControl> capturedVmCreate;
|
||||
|
||||
@@ -98,9 +98,6 @@ 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");
|
||||
@@ -109,6 +106,9 @@ Drm *Drm::create(std::unique_ptr<HwDeviceIdDrm> &&hwDeviceId, RootDeviceEnvironm
|
||||
|
||||
drm->queryAdapterBDF();
|
||||
|
||||
drm->configureScratchPagePolicy();
|
||||
drm->configureGpuFaultCheckThreshold();
|
||||
|
||||
return drm.release();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user