From 87e948eef584c7666d4dd7ccf0b5384077deedbf Mon Sep 17 00:00:00 2001 From: ocldev Date: Fri, 20 Dec 2019 16:33:23 +0100 Subject: [PATCH] gmmlib revision update use new interface from gmmlib 19.4.1 Change-Id: Ie07bd9e9533c01ef06c67a4059a278850e365f07 Signed-off-by: Jacek Danecki --- core/gmm_helper/client_context/gmm_client_context.cpp | 4 ++-- core/gmm_helper/client_context/gmm_client_context.h | 4 ++-- .../gmm_helper/client_context/gmm_client_context_base.cpp | 4 ++-- core/gmm_helper/client_context/gmm_client_context_base.h | 8 ++++---- core/gmm_helper/gmm_helper.h | 6 +++--- manifests/manifest.yml | 2 +- runtime/dll/linux/options_linux.cpp | 6 +++--- runtime/dll/windows/options_windows.cpp | 6 +++--- runtime/gmm_helper/gmm_interface.cpp | 4 ++-- unit_tests/main.cpp | 4 ++-- unit_tests/mocks/mock_gmm_client_context.cpp | 4 ++-- unit_tests/mocks/mock_gmm_client_context.h | 4 ++-- 12 files changed, 28 insertions(+), 28 deletions(-) diff --git a/core/gmm_helper/client_context/gmm_client_context.cpp b/core/gmm_helper/client_context/gmm_client_context.cpp index 226aa4e47089..2bc0a3c727ba 100644 --- a/core/gmm_helper/client_context/gmm_client_context.cpp +++ b/core/gmm_helper/client_context/gmm_client_context.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2018-2019 Intel Corporation + * Copyright (C) 2018-2020 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -8,5 +8,5 @@ #include "gmm_client_context.h" namespace NEO { -GmmClientContext::GmmClientContext(OSInterface *osInterface, HardwareInfo *hwInfo, decltype(&InitializeGmm) initFunc, decltype(&GmmDestroy) destroyFunc) : GmmClientContextBase(osInterface, hwInfo, initFunc, destroyFunc){}; +GmmClientContext::GmmClientContext(OSInterface *osInterface, HardwareInfo *hwInfo, decltype(&InitializeGmm) initFunc, decltype(&GmmAdapterDestroy) destroyFunc) : GmmClientContextBase(osInterface, hwInfo, initFunc, destroyFunc){}; } // namespace NEO diff --git a/core/gmm_helper/client_context/gmm_client_context.h b/core/gmm_helper/client_context/gmm_client_context.h index 59802697b81e..b75388c27225 100644 --- a/core/gmm_helper/client_context/gmm_client_context.h +++ b/core/gmm_helper/client_context/gmm_client_context.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2018-2019 Intel Corporation + * Copyright (C) 2018-2020 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -11,6 +11,6 @@ namespace NEO { class GmmClientContext : public GmmClientContextBase { public: - GmmClientContext(OSInterface *osInterface, HardwareInfo *hwInfo, decltype(&InitializeGmm) initFunc, decltype(&GmmDestroy) destroyFunc); + GmmClientContext(OSInterface *osInterface, HardwareInfo *hwInfo, decltype(&InitializeGmm) initFunc, decltype(&GmmAdapterDestroy) destroyFunc); }; } // namespace NEO diff --git a/core/gmm_helper/client_context/gmm_client_context_base.cpp b/core/gmm_helper/client_context/gmm_client_context_base.cpp index f485e860cb68..3a3ea155075a 100644 --- a/core/gmm_helper/client_context/gmm_client_context_base.cpp +++ b/core/gmm_helper/client_context/gmm_client_context_base.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2018-2019 Intel Corporation + * Copyright (C) 2018-2020 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -14,7 +14,7 @@ #include "runtime/os_interface/os_interface.h" namespace NEO { -GmmClientContextBase::GmmClientContextBase(OSInterface *osInterface, HardwareInfo *hwInfo, decltype(&InitializeGmm) initFunc, decltype(&GmmDestroy) destroyFunc) : destroyFunc(destroyFunc) { +GmmClientContextBase::GmmClientContextBase(OSInterface *osInterface, HardwareInfo *hwInfo, decltype(&InitializeGmm) initFunc, decltype(&GmmAdapterDestroy) destroyFunc) : destroyFunc(destroyFunc) { _SKU_FEATURE_TABLE gmmFtrTable = {}; _WA_TABLE gmmWaTable = {}; SkuInfoTransfer::transferFtrTableForGmm(&gmmFtrTable, &hwInfo->featureTable); diff --git a/core/gmm_helper/client_context/gmm_client_context_base.h b/core/gmm_helper/client_context/gmm_client_context_base.h index b2b736c56fef..b2634dc10982 100644 --- a/core/gmm_helper/client_context/gmm_client_context_base.h +++ b/core/gmm_helper/client_context/gmm_client_context_base.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2018-2019 Intel Corporation + * Copyright (C) 2018-2020 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -25,7 +25,7 @@ class GmmClientContextBase { MOCKABLE_VIRTUAL void destroyResInfoObject(GMM_RESOURCE_INFO *pResInfo); GMM_CLIENT_CONTEXT *getHandle() const; template - static std::unique_ptr create(OSInterface *osInterface, HardwareInfo *hwInfo, decltype(&InitializeGmm) initFunc, decltype(&GmmDestroy) destroyFunc) { + static std::unique_ptr create(OSInterface *osInterface, HardwareInfo *hwInfo, decltype(&InitializeGmm) initFunc, decltype(&GmmAdapterDestroy) destroyFunc) { return std::make_unique(osInterface, hwInfo, initFunc, destroyFunc); } @@ -34,7 +34,7 @@ class GmmClientContextBase { protected: GMM_CLIENT_CONTEXT *clientContext; - GmmClientContextBase(OSInterface *osInterface, HardwareInfo *hwInfo, decltype(&InitializeGmm) initFunc, decltype(&GmmDestroy) destroyFunc); - decltype(&GmmDestroy) destroyFunc; + GmmClientContextBase(OSInterface *osInterface, HardwareInfo *hwInfo, decltype(&InitializeGmm) initFunc, decltype(&GmmAdapterDestroy) destroyFunc); + decltype(&GmmAdapterDestroy) destroyFunc; }; } // namespace NEO diff --git a/core/gmm_helper/gmm_helper.h b/core/gmm_helper/gmm_helper.h index c873132bfa71..3a6ddc5d142d 100644 --- a/core/gmm_helper/gmm_helper.h +++ b/core/gmm_helper/gmm_helper.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2017-2019 Intel Corporation + * Copyright (C) 2017-2020 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -39,7 +39,7 @@ class GmmHelper { GmmClientContext *getClientContext() const; - static std::unique_ptr (*createGmmContextWrapperFunc)(OSInterface *, HardwareInfo *, decltype(&InitializeGmm), decltype(&GmmDestroy)); + static std::unique_ptr (*createGmmContextWrapperFunc)(OSInterface *, HardwareInfo *, decltype(&InitializeGmm), decltype(&GmmAdapterDestroy)); protected: void loadLib(); @@ -49,6 +49,6 @@ class GmmHelper { std::unique_ptr gmmLib; std::unique_ptr gmmClientContext; decltype(&InitializeGmm) initGmmFunc; - decltype(&GmmDestroy) destroyGmmFunc; + decltype(&GmmAdapterDestroy) destroyGmmFunc; }; } // namespace NEO diff --git a/manifests/manifest.yml b/manifests/manifest.yml index b0db250aeeb9..fa61501415f7 100644 --- a/manifests/manifest.yml +++ b/manifests/manifest.yml @@ -4,7 +4,7 @@ components: dest_dir: gmmlib type: git branch: gmmlib - revision: intel-gmmlib-19.3.4 + revision: intel-gmmlib-19.4.1 repository: https://github.com/intel/gmmlib.git igc: clean_on_sync: true diff --git a/runtime/dll/linux/options_linux.cpp b/runtime/dll/linux/options_linux.cpp index 9675eb736259..e03b5daa1ec4 100644 --- a/runtime/dll/linux/options_linux.cpp +++ b/runtime/dll/linux/options_linux.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2017-2019 Intel Corporation + * Copyright (C) 2017-2020 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -16,8 +16,8 @@ const char *frontEndDllName = FCL_LIBRARY_NAME; const char *igcDllName = IGC_LIBRARY_NAME; const char *libvaDllName = "libva.so.2"; const char *gmmDllName = GMM_UMD_DLL; -const char *gmmInitFuncName = GMM_INIT_NAME; -const char *gmmDestroyFuncName = GMM_DESTROY_NAME; +const char *gmmInitFuncName = GMM_ADAPTER_INIT_NAME; +const char *gmmDestroyFuncName = GMM_ADAPTER_DESTROY_NAME; const char *sysFsPciPath = "/sys/bus/pci/devices/"; const char *tbxLibName = "libtbxAccess.so"; diff --git a/runtime/dll/windows/options_windows.cpp b/runtime/dll/windows/options_windows.cpp index 5f3ace92fc82..6cba1a71a2b1 100644 --- a/runtime/dll/windows/options_windows.cpp +++ b/runtime/dll/windows/options_windows.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2017-2019 Intel Corporation + * Copyright (C) 2017-2020 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -14,8 +14,8 @@ const char *frontEndDllName = FCL_LIBRARY_NAME; const char *igcDllName = IGC_LIBRARY_NAME; const char *gdiDllName = "gdi32.dll"; const char *gmmDllName = GMM_UMD_DLL; -const char *gmmInitFuncName = GMM_INIT_NAME; -const char *gmmDestroyFuncName = GMM_DESTROY_NAME; +const char *gmmInitFuncName = GMM_ADAPTER_INIT_NAME; +const char *gmmDestroyFuncName = GMM_ADAPTER_DESTROY_NAME; // Os specific Metrics Library name #if _WIN64 diff --git a/runtime/gmm_helper/gmm_interface.cpp b/runtime/gmm_helper/gmm_interface.cpp index 1902d77cdc60..bb501bcd9471 100644 --- a/runtime/gmm_helper/gmm_interface.cpp +++ b/runtime/gmm_helper/gmm_interface.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2018-2019 Intel Corporation + * Copyright (C) 2018-2020 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -21,7 +21,7 @@ void GmmHelper::loadLib() { gmmLib.reset(OsLibrary::load(Os::gmmDllName)); UNRECOVERABLE_IF(!gmmLib); initGmmFunc = reinterpret_cast(gmmLib->getProcAddress(Os::gmmInitFuncName)); - destroyGmmFunc = reinterpret_cast(gmmLib->getProcAddress(Os::gmmDestroyFuncName)); + destroyGmmFunc = reinterpret_cast(gmmLib->getProcAddress(Os::gmmDestroyFuncName)); UNRECOVERABLE_IF(!initGmmFunc || !destroyGmmFunc); } } // namespace NEO diff --git a/unit_tests/main.cpp b/unit_tests/main.cpp index d036178c6838..d9043212d6e0 100644 --- a/unit_tests/main.cpp +++ b/unit_tests/main.cpp @@ -461,8 +461,8 @@ int main(int argc, char **argv) { #endif if (!useMockGmm) { Os::gmmDllName = GMM_UMD_DLL; - Os::gmmInitFuncName = GMM_INIT_NAME; - Os::gmmDestroyFuncName = GMM_DESTROY_NAME; + Os::gmmInitFuncName = GMM_ADAPTER_INIT_NAME; + Os::gmmDestroyFuncName = GMM_ADAPTER_DESTROY_NAME; } else { GmmHelper::createGmmContextWrapperFunc = GmmClientContextBase::create; } diff --git a/unit_tests/mocks/mock_gmm_client_context.cpp b/unit_tests/mocks/mock_gmm_client_context.cpp index 2b7d6a7c8c0e..7b9923c74179 100644 --- a/unit_tests/mocks/mock_gmm_client_context.cpp +++ b/unit_tests/mocks/mock_gmm_client_context.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2018-2019 Intel Corporation + * Copyright (C) 2018-2020 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -8,6 +8,6 @@ #include "mock_gmm_client_context.h" namespace NEO { -MockGmmClientContext::MockGmmClientContext(OSInterface *osInterface, HardwareInfo *hwInfo, decltype(&InitializeGmm) initFunc, decltype(&GmmDestroy) destroyFunc) : MockGmmClientContextBase(osInterface, hwInfo, initFunc, destroyFunc) { +MockGmmClientContext::MockGmmClientContext(OSInterface *osInterface, HardwareInfo *hwInfo, decltype(&InitializeGmm) initFunc, decltype(&GmmAdapterDestroy) destroyFunc) : MockGmmClientContextBase(osInterface, hwInfo, initFunc, destroyFunc) { } } // namespace NEO diff --git a/unit_tests/mocks/mock_gmm_client_context.h b/unit_tests/mocks/mock_gmm_client_context.h index 3b587fe8c74d..6c8a739483cc 100644 --- a/unit_tests/mocks/mock_gmm_client_context.h +++ b/unit_tests/mocks/mock_gmm_client_context.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2018-2019 Intel Corporation + * Copyright (C) 2018-2020 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -11,6 +11,6 @@ namespace NEO { class MockGmmClientContext : public MockGmmClientContextBase { public: - MockGmmClientContext(OSInterface *osInterface, HardwareInfo *hwInfo, decltype(&InitializeGmm) initFunc, decltype(&GmmDestroy) destroyFunc); + MockGmmClientContext(OSInterface *osInterface, HardwareInfo *hwInfo, decltype(&InitializeGmm) initFunc, decltype(&GmmAdapterDestroy) destroyFunc); }; } // namespace NEO