Skip to content

Commit b8aa287

Browse files
Add mock function to check for page fault support
Signed-off-by: Milczarek, Slawomir <slawomir.milczarek@intel.com>
1 parent 7ea0a11 commit b8aa287

File tree

3 files changed

+6
-2
lines changed

3 files changed

+6
-2
lines changed

shared/source/os_interface/linux/drm_neo.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ class Drm : public DriverModel {
173173
MOCKABLE_VIRTUAL bool registerResourceClasses();
174174

175175
MOCKABLE_VIRTUAL void queryPageFaultSupport();
176-
bool hasPageFaultSupport() const;
176+
MOCKABLE_VIRTUAL bool hasPageFaultSupport() const;
177177

178178
MOCKABLE_VIRTUAL uint32_t registerResource(ResourceClass classType, const void *data, size_t size);
179179
MOCKABLE_VIRTUAL void unregisterResource(uint32_t handle);

shared/source/os_interface/linux/drm_query.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ void Drm::queryPageFaultSupport() {
141141
}
142142

143143
bool Drm::hasPageFaultSupport() const {
144-
return pageFaultSupported;
144+
return false;
145145
}
146146

147147
} // namespace NEO

shared/test/common/libult/linux/drm_mock.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,10 @@ class DrmMock : public Drm {
112112
queryPageFaultSupportCalled = true;
113113
}
114114

115+
bool hasPageFaultSupport() const override {
116+
return pageFaultSupported;
117+
}
118+
115119
static const int mockFd = 33;
116120

117121
bool failRetTopology = false;

0 commit comments

Comments
 (0)