mirror of
https://github.com/intel/compute-runtime.git
synced 2025-09-15 13:01:45 +08:00
Add ioctl helper function to check vm bind availability
Related-To: NEO-6591 Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
This commit is contained in:

committed by
Compute-Runtime-Automation

parent
964596e514
commit
12e2670b9a
@ -33,14 +33,14 @@ class DrmCommandStreamTest : public ::testing::Test {
|
||||
DebugManager.flags.EnableForcePin.set(false);
|
||||
|
||||
mock = new ::testing::NiceMock<DrmMockImpl>(mockFd, *executionEnvironment.rootDeviceEnvironments[0]);
|
||||
auto hwInfo = executionEnvironment.rootDeviceEnvironments[0]->getHardwareInfo();
|
||||
mock->setupIoctlHelper(hwInfo->platform.eProductFamily);
|
||||
|
||||
executionEnvironment.rootDeviceEnvironments[0]->osInterface = std::make_unique<OSInterface>();
|
||||
executionEnvironment.rootDeviceEnvironments[0]->osInterface->setDriverModel(std::unique_ptr<DriverModel>(mock));
|
||||
executionEnvironment.rootDeviceEnvironments[0]->memoryOperationsInterface = DrmMemoryOperationsHandler::create(*mock, 0u);
|
||||
|
||||
auto hwInfo = executionEnvironment.rootDeviceEnvironments[0]->getHardwareInfo();
|
||||
mock->createVirtualMemoryAddressSpace(HwHelper::getSubDevicesCount(hwInfo));
|
||||
mock->setupIoctlHelper(hwInfo->platform.eProductFamily);
|
||||
osContext = std::make_unique<OsContextLinux>(*mock, 0u,
|
||||
EngineDescriptorHelper::getDefaultDescriptor(HwHelper::get(hwInfo->platform.eRenderCoreFamily).getGpgpuEngineInstances(*hwInfo)[0],
|
||||
PreemptionHelper::getDefaultPreemptionMode(*hwInfo)));
|
||||
|
@ -34,6 +34,7 @@ using namespace NEO;
|
||||
|
||||
class DrmMockForWorker : public Drm {
|
||||
public:
|
||||
using Drm::setupIoctlHelper;
|
||||
std::mutex mutex;
|
||||
std::atomic<int> gem_close_cnt;
|
||||
std::atomic<int> gem_close_expected;
|
||||
@ -68,6 +69,9 @@ class DrmGemCloseWorkerFixture {
|
||||
void SetUp() {
|
||||
this->drmMock = new DrmMockForWorker(*executionEnvironment.rootDeviceEnvironments[0]);
|
||||
|
||||
auto hwInfo = executionEnvironment.rootDeviceEnvironments[0]->getHardwareInfo();
|
||||
drmMock->setupIoctlHelper(hwInfo->platform.eProductFamily);
|
||||
|
||||
executionEnvironment.rootDeviceEnvironments[0]->osInterface = std::make_unique<OSInterface>();
|
||||
executionEnvironment.rootDeviceEnvironments[0]->osInterface->setDriverModel(std::unique_ptr<DriverModel>(drmMock));
|
||||
executionEnvironment.rootDeviceEnvironments[0]->memoryOperationsInterface = DrmMemoryOperationsHandler::create(*drmMock, 0u);
|
||||
|
Reference in New Issue
Block a user