xref: /aosp_15_r20/external/intel-media-driver/media_softlet/linux/common/os/hwinfo_linux.h (revision ba62d9d3abf0e404f2022b4cd7a85e107f48596f)
1 /*
2 * Copyright (c) 2009-2017, Intel Corporation
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice shall be included
12 * in all copies or substantial portions of the Software.
13 *
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
15 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
18 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
19 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
20 * OTHER DEALINGS IN THE SOFTWARE.
21 */
22 //!
23 //! \file        hwinfo_linux.h
24 //! \brief
25 //!
26 #ifndef __HWINFO_LINUX_H__
27 #define __HWINFO_LINUX_H__
28 
29 #include "mos_defs.h"
30 #include "mos_bufmgr_api.h"
31 #include "linux_shadow_skuwa.h"
32 #include "igfxfmid.h"
33 //------------------------------------------------------------------------------
34 //| Definitions specific to Linux
35 //------------------------------------------------------------------------------
36 #define IS_BROXTON(device_id)    ( device_id == IBXT_A_DEVICE_F0_ID    || \
37         device_id == IBXT_C_DEVICE_F0_ID    || \
38         device_id == IBXT_X_DEVICE_F0_ID    || \
39         device_id == IBXT_GT_3x6_DEVICE_ID  || \
40         device_id == IBXT_PRO_3x6_DEVICE_ID || \
41         device_id == IBXT_P_3x6_DEVICE_ID   || \
42         device_id == IBXT_P_12EU_3x6_DEVICE_ID )
43 
44 #define IS_GEMINILAKE(device_id) ( device_id == IGLK_GT2_ULT_18EU_DEVICE_F0_ID || \
45         device_id == IGLK_GT2_ULT_12EU_DEVICE_F0_ID)
46 
47 #define IS_ATOMSOC(device_id)       ( IS_BROXTON(device_id) || IS_GEMINILAKE(device_id))
48 
49 extern MOS_STATUS HWInfo_GetGfxProductFamily(int32_t fd, PRODUCT_FAMILY &eProductFamily);
50 
51 extern MOS_STATUS HWInfo_GetGfxInfo(int32_t    fd,
52                           MOS_BUFMGR           *pDrmBufMgr,
53                           PLATFORM             *gfxPlatform,
54                           MEDIA_FEATURE_TABLE  *skuTable,
55                           MEDIA_WA_TABLE       *waTable,
56                           MEDIA_SYSTEM_INFO    *gtSystemInfo,
57                           MediaUserSettingSharedPtr userSettingPtr);
58 
59 extern MOS_STATUS HWInfo_GetGmmInfo(MOS_BUFMGR        *pDrmBufMgr,
60                           SHADOW_MEDIA_FEATURE_TABLE  *shadowSkuTable,
61                           SHADOW_MEDIA_WA_TABLE       *shadowWaTable,
62                           MEDIA_SYSTEM_INFO           *systemInfo);
63 
64 #endif
65 
66