File: linux_system_info.h

package info (click to toggle)
intel-media-driver 21.1.1%2Bdfsg1-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 108,772 kB
  • sloc: cpp: 1,078,942; ansic: 164,231; asm: 45,336; python: 554; sh: 177; makefile: 13
file content (111 lines) | stat: -rw-r--r-- 3,839 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
/*
* Copyright (c) 2017, 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.
*/
#ifndef __LINUX_MEDIA_SYS_INFO_H__
#define __LINUX_MEDIA_SYS_INFO_H__

#include <stdint.h>
#include <stdbool.h>
#include "linux_shadow_skuwa.h"

#ifndef ENABLE_KERNELS
#define SET_STATUS_BY_FULL_OPEN_SOURCE(sts_not_full_open_source, sts_if_full_open_source)   0
#elif defined(_FULL_OPEN_SOURCE)
#define SET_STATUS_BY_FULL_OPEN_SOURCE(sts_not_full_open_source, sts_if_full_open_source)   (sts_if_full_open_source)
#else
#define SET_STATUS_BY_FULL_OPEN_SOURCE(sts_not_full_open_source, sts_if_full_open_source)   (sts_not_full_open_source)
#endif

struct LinuxDriverInfo
{
    uint32_t euCount;
    uint32_t subSliceCount;
    uint32_t sliceCount; //Derived from subsliceCount
    uint32_t devId;
    uint32_t devRev;  //Revision ID of Graphics device
    uint32_t hasBsd   : 1;
    uint32_t hasBsd2  : 1;
    uint32_t hasVebox : 1;
    uint32_t hasBltRing : 1;
    uint32_t hasHuc   : 1;
    uint32_t hasPpgtt : 1;
    uint32_t hasPreemption : 1;
};

struct LinuxCodecInfo
{
    uint32_t avcDecoding    : 1;
    uint32_t mpeg2Decoding  : 1;
    uint32_t vp8Decoding    : 1;
    uint32_t vc1Decoding    : 1;
    uint32_t jpegDecoding   : 1;
    uint32_t avcEncoding    : 1;
    uint32_t mpeg2Encoding  : 1;
    uint32_t hevcDecoding   : 1;
    uint32_t hevcEncoding   : 1;
    uint32_t jpegEncoding   : 1;
    uint32_t avcVdenc       : 1;
    uint32_t vp9Decoding    : 1;
    uint32_t hevc10Decoding : 1;
    uint32_t vp9b10Decoding : 1;
    uint32_t hevc10Encoding : 1;
    uint32_t hevc12Encoding : 1;
    uint32_t vp8Encoding    : 1;
    uint32_t hevcVdenc      : 1;
    uint32_t vp9Vdenc       : 1;
    uint32_t adv0Decoding   : 1;
    uint32_t adv1Decoding   : 1;
};

struct GfxDeviceInfo
{
    uint32_t  platformType;
    uint32_t  productFamily;
    uint32_t  displayFamily;
    uint32_t  renderFamily;
    uint32_t  eGTType;
    uint32_t  L3CacheSizeInKb;
    uint32_t  L3BankCount;
    uint32_t  EUCount;
    uint32_t  SliceCount;
    uint32_t  SubSliceCount;
    uint32_t  MaxEuPerSubSlice;
    uint32_t  isLCIA : 1;
    uint32_t  hasLLC  : 1;
    uint32_t  hasERAM : 1;
    bool (*InitMediaSysInfo)(struct GfxDeviceInfo *, MEDIA_GT_SYSTEM_INFO *);
    bool (*InitShadowSku)(struct GfxDeviceInfo *, SHADOW_MEDIA_FEATURE_TABLE *, struct LinuxDriverInfo *);
    bool (*InitShadowWa)(struct GfxDeviceInfo *, SHADOW_MEDIA_WA_TABLE *, struct LinuxDriverInfo *);
};

class MediaFeatureTable;
class MediaWaTable;

struct LinuxDeviceInit
{
    uint32_t productFamily;
    bool (*InitMediaFeature)(struct GfxDeviceInfo *, MediaFeatureTable *, struct LinuxDriverInfo *);
    bool (*InitMediaWa)(struct GfxDeviceInfo *, MediaWaTable *, struct LinuxDriverInfo *);
};

#define MEDIA_EXT_FLAG  0x10000000

#endif //__LINUX_MEDIA_SYS_INFO_H__