From aa727b3bcc2e17d4cf44089b157d0faf8dd40004 Mon Sep 17 00:00:00 2001 From: Maciej Dziuban Date: Thu, 15 Mar 2018 15:03:51 +0100 Subject: [PATCH] CapabilityTable adjustments part 1 - Extract hw_info_config.h from Linux directory - Extract enabling HwInfoConfig from Linux directory - Create dummy implementations for HwInfoConfig on Windows Change-Id: Ic9c7525ba9d9b654f238fb661cdbb3eecc421e29 --- manifests/manifest.yml | 2 +- runtime/enable_gens.cmake | 9 ++--- runtime/gen8/enable_bdw.cpp | 6 ++-- .../enable_hw_info_config_bdw.cpp} | 4 +-- runtime/gen8/linux/hw_info_config_bdw.cpp | 4 +-- runtime/gen8/windows/hw_info_config_bdw.cpp | 33 +++++++++++++++++ runtime/gen9/enable_bxt.cpp | 6 ++-- runtime/gen9/enable_cfl.cpp | 4 +-- runtime/gen9/enable_glk.cpp | 6 ++-- ..._skl.cpp => enable_hw_info_config_bxt.cpp} | 6 ++-- ..._bxt.cpp => enable_hw_info_config_cfl.cpp} | 6 ++-- ..._kbl.cpp => enable_hw_info_config_glk.cpp} | 6 ++-- runtime/gen9/enable_hw_info_config_kbl.cpp | 28 +++++++++++++++ runtime/gen9/enable_hw_info_config_skl.cpp | 28 +++++++++++++++ runtime/gen9/enable_kbl.cpp | 6 ++-- runtime/gen9/enable_skl.cpp | 6 ++-- runtime/gen9/linux/hw_info_config_bxt.cpp | 2 +- runtime/gen9/linux/hw_info_config_cfl.cpp | 2 +- runtime/gen9/linux/hw_info_config_glk.cpp | 2 +- runtime/gen9/linux/hw_info_config_kbl.cpp | 2 +- runtime/gen9/linux/hw_info_config_skl.cpp | 4 +-- .../windows/hw_info_config_bxt.cpp} | 13 ++++--- runtime/gen9/windows/hw_info_config_cfl.cpp | 33 +++++++++++++++++ runtime/gen9/windows/hw_info_config_glk.cpp | 32 +++++++++++++++++ .../hw_info_config_kbl.cpp} | 13 ++++--- runtime/gen9/windows/hw_info_config_skl.cpp | 33 +++++++++++++++++ runtime/helpers/enable_product.inl | 4 ++- runtime/os_interface/CMakeLists.txt | 1 + .../os_interface/{linux => }/hw_info_config.h | 4 +-- runtime/os_interface/linux/CMakeLists.txt | 1 - runtime/os_interface/linux/device_factory.cpp | 4 +-- runtime/os_interface/linux/hw_info_config.cpp | 3 +- runtime/os_interface/windows/CMakeLists.txt | 1 + .../os_interface/windows/hw_info_config.cpp | 35 +++++++++++++++++++ unit_tests/libult/CMakeLists.txt | 4 +-- .../os_interface/linux/hw_info_config_tests.h | 2 +- 36 files changed, 295 insertions(+), 60 deletions(-) rename runtime/{gen9/linux/enable_cfl.cpp => gen8/enable_hw_info_config_bdw.cpp} (90%) create mode 100644 runtime/gen8/windows/hw_info_config_bdw.cpp rename runtime/gen9/{linux/enable_skl.cpp => enable_hw_info_config_bxt.cpp} (87%) rename runtime/gen9/{linux/enable_bxt.cpp => enable_hw_info_config_cfl.cpp} (87%) rename runtime/gen9/{linux/enable_kbl.cpp => enable_hw_info_config_glk.cpp} (87%) create mode 100644 runtime/gen9/enable_hw_info_config_kbl.cpp create mode 100644 runtime/gen9/enable_hw_info_config_skl.cpp rename runtime/{gen8/linux/enable_bdw.cpp => gen9/windows/hw_info_config_bxt.cpp} (81%) create mode 100644 runtime/gen9/windows/hw_info_config_cfl.cpp create mode 100644 runtime/gen9/windows/hw_info_config_glk.cpp rename runtime/gen9/{linux/enable_glk.cpp => windows/hw_info_config_kbl.cpp} (81%) create mode 100644 runtime/gen9/windows/hw_info_config_skl.cpp rename runtime/os_interface/{linux => }/hw_info_config.h (97%) create mode 100644 runtime/os_interface/windows/hw_info_config.cpp diff --git a/manifests/manifest.yml b/manifests/manifest.yml index 91be801148..534c551b88 100644 --- a/manifests/manifest.yml +++ b/manifests/manifest.yml @@ -36,7 +36,7 @@ components: internal: branch: master dest_dir: internal - revision: 37edd9d80b9fa8bbe576e8a54b670ff8302bf588 + revision: 41c6cfb452569d1037b1449847230a7da788ad8d type: git khronos: branch: master diff --git a/runtime/enable_gens.cmake b/runtime/enable_gens.cmake index 2b1df9d794..b1bd2c4666 100644 --- a/runtime/enable_gens.cmake +++ b/runtime/enable_gens.cmake @@ -80,13 +80,14 @@ foreach(GEN_TYPE ${ALL_GEN_TYPES}) list(APPEND RUNTIME_SRCS_${GEN_TYPE}_BASE ${GENX_PREFIX}/${PLATFORM_FILE}) endif() endforeach() - if(EXISTS ${GENX_PREFIX}/linux/hw_info_config_${PLATFORM_IT_LOWER}.cpp) - list(APPEND RUNTIME_SRCS_${GEN_TYPE}_LINUX ${GENX_PREFIX}/linux/hw_info_config_${PLATFORM_IT_LOWER}.cpp) - endif() + + # HwInfoConfig implementation + list(APPEND RUNTIME_SRCS_${GEN_TYPE}_LINUX ${GENX_PREFIX}/linux/hw_info_config_${PLATFORM_IT_LOWER}.cpp) + list(APPEND RUNTIME_SRCS_${GEN_TYPE}_WINDOWS ${GENX_PREFIX}/windows/hw_info_config_${PLATFORM_IT_LOWER}.cpp) # Enable platform list(APPEND ${GEN_TYPE}_SRC_LINK_BASE ${GENX_PREFIX}/enable_${PLATFORM_IT_LOWER}.cpp) - list(APPEND ${GEN_TYPE}_SRC_LINK_LINUX ${GENX_PREFIX}/linux/enable_${PLATFORM_IT_LOWER}.cpp) + list(APPEND ${GEN_TYPE}_SRC_LINK_BASE ${GENX_PREFIX}/enable_hw_info_config_${PLATFORM_IT_LOWER}.cpp) endforeach() list(APPEND ${GEN_TYPE}_SRC_LINK_BASE ${GENX_PREFIX}/enable_family_full.cpp) diff --git a/runtime/gen8/enable_bdw.cpp b/runtime/gen8/enable_bdw.cpp index 382002fe3f..022a1aa93f 100644 --- a/runtime/gen8/enable_bdw.cpp +++ b/runtime/gen8/enable_bdw.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017, Intel Corporation + * Copyright (c) 2017 - 2018, Intel Corporation * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -21,9 +21,9 @@ */ #include "hw_cmds.h" - -namespace OCLRT { +#include "runtime/os_interface/hw_info_config.h" #include "runtime/helpers/enable_product.inl" +namespace OCLRT { static EnableGfxProductHw enableGfxProductHw; } // namespace OCLRT diff --git a/runtime/gen9/linux/enable_cfl.cpp b/runtime/gen8/enable_hw_info_config_bdw.cpp similarity index 90% rename from runtime/gen9/linux/enable_cfl.cpp rename to runtime/gen8/enable_hw_info_config_bdw.cpp index 599e8294e1..cfb915bfdb 100644 --- a/runtime/gen9/linux/enable_cfl.cpp +++ b/runtime/gen8/enable_hw_info_config_bdw.cpp @@ -21,8 +21,8 @@ */ #include "hw_cmds.h" -#include "runtime/os_interface/linux/hw_info_config.h" +#include "runtime/os_interface/hw_info_config.h" namespace OCLRT { -static LinuxEnableGfxProductHw enableLinuxGfxProductHw; +static EnableProductHwInfoConfig enable; } // namespace OCLRT diff --git a/runtime/gen8/linux/hw_info_config_bdw.cpp b/runtime/gen8/linux/hw_info_config_bdw.cpp index d49ed06c7f..7e4b1f522a 100644 --- a/runtime/gen8/linux/hw_info_config_bdw.cpp +++ b/runtime/gen8/linux/hw_info_config_bdw.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017, Intel Corporation + * Copyright (c) 2017 - 2018, Intel Corporation * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -21,7 +21,7 @@ */ #include "runtime/helpers/hw_info.h" -#include "runtime/os_interface/linux/hw_info_config.h" +#include "runtime/os_interface/hw_info_config.h" namespace OCLRT { diff --git a/runtime/gen8/windows/hw_info_config_bdw.cpp b/runtime/gen8/windows/hw_info_config_bdw.cpp new file mode 100644 index 0000000000..a24a8762be --- /dev/null +++ b/runtime/gen8/windows/hw_info_config_bdw.cpp @@ -0,0 +1,33 @@ +/* + * Copyright (c) 2018, Intel Corporation + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included + * in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR + * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, + * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR + * OTHER DEALINGS IN THE SOFTWARE. + */ + +#include "runtime/helpers/hw_info.h" +#include "runtime/os_interface/hw_info_config.h" + +namespace OCLRT { + +template <> +int HwInfoConfigHw::configureHardwareCustom(HardwareInfo *hwInfo, OSInterface *osIface) { + return 0; +} + +} // namespace OCLRT diff --git a/runtime/gen9/enable_bxt.cpp b/runtime/gen9/enable_bxt.cpp index 513eb73569..9ec63b7007 100644 --- a/runtime/gen9/enable_bxt.cpp +++ b/runtime/gen9/enable_bxt.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017, Intel Corporation + * Copyright (c) 2017 - 2018, Intel Corporation * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -21,9 +21,9 @@ */ #include "hw_cmds.h" - -namespace OCLRT { +#include "runtime/os_interface/hw_info_config.h" #include "runtime/helpers/enable_product.inl" +namespace OCLRT { static EnableGfxProductHw enableGfxProductHw; } // namespace OCLRT diff --git a/runtime/gen9/enable_cfl.cpp b/runtime/gen9/enable_cfl.cpp index 4bbdc6cbb3..8da880e9c0 100644 --- a/runtime/gen9/enable_cfl.cpp +++ b/runtime/gen9/enable_cfl.cpp @@ -21,9 +21,9 @@ */ #include "hw_cmds.h" - -namespace OCLRT { +#include "runtime/os_interface/hw_info_config.h" #include "runtime/helpers/enable_product.inl" +namespace OCLRT { static EnableGfxProductHw enableGfxProductHw; } // namespace OCLRT diff --git a/runtime/gen9/enable_glk.cpp b/runtime/gen9/enable_glk.cpp index 288caa1758..3b4270d0de 100644 --- a/runtime/gen9/enable_glk.cpp +++ b/runtime/gen9/enable_glk.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017, Intel Corporation + * Copyright (c) 2017 - 2018, Intel Corporation * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -21,9 +21,9 @@ */ #include "hw_cmds.h" - -namespace OCLRT { +#include "runtime/os_interface/hw_info_config.h" #include "runtime/helpers/enable_product.inl" +namespace OCLRT { static EnableGfxProductHw enableGfxProductHw; } // namespace OCLRT diff --git a/runtime/gen9/linux/enable_skl.cpp b/runtime/gen9/enable_hw_info_config_bxt.cpp similarity index 87% rename from runtime/gen9/linux/enable_skl.cpp rename to runtime/gen9/enable_hw_info_config_bxt.cpp index 8682557377..08f833852a 100644 --- a/runtime/gen9/linux/enable_skl.cpp +++ b/runtime/gen9/enable_hw_info_config_bxt.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017, Intel Corporation + * Copyright (c) 2018, Intel Corporation * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -21,8 +21,8 @@ */ #include "hw_cmds.h" -#include "runtime/os_interface/linux/hw_info_config.h" +#include "runtime/os_interface/hw_info_config.h" namespace OCLRT { -static LinuxEnableGfxProductHw enableLinuxGfxProductHw; +static EnableProductHwInfoConfig enable; } // namespace OCLRT diff --git a/runtime/gen9/linux/enable_bxt.cpp b/runtime/gen9/enable_hw_info_config_cfl.cpp similarity index 87% rename from runtime/gen9/linux/enable_bxt.cpp rename to runtime/gen9/enable_hw_info_config_cfl.cpp index b0c92359ff..7a732a7992 100644 --- a/runtime/gen9/linux/enable_bxt.cpp +++ b/runtime/gen9/enable_hw_info_config_cfl.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017, Intel Corporation + * Copyright (c) 2018, Intel Corporation * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -21,8 +21,8 @@ */ #include "hw_cmds.h" -#include "runtime/os_interface/linux/hw_info_config.h" +#include "runtime/os_interface/hw_info_config.h" namespace OCLRT { -static LinuxEnableGfxProductHw enableLinuxGfxProductHw; +static EnableProductHwInfoConfig enable; } // namespace OCLRT diff --git a/runtime/gen9/linux/enable_kbl.cpp b/runtime/gen9/enable_hw_info_config_glk.cpp similarity index 87% rename from runtime/gen9/linux/enable_kbl.cpp rename to runtime/gen9/enable_hw_info_config_glk.cpp index db9ba2eae9..f1f8fc8aac 100644 --- a/runtime/gen9/linux/enable_kbl.cpp +++ b/runtime/gen9/enable_hw_info_config_glk.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017, Intel Corporation + * Copyright (c) 2018, Intel Corporation * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -21,8 +21,8 @@ */ #include "hw_cmds.h" -#include "runtime/os_interface/linux/hw_info_config.h" +#include "runtime/os_interface/hw_info_config.h" namespace OCLRT { -static LinuxEnableGfxProductHw enableLinuxGfxProductHw; +static EnableProductHwInfoConfig enable; } // namespace OCLRT diff --git a/runtime/gen9/enable_hw_info_config_kbl.cpp b/runtime/gen9/enable_hw_info_config_kbl.cpp new file mode 100644 index 0000000000..59ca2fc979 --- /dev/null +++ b/runtime/gen9/enable_hw_info_config_kbl.cpp @@ -0,0 +1,28 @@ +/* + * Copyright (c) 2018, Intel Corporation + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included + * in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR + * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, + * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR + * OTHER DEALINGS IN THE SOFTWARE. + */ + +#include "hw_cmds.h" +#include "runtime/os_interface/hw_info_config.h" + +namespace OCLRT { +static EnableProductHwInfoConfig enable; +} // namespace OCLRT diff --git a/runtime/gen9/enable_hw_info_config_skl.cpp b/runtime/gen9/enable_hw_info_config_skl.cpp new file mode 100644 index 0000000000..e85abbb872 --- /dev/null +++ b/runtime/gen9/enable_hw_info_config_skl.cpp @@ -0,0 +1,28 @@ +/* + * Copyright (c) 2018, Intel Corporation + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included + * in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR + * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, + * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR + * OTHER DEALINGS IN THE SOFTWARE. + */ + +#include "hw_cmds.h" +#include "runtime/os_interface/hw_info_config.h" + +namespace OCLRT { +static EnableProductHwInfoConfig enable; +} // namespace OCLRT diff --git a/runtime/gen9/enable_kbl.cpp b/runtime/gen9/enable_kbl.cpp index 4f771a1cca..d6678e7caa 100644 --- a/runtime/gen9/enable_kbl.cpp +++ b/runtime/gen9/enable_kbl.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017, Intel Corporation + * Copyright (c) 2017 - 2018, Intel Corporation * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -21,9 +21,9 @@ */ #include "hw_cmds.h" - -namespace OCLRT { +#include "runtime/os_interface/hw_info_config.h" #include "runtime/helpers/enable_product.inl" +namespace OCLRT { static EnableGfxProductHw enableGfxProductHw; } // namespace OCLRT diff --git a/runtime/gen9/enable_skl.cpp b/runtime/gen9/enable_skl.cpp index 80ff381755..1727466ad1 100644 --- a/runtime/gen9/enable_skl.cpp +++ b/runtime/gen9/enable_skl.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017, Intel Corporation + * Copyright (c) 2017 - 2018, Intel Corporation * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -21,9 +21,9 @@ */ #include "hw_cmds.h" - -namespace OCLRT { +#include "runtime/os_interface/hw_info_config.h" #include "runtime/helpers/enable_product.inl" +namespace OCLRT { static EnableGfxProductHw enableGfxProductHw; } // namespace OCLRT diff --git a/runtime/gen9/linux/hw_info_config_bxt.cpp b/runtime/gen9/linux/hw_info_config_bxt.cpp index 246e58a660..4deefdbb98 100644 --- a/runtime/gen9/linux/hw_info_config_bxt.cpp +++ b/runtime/gen9/linux/hw_info_config_bxt.cpp @@ -21,7 +21,7 @@ */ #include "runtime/helpers/hw_info.h" -#include "runtime/os_interface/linux/hw_info_config.h" +#include "runtime/os_interface/hw_info_config.h" #include "runtime/os_interface/linux/drm_neo.h" #include "runtime/os_interface/linux/os_interface.h" diff --git a/runtime/gen9/linux/hw_info_config_cfl.cpp b/runtime/gen9/linux/hw_info_config_cfl.cpp index b81394c4dd..69f3055a65 100644 --- a/runtime/gen9/linux/hw_info_config_cfl.cpp +++ b/runtime/gen9/linux/hw_info_config_cfl.cpp @@ -21,7 +21,7 @@ */ #include "runtime/helpers/hw_info.h" -#include "runtime/os_interface/linux/hw_info_config.h" +#include "runtime/os_interface/hw_info_config.h" namespace OCLRT { diff --git a/runtime/gen9/linux/hw_info_config_glk.cpp b/runtime/gen9/linux/hw_info_config_glk.cpp index 8f418cc9f9..4ff8d48e5d 100644 --- a/runtime/gen9/linux/hw_info_config_glk.cpp +++ b/runtime/gen9/linux/hw_info_config_glk.cpp @@ -21,7 +21,7 @@ */ #include "runtime/helpers/hw_info.h" -#include "runtime/os_interface/linux/hw_info_config.h" +#include "runtime/os_interface/hw_info_config.h" #include "runtime/os_interface/linux/drm_neo.h" #include "runtime/os_interface/linux/os_interface.h" diff --git a/runtime/gen9/linux/hw_info_config_kbl.cpp b/runtime/gen9/linux/hw_info_config_kbl.cpp index 5c317c688c..82bd5fb28f 100644 --- a/runtime/gen9/linux/hw_info_config_kbl.cpp +++ b/runtime/gen9/linux/hw_info_config_kbl.cpp @@ -21,7 +21,7 @@ */ #include "runtime/helpers/hw_info.h" -#include "runtime/os_interface/linux/hw_info_config.h" +#include "runtime/os_interface/hw_info_config.h" namespace OCLRT { diff --git a/runtime/gen9/linux/hw_info_config_skl.cpp b/runtime/gen9/linux/hw_info_config_skl.cpp index 4dfa38ac28..1d64b7e47f 100644 --- a/runtime/gen9/linux/hw_info_config_skl.cpp +++ b/runtime/gen9/linux/hw_info_config_skl.cpp @@ -21,8 +21,8 @@ */ #include "runtime/helpers/hw_info.h" -#include "runtime/os_interface/linux/hw_info_config.h" -#include "runtime/gen9/hw_cmds_skl.h" +#include "runtime/os_interface/hw_info_config.h" +#include "runtime/gen_common/hw_cmds.h" namespace OCLRT { diff --git a/runtime/gen8/linux/enable_bdw.cpp b/runtime/gen9/windows/hw_info_config_bxt.cpp similarity index 81% rename from runtime/gen8/linux/enable_bdw.cpp rename to runtime/gen9/windows/hw_info_config_bxt.cpp index a192b844d9..8f6b0c4b34 100644 --- a/runtime/gen8/linux/enable_bdw.cpp +++ b/runtime/gen9/windows/hw_info_config_bxt.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017, Intel Corporation + * Copyright (c) 2018, Intel Corporation * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -20,9 +20,14 @@ * OTHER DEALINGS IN THE SOFTWARE. */ -#include "hw_cmds.h" -#include "runtime/os_interface/linux/hw_info_config.h" +#include "runtime/helpers/hw_info.h" +#include "runtime/os_interface/hw_info_config.h" namespace OCLRT { -static LinuxEnableGfxProductHw enableLinuxGfxProductHw; + +template <> +int HwInfoConfigHw::configureHardwareCustom(HardwareInfo *hwInfo, OSInterface *osIface) { + return 0; +} + } // namespace OCLRT diff --git a/runtime/gen9/windows/hw_info_config_cfl.cpp b/runtime/gen9/windows/hw_info_config_cfl.cpp new file mode 100644 index 0000000000..bb61192c65 --- /dev/null +++ b/runtime/gen9/windows/hw_info_config_cfl.cpp @@ -0,0 +1,33 @@ +/* + * Copyright (c) 2018, Intel Corporation + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included + * in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR + * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, + * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR + * OTHER DEALINGS IN THE SOFTWARE. + */ + +#include "runtime/helpers/hw_info.h" +#include "runtime/os_interface/hw_info_config.h" + +namespace OCLRT { + +template <> +int HwInfoConfigHw::configureHardwareCustom(HardwareInfo *hwInfo, OSInterface *osIface) { + return 0; +} + +} // namespace OCLRT diff --git a/runtime/gen9/windows/hw_info_config_glk.cpp b/runtime/gen9/windows/hw_info_config_glk.cpp new file mode 100644 index 0000000000..11776bfda3 --- /dev/null +++ b/runtime/gen9/windows/hw_info_config_glk.cpp @@ -0,0 +1,32 @@ +/* + * Copyright (c) 2018, Intel Corporation + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included + * in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR + * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, + * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR + * OTHER DEALINGS IN THE SOFTWARE. + */ + +#include "runtime/helpers/hw_info.h" +#include "runtime/os_interface/hw_info_config.h" + +namespace OCLRT { + +template <> +int HwInfoConfigHw::configureHardwareCustom(HardwareInfo *hwInfo, OSInterface *osIface) { + return 0; +} +} // namespace OCLRT diff --git a/runtime/gen9/linux/enable_glk.cpp b/runtime/gen9/windows/hw_info_config_kbl.cpp similarity index 81% rename from runtime/gen9/linux/enable_glk.cpp rename to runtime/gen9/windows/hw_info_config_kbl.cpp index c11f9580da..8d1a76c947 100644 --- a/runtime/gen9/linux/enable_glk.cpp +++ b/runtime/gen9/windows/hw_info_config_kbl.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017, Intel Corporation + * Copyright (c) 2018, Intel Corporation * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -20,9 +20,14 @@ * OTHER DEALINGS IN THE SOFTWARE. */ -#include "hw_cmds.h" -#include "runtime/os_interface/linux/hw_info_config.h" +#include "runtime/helpers/hw_info.h" +#include "runtime/os_interface/hw_info_config.h" namespace OCLRT { -static LinuxEnableGfxProductHw enableLinuxGfxProductHw; + +template <> +int HwInfoConfigHw::configureHardwareCustom(HardwareInfo *hwInfo, OSInterface *osIface) { + return 0; +} + } // namespace OCLRT diff --git a/runtime/gen9/windows/hw_info_config_skl.cpp b/runtime/gen9/windows/hw_info_config_skl.cpp new file mode 100644 index 0000000000..7da45f87cb --- /dev/null +++ b/runtime/gen9/windows/hw_info_config_skl.cpp @@ -0,0 +1,33 @@ +/* + * Copyright (c) 2017 - 2018, Intel Corporation + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included + * in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR + * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, + * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR + * OTHER DEALINGS IN THE SOFTWARE. + */ + +#include "runtime/helpers/hw_info.h" +#include "runtime/os_interface/hw_info_config.h" + +namespace OCLRT { + +template <> +int HwInfoConfigHw::configureHardwareCustom(HardwareInfo *hwInfo, OSInterface *osIface) { + return 0; +} + +} // namespace OCLRT diff --git a/runtime/helpers/enable_product.inl b/runtime/helpers/enable_product.inl index 480ffa54a6..a964d238cd 100644 --- a/runtime/helpers/enable_product.inl +++ b/runtime/helpers/enable_product.inl @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017, Intel Corporation + * Copyright (c) 2017 - 2018, Intel Corporation * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -22,6 +22,7 @@ #include "hw_info.h" +namespace OCLRT { template struct EnableGfxProductHw { typedef typename HwMapper::GfxProduct GfxProduct; @@ -35,3 +36,4 @@ struct EnableGfxProductHw { hardwareInfoSetupGt[gfxProduct] = GfxProduct::setupGtSystemInfo; } }; +} // namespace OCLRT diff --git a/runtime/os_interface/CMakeLists.txt b/runtime/os_interface/CMakeLists.txt index 8e8951d82c..8d39a02f20 100644 --- a/runtime/os_interface/CMakeLists.txt +++ b/runtime/os_interface/CMakeLists.txt @@ -33,6 +33,7 @@ set(RUNTIME_SRCS_OS_INTERFACE_BASE ${CMAKE_CURRENT_SOURCE_DIR}/performance_counters.cpp ${CMAKE_CURRENT_SOURCE_DIR}/performance_counters.h ${CMAKE_CURRENT_SOURCE_DIR}/print.h + ${CMAKE_CURRENT_SOURCE_DIR}/hw_info_config.h ) target_sources(${NEO_STATIC_LIB_NAME} PRIVATE ${RUNTIME_SRCS_OS_INTERFACE_BASE}) diff --git a/runtime/os_interface/linux/hw_info_config.h b/runtime/os_interface/hw_info_config.h similarity index 97% rename from runtime/os_interface/linux/hw_info_config.h rename to runtime/os_interface/hw_info_config.h index ae524b4798..bf8ccc2157 100644 --- a/runtime/os_interface/linux/hw_info_config.h +++ b/runtime/os_interface/hw_info_config.h @@ -59,10 +59,10 @@ class HwInfoConfigHw : public HwInfoConfig { }; template -struct LinuxEnableGfxProductHw { +struct EnableProductHwInfoConfig { typedef typename HwMapper::GfxProduct GfxProduct; - LinuxEnableGfxProductHw() { + EnableProductHwInfoConfig() { HwInfoConfig *pHwInfoConfig = HwInfoConfigHw::get(); hwInfoConfigFactory[gfxProduct] = pHwInfoConfig; pHwInfoConfig->threadsPerEu = GfxProduct::threadsPerEu; diff --git a/runtime/os_interface/linux/CMakeLists.txt b/runtime/os_interface/linux/CMakeLists.txt index e50c20081e..549553e18b 100644 --- a/runtime/os_interface/linux/CMakeLists.txt +++ b/runtime/os_interface/linux/CMakeLists.txt @@ -43,7 +43,6 @@ set(RUNTIME_SRCS_OS_INTERFACE_LINUX ${CMAKE_CURRENT_SOURCE_DIR}/drm_neo_create.cpp ${CMAKE_CURRENT_SOURCE_DIR}/drm_null_device.h ${CMAKE_CURRENT_SOURCE_DIR}/hw_info_config.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/hw_info_config.h ${CMAKE_CURRENT_SOURCE_DIR}/linux_inc.cpp ${CMAKE_CURRENT_SOURCE_DIR}/options.cpp ${CMAKE_CURRENT_SOURCE_DIR}/os_inc.h diff --git a/runtime/os_interface/linux/device_factory.cpp b/runtime/os_interface/linux/device_factory.cpp index 96fbb58954..3c674543ea 100644 --- a/runtime/os_interface/linux/device_factory.cpp +++ b/runtime/os_interface/linux/device_factory.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017, Intel Corporation + * Copyright (c) 2017 - 2018, Intel Corporation * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -24,7 +24,7 @@ #include "runtime/helpers/options.h" #include "runtime/os_interface/device_factory.h" #include "runtime/os_interface/linux/drm_neo.h" -#include "runtime/os_interface/linux/hw_info_config.h" +#include "runtime/os_interface/hw_info_config.h" #include "runtime/os_interface/linux/os_interface.h" #include "drm/i915_drm.h" #include "runtime/gmm_helper/gmm_helper.h" diff --git a/runtime/os_interface/linux/hw_info_config.cpp b/runtime/os_interface/linux/hw_info_config.cpp index 07a4e83cd2..712df98a3c 100644 --- a/runtime/os_interface/linux/hw_info_config.cpp +++ b/runtime/os_interface/linux/hw_info_config.cpp @@ -24,11 +24,12 @@ #include "runtime/helpers/hw_info.h" #include "runtime/helpers/hw_helper.h" #include "runtime/os_interface/linux/drm_neo.h" -#include "runtime/os_interface/linux/hw_info_config.h" +#include "runtime/os_interface/hw_info_config.h" #include "runtime/os_interface/linux/os_interface.h" #include "runtime/os_interface/debug_settings_manager.h" #include "runtime/utilities/cpu_info.h" #include "runtime/memory_manager/memory_constants.h" +#include "runtime/gen_common/hw_cmds.h" #include diff --git a/runtime/os_interface/windows/CMakeLists.txt b/runtime/os_interface/windows/CMakeLists.txt index 2eb73f77a8..2c4a32b6bc 100644 --- a/runtime/os_interface/windows/CMakeLists.txt +++ b/runtime/os_interface/windows/CMakeLists.txt @@ -69,6 +69,7 @@ set(RUNTIME_SRCS_OS_INTERFACE_WINDOWS ${CMAKE_CURRENT_SOURCE_DIR}/windows_defs.h ${CMAKE_CURRENT_SOURCE_DIR}/windows_inc.cpp ${CMAKE_CURRENT_SOURCE_DIR}/windows_wrapper.h + ${CMAKE_CURRENT_SOURCE_DIR}/hw_info_config.cpp ) if(WIN32) diff --git a/runtime/os_interface/windows/hw_info_config.cpp b/runtime/os_interface/windows/hw_info_config.cpp new file mode 100644 index 0000000000..eac1c9da16 --- /dev/null +++ b/runtime/os_interface/windows/hw_info_config.cpp @@ -0,0 +1,35 @@ +/* + * Copyright (c) 2017 - 2018, Intel Corporation + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included + * in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR + * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, + * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR + * OTHER DEALINGS IN THE SOFTWARE. + */ + +#include "runtime/helpers/hw_info.h" +#include "runtime/os_interface/hw_info_config.h" +#include "runtime/gen_common/hw_cmds.h" + +namespace OCLRT { + +HwInfoConfig *hwInfoConfigFactory[IGFX_MAX_PRODUCT] = {}; + +int HwInfoConfig::configureHwInfo(const HardwareInfo *inHwInfo, HardwareInfo *outHwInfo, OSInterface *osIface) { + return 0; +} + +} // namespace OCLRT diff --git a/unit_tests/libult/CMakeLists.txt b/unit_tests/libult/CMakeLists.txt index cbcec59e89..dedcb09eb0 100644 --- a/unit_tests/libult/CMakeLists.txt +++ b/unit_tests/libult/CMakeLists.txt @@ -33,9 +33,7 @@ foreach(GEN_TYPE ${ALL_GEN_TYPES}) string(TOLOWER ${PLATFORM_IT} PLATFORM_IT_LOWER) list (APPEND IGDRCL_SRCS_ENABLE_TESTED_HW ${IGDRCL_SOURCE_DIR}/runtime/${GEN_TYPE_LOWER}/enable_${PLATFORM_IT_LOWER}.cpp - ) - list(APPEND IGDRCL_SRCS_ENABLE_TESTED_HW_LINUX - ${IGDRCL_SOURCE_DIR}/runtime/${GEN_TYPE_LOWER}/linux/enable_${PLATFORM_IT_LOWER}.cpp + ${IGDRCL_SOURCE_DIR}/runtime/${GEN_TYPE_LOWER}/enable_hw_info_config_${PLATFORM_IT_LOWER}.cpp ) endforeach() endif() diff --git a/unit_tests/os_interface/linux/hw_info_config_tests.h b/unit_tests/os_interface/linux/hw_info_config_tests.h index b5988e1120..f00504ac71 100644 --- a/unit_tests/os_interface/linux/hw_info_config_tests.h +++ b/unit_tests/os_interface/linux/hw_info_config_tests.h @@ -23,7 +23,7 @@ #pragma once #include "runtime/os_interface/os_interface.h" -#include "runtime/os_interface/linux/hw_info_config.h" +#include "runtime/os_interface/hw_info_config.h" #include "runtime/utilities/cpu_info.h" #include "unit_tests/os_interface/hw_info_config_tests.h"