Skip to content

Commit 2dc54f6

Browse files
Update isLinuxCompletionFenceSupported value for XE HPG CORE
Related-To: NEO-6575 Signed-off-by: Filip Hazubski <[email protected]>
1 parent 1634ac9 commit 2dc54f6

File tree

6 files changed

+9
-8
lines changed

6 files changed

+9
-8
lines changed

opencl/test/unit_test/os_interface/linux/drm_tests.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -941,6 +941,7 @@ TEST(DrmQueryTest, givenUapiPrelimVersionWithInvalidPathThenReturnEmptyString) {
941941

942942
TEST(DrmTest, GivenCompletionFenceDebugFlagWhenCreatingDrmObjectThenExpectCorrectSetting) {
943943
DebugManagerStateRestore restore;
944+
DebugManager.flags.UseVmBind.set(1);
944945

945946
auto executionEnvironment = std::make_unique<ExecutionEnvironment>();
946947
executionEnvironment->prepareRootDeviceEnvironments(1);
@@ -950,7 +951,7 @@ TEST(DrmTest, GivenCompletionFenceDebugFlagWhenCreatingDrmObjectThenExpectCorrec
950951
auto &hwHelper = HwHelper::get(hwInfo->platform.eRenderCoreFamily);
951952

952953
DrmMock drmDefault{*executionEnvironment->rootDeviceEnvironments[0]};
953-
if (hwHelper.isLinuxCompletionFenceSupported()) {
954+
if (hwHelper.isLinuxCompletionFenceSupported() && drmDefault.isVmBindAvailable()) {
954955
EXPECT_TRUE(drmDefault.completionFenceSupport());
955956
} else {
956957
EXPECT_FALSE(drmDefault.completionFenceSupport());

shared/source/os_interface/linux/drm_neo.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1033,7 +1033,7 @@ bool Drm::queryEngineInfo(bool isSysmanEnabled) {
10331033

10341034
bool Drm::completionFenceSupport() {
10351035
std::call_once(checkCompletionFenceOnce, [this]() {
1036-
bool support = IoctlHelper::get(this)->completionFenceExtensionSupported(*getRootDeviceEnvironment().getHardwareInfo());
1036+
bool support = IoctlHelper::get(this)->completionFenceExtensionSupported(*this, *getRootDeviceEnvironment().getHardwareInfo());
10371037
int32_t overrideCompletionFence = DebugManager.flags.EnableDrmCompletionFence.get();
10381038
if (overrideCompletionFence != -1) {
10391039
support = !!overrideCompletionFence;

shared/source/os_interface/linux/ioctl_helper.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ class IoctlHelper {
7575
virtual uint32_t queryDistances(Drm *drm, std::vector<drm_i915_query_item> &queryItems, std::vector<DistanceInfo> &distanceInfos) = 0;
7676
virtual int32_t getComputeEngineClass() = 0;
7777
virtual int execBuffer(Drm *drm, drm_i915_gem_execbuffer2 *execBuffer, uint64_t completionGpuAddress, uint32_t counterValue) = 0;
78-
virtual bool completionFenceExtensionSupported(const HardwareInfo &hwInfo) = 0;
78+
virtual bool completionFenceExtensionSupported(Drm &drm, const HardwareInfo &hwInfo) = 0;
7979
};
8080

8181
class IoctlHelperUpstream : public IoctlHelper {
@@ -98,7 +98,7 @@ class IoctlHelperUpstream : public IoctlHelper {
9898
uint32_t queryDistances(Drm *drm, std::vector<drm_i915_query_item> &queryItems, std::vector<DistanceInfo> &distanceInfos) override;
9999
int32_t getComputeEngineClass() override;
100100
int execBuffer(Drm *drm, drm_i915_gem_execbuffer2 *execBuffer, uint64_t completionGpuAddress, uint32_t counterValue) override;
101-
bool completionFenceExtensionSupported(const HardwareInfo &hwInfo) override;
101+
bool completionFenceExtensionSupported(Drm &drm, const HardwareInfo &hwInfo) override;
102102
};
103103

104104
template <PRODUCT_FAMILY gfxProduct>
@@ -132,7 +132,7 @@ class IoctlHelperPrelim20 : public IoctlHelper {
132132
uint32_t queryDistances(Drm *drm, std::vector<drm_i915_query_item> &queryItems, std::vector<DistanceInfo> &distanceInfos) override;
133133
int32_t getComputeEngineClass() override;
134134
int execBuffer(Drm *drm, drm_i915_gem_execbuffer2 *execBuffer, uint64_t completionGpuAddress, uint32_t counterValue) override;
135-
bool completionFenceExtensionSupported(const HardwareInfo &hwInfo) override;
135+
bool completionFenceExtensionSupported(Drm &drm, const HardwareInfo &hwInfo) override;
136136
};
137137

138138
} // namespace NEO

shared/source/os_interface/linux/ioctl_helper_prelim_extended.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ int IoctlHelperPrelim20::execBuffer(Drm *drm, drm_i915_gem_execbuffer2 *execBuff
1515
return ioctl(drm, DRM_IOCTL_I915_GEM_EXECBUFFER2, execBuffer);
1616
}
1717

18-
bool IoctlHelperPrelim20::completionFenceExtensionSupported(const HardwareInfo &hwInfo) {
18+
bool IoctlHelperPrelim20::completionFenceExtensionSupported(Drm &drm, const HardwareInfo &hwInfo) {
1919
return false;
2020
}
2121

shared/source/os_interface/linux/ioctl_helper_upstream.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ int IoctlHelperUpstream::execBuffer(Drm *drm, drm_i915_gem_execbuffer2 *execBuff
134134
return ioctl(drm, DRM_IOCTL_I915_GEM_EXECBUFFER2, execBuffer);
135135
}
136136

137-
bool IoctlHelperUpstream::completionFenceExtensionSupported(const HardwareInfo &hwInfo) {
137+
bool IoctlHelperUpstream::completionFenceExtensionSupported(Drm &drm, const HardwareInfo &hwInfo) {
138138
return false;
139139
}
140140

shared/source/xe_hpg_core/hw_helper_xe_hpg_core.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ bool HwHelperHw<Family>::disableL3CacheForDebug(const HardwareInfo &hwInfo) cons
111111

112112
template <>
113113
inline bool HwHelperHw<Family>::isLinuxCompletionFenceSupported() const {
114-
return false;
114+
return true;
115115
}
116116

117117
template class HwHelperHw<Family>;

0 commit comments

Comments
 (0)