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 "media_libva_common.h"
30 #include "linux_shadow_skuwa.h"
31 
32 //------------------------------------------------------------------------------
33 //| Definitions specific to Linux
34 //------------------------------------------------------------------------------
35 #define IS_BROXTON(device_id)    ( device_id == IBXT_A_DEVICE_F0_ID    || \
36         device_id == IBXT_C_DEVICE_F0_ID    || \
37         device_id == IBXT_X_DEVICE_F0_ID    || \
38         device_id == IBXT_GT_3x6_DEVICE_ID  || \
39         device_id == IBXT_PRO_3x6_DEVICE_ID || \
40         device_id == IBXT_P_3x6_DEVICE_ID   || \
41         device_id == IBXT_P_12EU_3x6_DEVICE_ID )
42 #define IS_ATOMSOC(device_id)       ( IS_BROXTON(device_id) )
43 
44 extern MOS_STATUS HWInfo_GetGfxProductFamily(int32_t fd, PRODUCT_FAMILY &eProductFamily);
45 
46 extern MOS_STATUS HWInfo_GetGfxInfo(int32_t    fd,
47                           PLATFORM             *gfxPlatform,
48                           MEDIA_FEATURE_TABLE  *skuTable,
49                           MEDIA_WA_TABLE       *waTable,
50                           MEDIA_SYSTEM_INFO    *gtSystemInfo);
51 
52 struct LinuxDriverInfo;
53 extern MOS_STATUS HWInfoGetLinuxDrvInfo(int  fd, struct LinuxDriverInfo *drvInfo);
54 
55 extern MOS_STATUS HWInfo_GetGmmInfo(int               fd,
56                           SHADOW_MEDIA_FEATURE_TABLE  *shadowSkuTable,
57                           SHADOW_MEDIA_WA_TABLE       *shadowWaTable,
58                           MEDIA_SYSTEM_INFO           *systemInfo);
59 
60 #endif
61 
62