Skip to content

Commit 315f623

Browse files
correct name of evict flag to match wddm
Signed-off-by: Zbigniew Zdanowicz <[email protected]>
1 parent a6c7f34 commit 315f623

30 files changed

+81
-81
lines changed

opencl/test/unit_test/os_interface/windows/wddm20_tests.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -816,11 +816,11 @@ TEST_F(Wddm20Tests, GivenMultipleHandlesWhenMakingResidentThenBytesToTrimIsCorre
816816

817817
TEST_F(Wddm20Tests, WhenMakingNonResidentAndEvictNotNeededThenEvictIsCalledWithProperFlagSet) {
818818
DebugManagerStateRestore restorer{};
819-
DebugManager.flags.PlaformSupportEvictWhenNecessaryFlag.set(1);
819+
DebugManager.flags.PlaformSupportEvictIfNecessaryFlag.set(1);
820820

821821
auto productFamily = rootDeviceEnvironment->getHardwareInfo()->platform.eProductFamily;
822822
HwInfoConfig *hwConfig = HwInfoConfig::get(productFamily);
823-
wddm->setPlatformSupportEvictWhenNecessaryFlag(*hwConfig);
823+
wddm->setPlatformSupportEvictIfNecessaryFlag(*hwConfig);
824824

825825
D3DKMT_HANDLE handle = (D3DKMT_HANDLE)0x1234;
826826

opencl/test/unit_test/os_interface/windows/wddm_residency_controller_tests.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -499,11 +499,11 @@ TEST_F(WddmResidencyControllerTest, GivenListSizeLessThenDoubleCandidateCountWhe
499499

500500
TEST_F(WddmResidencyControllerWithGdiTest, givenNotUsedAllocationsFromPreviousPeriodicTrimWhenTrimResidencyPeriodicTrimIsCalledThenAllocationsAreEvictedMarkedAndRemovedFromTrimCandidateList) {
501501
DebugManagerStateRestore restorer{};
502-
DebugManager.flags.PlaformSupportEvictWhenNecessaryFlag.set(1);
502+
DebugManager.flags.PlaformSupportEvictIfNecessaryFlag.set(1);
503503

504504
auto productFamily = rootDeviceEnvironment->getHardwareInfo()->platform.eProductFamily;
505505
HwInfoConfig *hwConfig = HwInfoConfig::get(productFamily);
506-
wddm->setPlatformSupportEvictWhenNecessaryFlag(*hwConfig);
506+
wddm->setPlatformSupportEvictIfNecessaryFlag(*hwConfig);
507507

508508
D3DKMT_TRIMNOTIFICATION trimNotification = {0};
509509
trimNotification.Flags.PeriodicTrim = 1;
@@ -584,11 +584,11 @@ TEST_F(WddmResidencyControllerWithGdiAndMemoryManagerTest, givenTripleAllocation
584584
GTEST_SKIP();
585585
}
586586
DebugManagerStateRestore restorer{};
587-
DebugManager.flags.PlaformSupportEvictWhenNecessaryFlag.set(1);
587+
DebugManager.flags.PlaformSupportEvictIfNecessaryFlag.set(1);
588588

589589
auto productFamily = executionEnvironment->rootDeviceEnvironments[0]->getHardwareInfo()->platform.eProductFamily;
590590
HwInfoConfig *hwConfig = HwInfoConfig::get(productFamily);
591-
wddm->setPlatformSupportEvictWhenNecessaryFlag(*hwConfig);
591+
wddm->setPlatformSupportEvictIfNecessaryFlag(*hwConfig);
592592

593593
D3DKMT_TRIMNOTIFICATION trimNotification = {0};
594594
trimNotification.Flags.PeriodicTrim = 1;

shared/source/debug_settings/debug_variables_base.inl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,7 @@ DECLARE_DEBUG_VARIABLE(int32_t, ForceWddmLowPriorityContextValue, -1, "Force sch
214214
DECLARE_DEBUG_VARIABLE(int32_t, FailBuildProgramWithStatefulAccess, -1, "-1: default, 0: disable, 1: enable, Fail build program/module creation whenever stateful access is discovered (except built in kernels).")
215215
DECLARE_DEBUG_VARIABLE(int32_t, ForceImagesSupport, -1, "-1: default, 0: disable, 1: enable. Override support for Images.")
216216
DECLARE_DEBUG_VARIABLE(int32_t, OverrideL1CachePolicyInSurfaceStateAndStateless, -1, "-1: default, >=0 : following policy will be programmed in render surface state (for regular buffers) and stateless L1 caching")
217-
DECLARE_DEBUG_VARIABLE(int32_t, PlaformSupportEvictWhenNecessaryFlag, -1, "-1: default - platform specific, 0: disable, 1: enable")
217+
DECLARE_DEBUG_VARIABLE(int32_t, PlaformSupportEvictIfNecessaryFlag, -1, "-1: default - platform specific, 0: disable, 1: enable")
218218
DECLARE_DEBUG_VARIABLE(int32_t, ForceEvictOnlyIfNecessaryFlag, -1, "-1: default - driver selects when to use, 0: force never use this flag, 1: force always use this flag")
219219

220220
/*LOGGING FLAGS*/

shared/source/os_interface/hw_info_config.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ class HwInfoConfig {
132132
virtual bool isAdjustWalkOrderAvailable(const HardwareInfo &hwInfo) const = 0;
133133
virtual bool isAssignEngineRoundRobinSupported() const = 0;
134134
virtual uint32_t getL1CachePolicy() const = 0;
135-
virtual bool isEvictionWhenNecessaryFlagSupported() const = 0;
135+
virtual bool isEvictionIfNecessaryFlagSupported() const = 0;
136136
virtual void adjustNumberOfCcs(HardwareInfo &hwInfo) const = 0;
137137
virtual bool isPrefetcherDisablingInDirectSubmissionRequired() const = 0;
138138

@@ -237,7 +237,7 @@ class HwInfoConfigHw : public HwInfoConfig {
237237
bool isAdjustWalkOrderAvailable(const HardwareInfo &hwInfo) const override;
238238
bool isAssignEngineRoundRobinSupported() const override;
239239
uint32_t getL1CachePolicy() const override;
240-
bool isEvictionWhenNecessaryFlagSupported() const override;
240+
bool isEvictionIfNecessaryFlagSupported() const override;
241241
void adjustNumberOfCcs(HardwareInfo &hwInfo) const override;
242242
bool isPrefetcherDisablingInDirectSubmissionRequired() const override;
243243

shared/source/os_interface/hw_info_config_bdw_and_later.inl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ bool HwInfoConfigHw<gfxProduct>::isMatrixMultiplyAccumulateSupported(const Hardw
7171
}
7272

7373
template <PRODUCT_FAMILY gfxProduct>
74-
bool HwInfoConfigHw<gfxProduct>::isEvictionWhenNecessaryFlagSupported() const {
74+
bool HwInfoConfigHw<gfxProduct>::isEvictionIfNecessaryFlagSupported() const {
7575
return true;
7676
}
7777

shared/source/os_interface/hw_info_config_xehp_and_later.inl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ bool HwInfoConfigHw<gfxProduct>::isMatrixMultiplyAccumulateSupported(const Hardw
7474
}
7575

7676
template <PRODUCT_FAMILY gfxProduct>
77-
bool HwInfoConfigHw<gfxProduct>::isEvictionWhenNecessaryFlagSupported() const {
77+
bool HwInfoConfigHw<gfxProduct>::isEvictionIfNecessaryFlagSupported() const {
7878
return true;
7979
}
8080

shared/source/os_interface/windows/wddm/wddm.cpp

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ bool Wddm::init() {
105105
if (hwConfig->configureHwInfoWddm(hardwareInfo.get(), hardwareInfo.get(), nullptr)) {
106106
return false;
107107
}
108-
setPlatformSupportEvictWhenNecessaryFlag(*hwConfig);
108+
setPlatformSupportEvictIfNecessaryFlag(*hwConfig);
109109

110110
auto preemptionMode = PreemptionHelper::getDefaultPreemptionMode(*hardwareInfo);
111111
rootDeviceEnvironment.setHwInfo(hardwareInfo.get());
@@ -140,12 +140,12 @@ bool Wddm::init() {
140140
return configureDeviceAddressSpace();
141141
}
142142

143-
void Wddm::setPlatformSupportEvictWhenNecessaryFlag(const HwInfoConfig &hwInfoConfig) {
144-
platformSupportsEvictWhenNecessary = hwInfoConfig.isEvictionWhenNecessaryFlagSupported();
145-
int32_t overridePlatformSupportsEvictWhenNecessary =
146-
DebugManager.flags.PlaformSupportEvictWhenNecessaryFlag.get();
147-
if (overridePlatformSupportsEvictWhenNecessary != -1) {
148-
platformSupportsEvictWhenNecessary = !!overridePlatformSupportsEvictWhenNecessary;
143+
void Wddm::setPlatformSupportEvictIfNecessaryFlag(const HwInfoConfig &hwInfoConfig) {
144+
platformSupportsEvictIfNecessary = hwInfoConfig.isEvictionIfNecessaryFlagSupported();
145+
int32_t overridePlatformSupportsEvictIfNecessary =
146+
DebugManager.flags.PlaformSupportEvictIfNecessaryFlag.get();
147+
if (overridePlatformSupportsEvictIfNecessary != -1) {
148+
platformSupportsEvictIfNecessary = !!overridePlatformSupportsEvictIfNecessary;
149149
}
150150
forceEvictOnlyIfNecessary = DebugManager.flags.ForceEvictOnlyIfNecessaryFlag.get();
151151
}

shared/source/os_interface/windows/wddm/wddm.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -229,15 +229,15 @@ class Wddm : public DriverModel {
229229
MOCKABLE_VIRTUAL void createPagingFenceLogger();
230230
bool setLowPriorityContextParam(D3DKMT_HANDLE contextHandle);
231231
bool adjustEvictNeededParameter(bool evictNeeded) {
232-
if (evictNeeded == false && platformSupportsEvictWhenNecessary == false) {
232+
if (evictNeeded == false && platformSupportsEvictIfNecessary == false) {
233233
evictNeeded = true;
234234
}
235235
if (forceEvictOnlyIfNecessary != -1) {
236236
evictNeeded = !forceEvictOnlyIfNecessary;
237237
}
238238
return evictNeeded;
239239
}
240-
void setPlatformSupportEvictWhenNecessaryFlag(const HwInfoConfig &hwInfoConfig);
240+
void setPlatformSupportEvictIfNecessaryFlag(const HwInfoConfig &hwInfoConfig);
241241
void populateAdditionalAdapterInfoOptions(const ADAPTER_INFO_KMD &adapterInfo);
242242

243243
GMM_GFX_PARTITIONING gfxPartition{};
@@ -285,7 +285,7 @@ class Wddm : public DriverModel {
285285

286286
unsigned int enablePreemptionRegValue = 1;
287287

288-
bool platformSupportsEvictWhenNecessary = false;
288+
bool platformSupportsEvictIfNecessary = false;
289289
bool instrumentationEnabled = false;
290290
};
291291
} // namespace NEO

shared/test/common/mocks/mock_hw_info_config.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -392,7 +392,7 @@ uint64_t HwInfoConfigHw<IGFX_UNKNOWN>::getHostMemCapabilitiesValue() {
392392
}
393393

394394
template <>
395-
bool HwInfoConfigHw<IGFX_UNKNOWN>::isEvictionWhenNecessaryFlagSupported() const {
395+
bool HwInfoConfigHw<IGFX_UNKNOWN>::isEvictionIfNecessaryFlagSupported() const {
396396
return true;
397397
}
398398

shared/test/common/mocks/mock_wddm.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,11 +45,11 @@ class WddmMock : public Wddm {
4545
using Wddm::minAddress;
4646
using Wddm::pagingFenceAddress;
4747
using Wddm::pagingQueue;
48-
using Wddm::platformSupportsEvictWhenNecessary;
48+
using Wddm::platformSupportsEvictIfNecessary;
4949
using Wddm::populateAdditionalAdapterInfoOptions;
5050
using Wddm::residencyLogger;
5151
using Wddm::rootDeviceEnvironment;
52-
using Wddm::setPlatformSupportEvictWhenNecessaryFlag;
52+
using Wddm::setPlatformSupportEvictIfNecessaryFlag;
5353
using Wddm::temporaryResources;
5454
using Wddm::timestampFrequency;
5555
using Wddm::wddmInterface;

0 commit comments

Comments
 (0)