From f90cfb9199f8b909edce2836b1a5fb1ad2186ab2 Mon Sep 17 00:00:00 2001 From: Mateusz Jablonski Date: Thu, 24 Jan 2019 16:25:26 +0100 Subject: [PATCH] Fix typo: freeGpuVirtualAddres -> freeGpuVirtualAddress Change-Id: I6cbec2bd4ec5863e2c5df75aa60b3a7a0dbb94c6 Signed-off-by: Mateusz Jablonski --- runtime/os_interface/windows/wddm/wddm.cpp | 2 +- runtime/os_interface/windows/wddm/wddm.h | 2 +- unit_tests/mocks/mock_wddm.cpp | 6 +++--- unit_tests/mocks/mock_wddm.h | 4 ++-- unit_tests/os_interface/windows/wddm20_tests.cpp | 2 +- .../os_interface/windows/wddm_kmdaf_listener_tests.cpp | 2 +- 6 files changed, 9 insertions(+), 9 deletions(-) diff --git a/runtime/os_interface/windows/wddm/wddm.cpp b/runtime/os_interface/windows/wddm/wddm.cpp index b8d1305c35..4752d685de 100644 --- a/runtime/os_interface/windows/wddm/wddm.cpp +++ b/runtime/os_interface/windows/wddm/wddm.cpp @@ -377,7 +377,7 @@ bool Wddm::mapGpuVirtualAddressImpl(Gmm *gmm, D3DKMT_HANDLE handle, void *cpuPtr return true; } -bool Wddm::freeGpuVirtualAddres(D3DGPU_VIRTUAL_ADDRESS &gpuPtr, uint64_t size) { +bool Wddm::freeGpuVirtualAddress(D3DGPU_VIRTUAL_ADDRESS &gpuPtr, uint64_t size) { NTSTATUS status = STATUS_SUCCESS; D3DKMT_FREEGPUVIRTUALADDRESS FreeGPUVA = {0}; FreeGPUVA.hAdapter = adapter; diff --git a/runtime/os_interface/windows/wddm/wddm.h b/runtime/os_interface/windows/wddm/wddm.h index a7e402022d..da7c40f4c1 100644 --- a/runtime/os_interface/windows/wddm/wddm.h +++ b/runtime/os_interface/windows/wddm/wddm.h @@ -67,7 +67,7 @@ class Wddm { bool mapGpuVirtualAddress(AllocationStorageData *allocationStorageData, bool allocation32bit, bool use64kbPages); MOCKABLE_VIRTUAL bool createContext(D3DKMT_HANDLE &context, EngineInstanceT engineType, PreemptionMode preemptionMode); MOCKABLE_VIRTUAL void applyAdditionalContextFlags(CREATECONTEXT_PVTDATA &privateData); - MOCKABLE_VIRTUAL bool freeGpuVirtualAddres(D3DGPU_VIRTUAL_ADDRESS &gpuPtr, uint64_t size); + MOCKABLE_VIRTUAL bool freeGpuVirtualAddress(D3DGPU_VIRTUAL_ADDRESS &gpuPtr, uint64_t size); MOCKABLE_VIRTUAL NTSTATUS createAllocation(WddmAllocation *alloc); MOCKABLE_VIRTUAL bool createAllocation64k(WddmAllocation *alloc); MOCKABLE_VIRTUAL NTSTATUS createAllocationsAndMapGpuVa(OsHandleStorage &osHandles); diff --git a/unit_tests/mocks/mock_wddm.cpp b/unit_tests/mocks/mock_wddm.cpp index 86c861e83f..ed514b3be5 100644 --- a/unit_tests/mocks/mock_wddm.cpp +++ b/unit_tests/mocks/mock_wddm.cpp @@ -45,9 +45,9 @@ bool WddmMock::mapGpuVirtualAddressImpl(Gmm *gmm, D3DKMT_HANDLE handle, void *cp } } -bool WddmMock::freeGpuVirtualAddres(D3DGPU_VIRTUAL_ADDRESS &gpuPtr, uint64_t size) { - freeGpuVirtualAddresResult.called++; - return freeGpuVirtualAddresResult.success = Wddm::freeGpuVirtualAddres(gpuPtr, size); +bool WddmMock::freeGpuVirtualAddress(D3DGPU_VIRTUAL_ADDRESS &gpuPtr, uint64_t size) { + freeGpuVirtualAddressResult.called++; + return freeGpuVirtualAddressResult.success = Wddm::freeGpuVirtualAddress(gpuPtr, size); } NTSTATUS WddmMock::createAllocation(WddmAllocation *alloc) { diff --git a/unit_tests/mocks/mock_wddm.h b/unit_tests/mocks/mock_wddm.h index cfe0ece272..11f1ae8db0 100644 --- a/unit_tests/mocks/mock_wddm.h +++ b/unit_tests/mocks/mock_wddm.h @@ -57,7 +57,7 @@ class WddmMock : public Wddm { bool makeResident(D3DKMT_HANDLE *handles, uint32_t count, bool cantTrimFurther, uint64_t *numberOfBytesToTrim) override; bool evict(D3DKMT_HANDLE *handles, uint32_t num, uint64_t &sizeToTrim) override; bool mapGpuVirtualAddressImpl(Gmm *gmm, D3DKMT_HANDLE handle, void *cpuPtr, D3DGPU_VIRTUAL_ADDRESS &gpuPtr, bool allocation32Bit, bool use64kbPages, bool useHeap1) override; - bool freeGpuVirtualAddres(D3DGPU_VIRTUAL_ADDRESS &gpuPtr, uint64_t size) override; + bool freeGpuVirtualAddress(D3DGPU_VIRTUAL_ADDRESS &gpuPtr, uint64_t size) override; NTSTATUS createAllocation(WddmAllocation *alloc) override; bool createAllocation64k(WddmAllocation *alloc) override; bool destroyAllocations(D3DKMT_HANDLE *handles, uint32_t allocationCount, D3DKMT_HANDLE resourceHandle) override; @@ -105,7 +105,7 @@ class WddmMock : public Wddm { WddmMockHelpers::MakeResidentCall makeResidentResult; WddmMockHelpers::CallResult makeNonResidentResult; WddmMockHelpers::CallResult mapGpuVirtualAddressResult; - WddmMockHelpers::CallResult freeGpuVirtualAddresResult; + WddmMockHelpers::CallResult freeGpuVirtualAddressResult; WddmMockHelpers::CallResult createAllocationResult; WddmMockHelpers::CallResult destroyAllocationResult; WddmMockHelpers::CallResult destroyContextResult; diff --git a/unit_tests/os_interface/windows/wddm20_tests.cpp b/unit_tests/os_interface/windows/wddm20_tests.cpp index 8e8d0e0930..0cae7bf0e4 100644 --- a/unit_tests/os_interface/windows/wddm20_tests.cpp +++ b/unit_tests/os_interface/windows/wddm20_tests.cpp @@ -332,7 +332,7 @@ TEST_F(Wddm20Tests, mapAndFreeGpuVa) { EXPECT_TRUE(error); EXPECT_TRUE(allocation.gpuPtr != 0); - error = wddm->freeGpuVirtualAddres(allocation.gpuPtr, allocation.getUnderlyingBufferSize()); + error = wddm->freeGpuVirtualAddress(allocation.gpuPtr, allocation.getUnderlyingBufferSize()); EXPECT_TRUE(error); EXPECT_TRUE(allocation.gpuPtr == 0); diff --git a/unit_tests/os_interface/windows/wddm_kmdaf_listener_tests.cpp b/unit_tests/os_interface/windows/wddm_kmdaf_listener_tests.cpp index 3ab0742132..589f81ea47 100644 --- a/unit_tests/os_interface/windows/wddm_kmdaf_listener_tests.cpp +++ b/unit_tests/os_interface/windows/wddm_kmdaf_listener_tests.cpp @@ -104,7 +104,7 @@ TEST_F(WddmKmDafListenerTest, givenWddmWhenFreeGpuVirtualAddressIsCalledThenKmDa WddmAllocation allocation((void *)0x23000, 0x1000, nullptr, MemoryPool::MemoryNull, 1u, false); allocation.gpuPtr = GPUVA; - wddmWithKmDafMock->freeGpuVirtualAddres(allocation.gpuPtr, allocation.getUnderlyingBufferSize()); + wddmWithKmDafMock->freeGpuVirtualAddress(allocation.gpuPtr, allocation.getUnderlyingBufferSize()); EXPECT_EQ(wddmWithKmDafMock->getFeatureTable()->ftrKmdDaf, wddmWithKmDafMock->getKmDafListenerMock().notifyUnmapGpuVAParametrization.ftrKmdDaf); EXPECT_EQ(wddmWithKmDafMock->getAdapter(), wddmWithKmDafMock->getKmDafListenerMock().notifyUnmapGpuVAParametrization.hAdapter);