mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-11 16:45:25 +08:00
L0Debug - Notify cmdQueue create for subdevices
- PROCESS ENTRY triggered for first cmdQ created Related-To: NEO-5784 Signed-off-by: Mateusz Hoppe <mateusz.hoppe@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
92f3fe1306
commit
4da6f65d1a
@@ -337,7 +337,7 @@ class DrmMockResources : public DrmMock {
|
||||
return bindAvailable;
|
||||
}
|
||||
|
||||
uint32_t notifyFirstCommandQueueCreated() override {
|
||||
uint32_t notifyFirstCommandQueueCreated(const void *data, size_t size) override {
|
||||
ioctlCallsCount++;
|
||||
return 4;
|
||||
}
|
||||
|
||||
@@ -37,6 +37,7 @@ class MockDebuggerL0Hw : public NEO::DebuggerL0Hw<GfxFamily> {
|
||||
using NEO::DebuggerL0::perContextSbaAllocations;
|
||||
using NEO::DebuggerL0::sbaTrackingGpuVa;
|
||||
using NEO::DebuggerL0::singleAddressSpaceSbaTracking;
|
||||
using NEO::DebuggerL0::uuidL0CommandQueueHandle;
|
||||
|
||||
MockDebuggerL0Hw(NEO::Device *device) : NEO::DebuggerL0Hw<GfxFamily>(device) {}
|
||||
~MockDebuggerL0Hw() override = default;
|
||||
@@ -80,14 +81,14 @@ class MockDebuggerL0Hw : public NEO::DebuggerL0Hw<GfxFamily> {
|
||||
return NEO::DebuggerL0Hw<GfxFamily>::removeZebinModule(moduleHandle);
|
||||
}
|
||||
|
||||
void notifyCommandQueueCreated() override {
|
||||
void notifyCommandQueueCreated(NEO::Device *device) override {
|
||||
commandQueueCreatedCount++;
|
||||
NEO::DebuggerL0Hw<GfxFamily>::notifyCommandQueueCreated();
|
||||
NEO::DebuggerL0Hw<GfxFamily>::notifyCommandQueueCreated(device);
|
||||
}
|
||||
|
||||
void notifyCommandQueueDestroyed() override {
|
||||
void notifyCommandQueueDestroyed(NEO::Device *device) override {
|
||||
commandQueueDestroyedCount++;
|
||||
NEO::DebuggerL0Hw<GfxFamily>::notifyCommandQueueDestroyed();
|
||||
NEO::DebuggerL0Hw<GfxFamily>::notifyCommandQueueDestroyed(device);
|
||||
}
|
||||
|
||||
void registerAllocationType(NEO::GraphicsAllocation *allocation) override {
|
||||
|
||||
@@ -143,7 +143,7 @@ TEST_F(DrmDebugPrelimTest, GivenDrmWhenNotifyFirstCommandQueueCreatedCalledThenC
|
||||
DrmQueryMock drm(*executionEnvironment->rootDeviceEnvironments[0]);
|
||||
|
||||
auto handle = drm.context.uuidHandle;
|
||||
auto registeredHandle = drm.notifyFirstCommandQueueCreated();
|
||||
auto registeredHandle = drm.notifyFirstCommandQueueCreated(nullptr, 0);
|
||||
|
||||
EXPECT_EQ(handle + 1, drm.context.uuidHandle);
|
||||
EXPECT_EQ(handle, registeredHandle);
|
||||
@@ -151,8 +151,7 @@ TEST_F(DrmDebugPrelimTest, GivenDrmWhenNotifyFirstCommandQueueCreatedCalledThenC
|
||||
const auto &receivedUuid = drm.context.receivedRegisterUuid;
|
||||
ASSERT_TRUE(receivedUuid);
|
||||
EXPECT_EQ(DrmPrelimHelper::getStringUuidClass(), receivedUuid->uuidClass);
|
||||
EXPECT_EQ(receivedUuid->size, strlen(uuidL0CommandQueueName));
|
||||
EXPECT_EQ(0, memcmp(reinterpret_cast<const char *>(receivedUuid->ptr), uuidL0CommandQueueName, receivedUuid->size));
|
||||
EXPECT_EQ(receivedUuid->size, 0u);
|
||||
EXPECT_EQ(0, memcmp(receivedUuid->uuid, uuidL0CommandQueueHash, sizeof(receivedUuid->uuid)));
|
||||
}
|
||||
|
||||
|
||||
@@ -67,7 +67,7 @@ TEST_F(DrmDebugTest, whenNotifyCommandQueueCreateDestroyAreCalledThenImplementat
|
||||
DrmMock drmMock(*executionEnvironment->rootDeviceEnvironments[0]);
|
||||
drmMock.ioctlCallsCount = 0;
|
||||
|
||||
auto handle = drmMock.notifyFirstCommandQueueCreated();
|
||||
auto handle = drmMock.notifyFirstCommandQueueCreated(nullptr, 0);
|
||||
EXPECT_EQ(0u, handle);
|
||||
EXPECT_EQ(0u, drmMock.ioctlCallsCount);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user