[Media Interface] enable hw info
Enable hw info interface for caps
diff --git a/media_driver/agnostic/common/media_interfaces/media_interfaces_hwinfo.h b/media_driver/agnostic/common/media_interfaces/media_interfaces_hwinfo.h
new file mode 100644
index 0000000..eaf87b1
--- /dev/null
+++ b/media_driver/agnostic/common/media_interfaces/media_interfaces_hwinfo.h
@@ -0,0 +1,68 @@
+/*
+* Copyright (c) 2021, 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.
+*/
+//!
+//! \file media_interfaces_hwinfo.h
+//! \brief
+//!
+
+#ifndef __MEDIA_INTERFACES_HWINFO_H__
+#define __MEDIA_INTERFACES_HWINFO_H__
+
+struct HwDeviceInfo
+{
+ uint32_t ipVersion; // ipVersion -Intellectual Property
+ uint32_t usRevId; // usRevId -User Reversion ID
+};
+
+//!
+//! \class HwInfo
+//! \brief Save hw information
+//!
+
+class MediaInterfacesHwInfo
+{
+public:
+ MediaInterfacesHwInfo() {};
+ virtual ~MediaInterfacesHwInfo() {}
+
+ HwDeviceInfo& GetDeviceInfo()
+ {
+ return m_deviceInfo;
+ };
+
+ void SetDeviceInfo(uint32_t ipVersion, uint32_t usRevId)
+ {
+ m_deviceInfo.ipVersion = ipVersion;
+ m_deviceInfo.usRevId = usRevId;
+ };
+
+ void SetDeviceInfo(HwDeviceInfo deviceInfo)
+ {
+ m_deviceInfo.ipVersion = deviceInfo.ipVersion;
+ m_deviceInfo.usRevId = deviceInfo.usRevId;
+ };
+
+protected:
+ HwDeviceInfo m_deviceInfo = {};
+};
+
+#endif // __MEDIA_INTERFACES_HWINFO_H__
\ No newline at end of file
diff --git a/media_driver/agnostic/common/media_interfaces/media_interfaces_hwinfo_device.h b/media_driver/agnostic/common/media_interfaces/media_interfaces_hwinfo_device.h
new file mode 100644
index 0000000..550b66c
--- /dev/null
+++ b/media_driver/agnostic/common/media_interfaces/media_interfaces_hwinfo_device.h
@@ -0,0 +1,72 @@
+/*
+* Copyright (c) 2021, 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.
+*/
+//!
+//! \file media_interfaces_hwinfo_device.h
+//! \brief Gen-specific factory creation of the hwinfo device interfaces
+//!
+
+#ifndef __MEDIA_INTERFACES_HWINFO_DEVICE_H__
+#define __MEDIA_INTERFACES_HWINFO_DEVICE_H__
+
+#include "media_interfaces.h"
+#include "media_interfaces_hwinfo.h"
+
+#define IP_VERSION_UNKNOW 0
+
+class MediaInterfacesHwInfo;
+
+//!
+//! \class HwInfo
+//! \brief Save hw information
+//!
+
+class MediaInterfacesHwInfoDevice
+{
+public:
+ virtual ~MediaInterfacesHwInfoDevice() { }
+
+ MediaInterfacesHwInfo m_hwInfo;
+ //!
+ //! \brief Create hw info
+ //! \param [in] productFamily
+ //! Product family.
+ //!
+ //! \return Pointer to Gen specific hw info if
+ //! successful, otherwise return nullptr
+ //!
+ static MediaInterfacesHwInfo* CreateFactory(PLATFORM platform);
+
+ //!
+ //! \brief Initializes platform specific hw type
+ //! \return MOS_STATUS_SUCCESS if succeeded, else error code.
+ //!
+ virtual MOS_STATUS Initialize(PLATFORM platform)
+ {
+ m_hwInfo.SetDeviceInfo(IP_VERSION_UNKNOW, 0);
+ return MOS_STATUS_SUCCESS;
+ };
+
+};
+
+extern template class MediaInterfacesFactory<MediaInterfacesHwInfoDevice>;
+
+#endif // __MEDIA_INTERFACES_HWINFO_DEVICE_H__
diff --git a/media_driver/agnostic/common/media_interfaces/media_srcs.cmake b/media_driver/agnostic/common/media_interfaces/media_srcs.cmake
index 69f0447..04a690a 100644
--- a/media_driver/agnostic/common/media_interfaces/media_srcs.cmake
+++ b/media_driver/agnostic/common/media_interfaces/media_srcs.cmake
@@ -32,6 +32,8 @@
${CMAKE_CURRENT_LIST_DIR}/media_interfaces_decode_histogram.h
${CMAKE_CURRENT_LIST_DIR}/skuwa_factory.h
${CMAKE_CURRENT_LIST_DIR}/media_interfaces_mcpy.h
+ ${CMAKE_CURRENT_LIST_DIR}/media_interfaces_hwinfo_device.h
+ ${CMAKE_CURRENT_LIST_DIR}/media_interfaces_hwinfo.h
)
if(${MMC_Supported} STREQUAL "yes")