Skip to content

Commit 31d3cc8

Browse files
Rename setupGtSystemInfo to setupHardwareInfo
- adding new parameter for FeatureTable setup Change-Id: I1f1c66894555003612e08127801c6b096b0a2400
1 parent ad9710b commit 31d3cc8

40 files changed

+273
-233
lines changed

runtime/command_stream/create_command_stream_impl.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,8 @@ bool getDevicesImpl(HardwareInfo **hwInfo, size_t &numDevicesReturned, Execution
7373
auto hwInfoConst = *platformDevices;
7474
getHwInfoForPlatformString(productFamily.c_str(), hwInfoConst);
7575
*hwInfo = const_cast<HardwareInfo *>(hwInfoConst);
76-
hardwareInfoSetupGt[hwInfoConst->pPlatform->eProductFamily](const_cast<GT_SYSTEM_INFO *>(hwInfo[0]->pSysInfo));
76+
hardwareInfoSetup[hwInfoConst->pPlatform->eProductFamily](const_cast<GT_SYSTEM_INFO *>(hwInfo[0]->pSysInfo),
77+
const_cast<FeatureTable *>(hwInfo[0]->pSkuTable), true);
7778
numDevicesReturned = 1;
7879
return true;
7980
}

runtime/dll/linux/drm_neo_create.cpp

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
namespace OCLRT {
3636

3737
const DeviceDescriptor deviceDescriptorTable[] = {
38-
#define DEVICE(devId, gt, gtType) {devId, &gt::hwInfo, &gt::setupGtSystemInfo, gtType},
38+
#define DEVICE(devId, gt, gtType) {devId, &gt::hwInfo, &gt::setupHardwareInfo, gtType},
3939
#include "devices.m"
4040
#undef DEVICE
4141
{0, nullptr, nullptr, GTTYPE_UNDEFINED}};
@@ -133,7 +133,7 @@ int Drm::openDevice() {
133133
}
134134

135135
Drm *Drm::create(int32_t deviceOrdinal) {
136-
//right now we support only one device
136+
// right now we support only one device
137137
if (deviceOrdinal != 0)
138138
return nullptr;
139139

@@ -181,11 +181,12 @@ Drm *Drm::create(int32_t deviceOrdinal) {
181181
}
182182
if (device) {
183183
platformDevices[0] = device->pHwInfo;
184-
device->setupGtSystemInfo(const_cast<GT_SYSTEM_INFO *>(platformDevices[0]->pSysInfo));
184+
device->setupHardwareInfo(const_cast<GT_SYSTEM_INFO *>(platformDevices[0]->pSysInfo),
185+
const_cast<FeatureTable *>(platformDevices[0]->pSkuTable), true);
185186
drmObject->setGtType(eGtType);
186187
} else {
187-
printDebugString(DebugManager.flags.PrintDebugMessages.get(), stderr, "%s", "FATAL: Unknown device: deviceId: %04x, revisionId: %04x\n",
188-
drmObject->deviceId, drmObject->revisionId);
188+
printDebugString(DebugManager.flags.PrintDebugMessages.get(), stderr, "%s",
189+
"FATAL: Unknown device: deviceId: %04x, revisionId: %04x\n", drmObject->deviceId, drmObject->revisionId);
189190
delete drmObject;
190191
return nullptr;
191192
}
@@ -200,16 +201,17 @@ Drm *Drm::create(int32_t deviceOrdinal) {
200201
}
201202

202203
if (!hasExecSoftPin) {
203-
printDebugString(DebugManager.flags.PrintDebugMessages.get(), stderr, "%s", "FATAL: Device doesn't support Soft-Pin but this is required.\n");
204+
printDebugString(DebugManager.flags.PrintDebugMessages.get(), stderr, "%s",
205+
"FATAL: Device doesn't support Soft-Pin but this is required.\n");
204206
delete drmObject;
205207
return nullptr;
206208
}
207209

208210
// Activate the Turbo Boost Frequency feature
209211
ret = drmObject->enableTurboBoost();
210212
if (ret != 0) {
211-
//turbo patch not present, we are not on custom Kernel, switch to simplified Mocs selection
212-
//do this only for GEN9+
213+
// turbo patch not present, we are not on custom Kernel, switch to simplified Mocs selection
214+
// do this only for GEN9+
213215
if (device->pHwInfo->pPlatform->eRenderCoreFamily >= IGFX_GEN9_CORE) {
214216
drmObject->setSimplifiedMocsTableUsage(true);
215217
}

runtime/gen10/hw_cmds.h

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -58,43 +58,43 @@ struct CNL : public CNLFamily {
5858
static const uint32_t maxSlicesSupported = 4;
5959
static const uint32_t maxSubslicesSupported = 9;
6060
static const RuntimeCapabilityTable capabilityTable;
61-
static void (*setupGtSystemInfo)(GT_SYSTEM_INFO *gtSysInfo);
61+
static void (*setupHardwareInfo)(GT_SYSTEM_INFO *gtSysInfo, FeatureTable *featureTable, bool setupFeatureTable);
6262
};
6363
class CNL_2x5x8 : public CNL {
6464
public:
65-
static void setupGtSystemInfo(GT_SYSTEM_INFO *gtSysInfo);
65+
static void setupHardwareInfo(GT_SYSTEM_INFO *gtSysInfo, FeatureTable *featureTable, bool setupFeatureTable);
6666
static const HardwareInfo hwInfo;
6767

6868
private:
6969
static GT_SYSTEM_INFO gtSystemInfo;
7070
};
7171
class CNL_2x4x8 : public CNL {
7272
public:
73-
static void setupGtSystemInfo(GT_SYSTEM_INFO *gtSysInfo);
73+
static void setupHardwareInfo(GT_SYSTEM_INFO *gtSysInfo, FeatureTable *featureTable, bool setupFeatureTable);
7474
static const HardwareInfo hwInfo;
7575

7676
private:
7777
static GT_SYSTEM_INFO gtSystemInfo;
7878
};
7979
class CNL_1x3x8 : public CNL {
8080
public:
81-
static void setupGtSystemInfo(GT_SYSTEM_INFO *gtSysInfo);
81+
static void setupHardwareInfo(GT_SYSTEM_INFO *gtSysInfo, FeatureTable *featureTable, bool setupFeatureTable);
8282
static const HardwareInfo hwInfo;
8383

8484
private:
8585
static GT_SYSTEM_INFO gtSystemInfo;
8686
};
8787
class CNL_1x2x8 : public CNL {
8888
public:
89-
static void setupGtSystemInfo(GT_SYSTEM_INFO *gtSysInfo);
89+
static void setupHardwareInfo(GT_SYSTEM_INFO *gtSysInfo, FeatureTable *featureTable, bool setupFeatureTable);
9090
static const HardwareInfo hwInfo;
9191

9292
private:
9393
static GT_SYSTEM_INFO gtSystemInfo;
9494
};
9595
class CNL_4x9x8 : public CNL {
9696
public:
97-
static void setupGtSystemInfo(GT_SYSTEM_INFO *gtSysInfo);
97+
static void setupHardwareInfo(GT_SYSTEM_INFO *gtSysInfo, FeatureTable *featureTable, bool setupFeatureTable);
9898
static const HardwareInfo hwInfo;
9999

100100
private:

runtime/gen10/hw_info_cnl.inl

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ const HardwareInfo CNL_2x5x8::hwInfo = {
8787
CNL::capabilityTable,
8888
};
8989
GT_SYSTEM_INFO CNL_2x5x8::gtSystemInfo = {0};
90-
void CNL_2x5x8::setupGtSystemInfo(GT_SYSTEM_INFO *gtSysInfo) {
90+
void CNL_2x5x8::setupHardwareInfo(GT_SYSTEM_INFO *gtSysInfo, FeatureTable *featureTable, bool setupFeatureTable) {
9191
gtSysInfo->EUCount = 39;
9292
gtSysInfo->ThreadCount = 39 * CNL::threadsPerEu;
9393
gtSysInfo->SliceCount = 2;
@@ -115,7 +115,7 @@ const HardwareInfo CNL_2x4x8::hwInfo = {
115115
CNL::capabilityTable,
116116
};
117117
GT_SYSTEM_INFO CNL_2x4x8::gtSystemInfo = {0};
118-
void CNL_2x4x8::setupGtSystemInfo(GT_SYSTEM_INFO *gtSysInfo) {
118+
void CNL_2x4x8::setupHardwareInfo(GT_SYSTEM_INFO *gtSysInfo, FeatureTable *featureTable, bool setupFeatureTable) {
119119
gtSysInfo->EUCount = 31;
120120
gtSysInfo->ThreadCount = 31 * CNL::threadsPerEu;
121121
gtSysInfo->SliceCount = 2;
@@ -143,7 +143,7 @@ const HardwareInfo CNL_1x3x8::hwInfo = {
143143
CNL::capabilityTable,
144144
};
145145
GT_SYSTEM_INFO CNL_1x3x8::gtSystemInfo = {0};
146-
void CNL_1x3x8::setupGtSystemInfo(GT_SYSTEM_INFO *gtSysInfo) {
146+
void CNL_1x3x8::setupHardwareInfo(GT_SYSTEM_INFO *gtSysInfo, FeatureTable *featureTable, bool setupFeatureTable) {
147147
gtSysInfo->EUCount = 23;
148148
gtSysInfo->ThreadCount = 23 * CNL::threadsPerEu;
149149
gtSysInfo->SliceCount = 1;
@@ -171,7 +171,7 @@ const HardwareInfo CNL_1x2x8::hwInfo = {
171171
CNL::capabilityTable,
172172
};
173173
GT_SYSTEM_INFO CNL_1x2x8::gtSystemInfo = {0};
174-
void CNL_1x2x8::setupGtSystemInfo(GT_SYSTEM_INFO *gtSysInfo) {
174+
void CNL_1x2x8::setupHardwareInfo(GT_SYSTEM_INFO *gtSysInfo, FeatureTable *featureTable, bool setupFeatureTable) {
175175
gtSysInfo->EUCount = 15;
176176
gtSysInfo->ThreadCount = 15 * CNL::threadsPerEu;
177177
gtSysInfo->SliceCount = 1;
@@ -199,7 +199,7 @@ const HardwareInfo CNL_4x9x8::hwInfo = {
199199
CNL::capabilityTable,
200200
};
201201
GT_SYSTEM_INFO CNL_4x9x8::gtSystemInfo = {0};
202-
void CNL_4x9x8::setupGtSystemInfo(GT_SYSTEM_INFO *gtSysInfo) {
202+
void CNL_4x9x8::setupHardwareInfo(GT_SYSTEM_INFO *gtSysInfo, FeatureTable *featureTable, bool setupFeatureTable) {
203203
gtSysInfo->EUCount = 71;
204204
gtSysInfo->ThreadCount = 71 * CNL::threadsPerEu;
205205
gtSysInfo->SliceCount = 4;
@@ -220,5 +220,5 @@ void CNL_4x9x8::setupGtSystemInfo(GT_SYSTEM_INFO *gtSysInfo) {
220220
gtSysInfo->IsDynamicallyPopulated = false;
221221
};
222222
const HardwareInfo CNL::hwInfo = CNL_2x5x8::hwInfo;
223-
void (*CNL::setupGtSystemInfo)(GT_SYSTEM_INFO *) = CNL_2x5x8::setupGtSystemInfo;
223+
void (*CNL::setupHardwareInfo)(GT_SYSTEM_INFO *, FeatureTable *, bool) = CNL_2x5x8::setupHardwareInfo;
224224
} // namespace OCLRT

runtime/gen8/hw_cmds_bdw.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,35 +33,35 @@ struct BDW : public BDWFamily {
3333
static const uint32_t maxSlicesSupported = 2;
3434
static const uint32_t maxSubslicesSupported = 6;
3535
static const RuntimeCapabilityTable capabilityTable;
36-
static void (*setupGtSystemInfo)(GT_SYSTEM_INFO *gtSysInfo);
36+
static void (*setupHardwareInfo)(GT_SYSTEM_INFO *gtSysInfo, FeatureTable *featureTable, bool setupFeatureTable);
3737
};
3838
class BDW_1x2x6 : public BDW {
3939
public:
40-
static void setupGtSystemInfo(GT_SYSTEM_INFO *gtSysInfo);
40+
static void setupHardwareInfo(GT_SYSTEM_INFO *gtSysInfo, FeatureTable *featureTable, bool setupFeatureTable);
4141
static const HardwareInfo hwInfo;
4242

4343
private:
4444
static GT_SYSTEM_INFO gtSystemInfo;
4545
};
4646
class BDW_1x3x6 : public BDW {
4747
public:
48-
static void setupGtSystemInfo(GT_SYSTEM_INFO *gtSysInfo);
48+
static void setupHardwareInfo(GT_SYSTEM_INFO *gtSysInfo, FeatureTable *featureTable, bool setupFeatureTable);
4949
static const HardwareInfo hwInfo;
5050

5151
private:
5252
static GT_SYSTEM_INFO gtSystemInfo;
5353
};
5454
class BDW_1x3x8 : public BDW {
5555
public:
56-
static void setupGtSystemInfo(GT_SYSTEM_INFO *gtSysInfo);
56+
static void setupHardwareInfo(GT_SYSTEM_INFO *gtSysInfo, FeatureTable *featureTable, bool setupFeatureTable);
5757
static const HardwareInfo hwInfo;
5858

5959
private:
6060
static GT_SYSTEM_INFO gtSystemInfo;
6161
};
6262
class BDW_2x3x8 : public BDW {
6363
public:
64-
static void setupGtSystemInfo(GT_SYSTEM_INFO *gtSysInfo);
64+
static void setupHardwareInfo(GT_SYSTEM_INFO *gtSysInfo, FeatureTable *featureTable, bool setupFeatureTable);
6565
static const HardwareInfo hwInfo;
6666

6767
private:

runtime/gen8/hw_info_bdw.inl

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ const HardwareInfo BDW_1x2x6::hwInfo = {
8888
BDW::capabilityTable,
8989
};
9090
GT_SYSTEM_INFO BDW_1x2x6::gtSystemInfo = {0};
91-
void BDW_1x2x6::setupGtSystemInfo(GT_SYSTEM_INFO *gtSysInfo) {
91+
void BDW_1x2x6::setupHardwareInfo(GT_SYSTEM_INFO *gtSysInfo, FeatureTable *featureTable, bool setupFeatureTable) {
9292
gtSysInfo->EUCount = 12;
9393
gtSysInfo->ThreadCount = 12 * BDW::threadsPerEu;
9494
gtSysInfo->SliceCount = 1;
@@ -117,7 +117,7 @@ const HardwareInfo BDW_1x3x6::hwInfo = {
117117
BDW::capabilityTable,
118118
};
119119
GT_SYSTEM_INFO BDW_1x3x6::gtSystemInfo = {0};
120-
void BDW_1x3x6::setupGtSystemInfo(GT_SYSTEM_INFO *gtSysInfo) {
120+
void BDW_1x3x6::setupHardwareInfo(GT_SYSTEM_INFO *gtSysInfo, FeatureTable *featureTable, bool setupFeatureTable) {
121121
gtSysInfo->EUCount = 18;
122122
gtSysInfo->ThreadCount = 18 * BDW::threadsPerEu;
123123
gtSysInfo->SliceCount = 1;
@@ -146,7 +146,7 @@ const HardwareInfo BDW_1x3x8::hwInfo = {
146146
BDW::capabilityTable,
147147
};
148148
GT_SYSTEM_INFO BDW_1x3x8::gtSystemInfo = {0};
149-
void BDW_1x3x8::setupGtSystemInfo(GT_SYSTEM_INFO *gtSysInfo) {
149+
void BDW_1x3x8::setupHardwareInfo(GT_SYSTEM_INFO *gtSysInfo, FeatureTable *featureTable, bool setupFeatureTable) {
150150
gtSysInfo->EUCount = 23;
151151
gtSysInfo->ThreadCount = 23 * BDW::threadsPerEu;
152152
gtSysInfo->SliceCount = 1;
@@ -175,7 +175,7 @@ const HardwareInfo BDW_2x3x8::hwInfo = {
175175
BDW::capabilityTable,
176176
};
177177
GT_SYSTEM_INFO BDW_2x3x8::gtSystemInfo = {0};
178-
void BDW_2x3x8::setupGtSystemInfo(GT_SYSTEM_INFO *gtSysInfo) {
178+
void BDW_2x3x8::setupHardwareInfo(GT_SYSTEM_INFO *gtSysInfo, FeatureTable *featureTable, bool setupFeatureTable) {
179179
gtSysInfo->EUCount = 47;
180180
gtSysInfo->ThreadCount = 47 * BDW::threadsPerEu;
181181
gtSysInfo->SliceCount = 2;
@@ -197,5 +197,5 @@ void BDW_2x3x8::setupGtSystemInfo(GT_SYSTEM_INFO *gtSysInfo) {
197197
};
198198

199199
const HardwareInfo BDW::hwInfo = BDW_1x3x8::hwInfo;
200-
void (*BDW::setupGtSystemInfo)(GT_SYSTEM_INFO *) = BDW_1x3x8::setupGtSystemInfo;
200+
void (*BDW::setupHardwareInfo)(GT_SYSTEM_INFO *, FeatureTable *, bool) = BDW_1x3x8::setupHardwareInfo;
201201
} // namespace OCLRT

runtime/gen9/hw_cmds_bxt.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,12 +35,12 @@ struct BXT : public SKLFamily {
3535
static const uint32_t maxSubslicesSupported = 3;
3636

3737
static const RuntimeCapabilityTable capabilityTable;
38-
static void (*setupGtSystemInfo)(GT_SYSTEM_INFO *gtSysInfo);
38+
static void (*setupHardwareInfo)(GT_SYSTEM_INFO *gtSysInfo, FeatureTable *featureTable, bool setupFeatureTable);
3939
};
4040

4141
class BXT_1x2x6 : public BXT {
4242
public:
43-
static void setupGtSystemInfo(GT_SYSTEM_INFO *gtSysInfo);
43+
static void setupHardwareInfo(GT_SYSTEM_INFO *gtSysInfo, FeatureTable *featureTable, bool setupFeatureTable);
4444
static const HardwareInfo hwInfo;
4545

4646
private:
@@ -49,7 +49,7 @@ class BXT_1x2x6 : public BXT {
4949

5050
class BXT_1x3x6 : public BXT {
5151
public:
52-
static void setupGtSystemInfo(GT_SYSTEM_INFO *gtSysInfo);
52+
static void setupHardwareInfo(GT_SYSTEM_INFO *gtSysInfo, FeatureTable *featureTable, bool setupFeatureTable);
5353
static const HardwareInfo hwInfo;
5454

5555
private:

runtime/gen9/hw_cmds_cfl.h

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -35,12 +35,12 @@ struct CFL : public SKLFamily {
3535
static const uint32_t maxSubslicesSupported = 9;
3636

3737
static const RuntimeCapabilityTable capabilityTable;
38-
static void (*setupGtSystemInfo)(GT_SYSTEM_INFO *gtSysInfo);
38+
static void (*setupHardwareInfo)(GT_SYSTEM_INFO *gtSysInfo, FeatureTable *featureTable, bool setupFeatureTable);
3939
};
4040

4141
class CFL_1x2x6 : public CFL {
4242
public:
43-
static void setupGtSystemInfo(GT_SYSTEM_INFO *gtSysInfo);
43+
static void setupHardwareInfo(GT_SYSTEM_INFO *gtSysInfo, FeatureTable *featureTable, bool setupFeatureTable);
4444
static const HardwareInfo hwInfo;
4545

4646
private:
@@ -49,7 +49,7 @@ class CFL_1x2x6 : public CFL {
4949

5050
class CFL_1x3x6 : public CFL {
5151
public:
52-
static void setupGtSystemInfo(GT_SYSTEM_INFO *gtSysInfo);
52+
static void setupHardwareInfo(GT_SYSTEM_INFO *gtSysInfo, FeatureTable *featureTable, bool setupFeatureTable);
5353
static const HardwareInfo hwInfo;
5454

5555
private:
@@ -58,7 +58,7 @@ class CFL_1x3x6 : public CFL {
5858

5959
class CFL_1x3x8 : public CFL {
6060
public:
61-
static void setupGtSystemInfo(GT_SYSTEM_INFO *gtSysInfo);
61+
static void setupHardwareInfo(GT_SYSTEM_INFO *gtSysInfo, FeatureTable *featureTable, bool setupFeatureTable);
6262
static const HardwareInfo hwInfo;
6363

6464
private:
@@ -67,7 +67,7 @@ class CFL_1x3x8 : public CFL {
6767

6868
class CFL_2x3x8 : public CFL {
6969
public:
70-
static void setupGtSystemInfo(GT_SYSTEM_INFO *gtSysInfo);
70+
static void setupHardwareInfo(GT_SYSTEM_INFO *gtSysInfo, FeatureTable *featureTable, bool setupFeatureTable);
7171
static const HardwareInfo hwInfo;
7272

7373
private:
@@ -76,7 +76,7 @@ class CFL_2x3x8 : public CFL {
7676

7777
class CFL_3x3x8 : public CFL {
7878
public:
79-
static void setupGtSystemInfo(GT_SYSTEM_INFO *gtSysInfo);
79+
static void setupHardwareInfo(GT_SYSTEM_INFO *gtSysInfo, FeatureTable *featureTable, bool setupFeatureTable);
8080
static const HardwareInfo hwInfo;
8181

8282
private:

runtime/gen9/hw_cmds_glk.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,12 +35,12 @@ struct GLK : public SKLFamily {
3535
static const uint32_t maxSubslicesSupported = 3;
3636

3737
static const RuntimeCapabilityTable capabilityTable;
38-
static void (*setupGtSystemInfo)(GT_SYSTEM_INFO *gtSysInfo);
38+
static void (*setupHardwareInfo)(GT_SYSTEM_INFO *gtSysInfo, FeatureTable *featureTable, bool setupFeatureTable);
3939
};
4040

4141
class GLK_1x3x6 : public GLK {
4242
public:
43-
static void setupGtSystemInfo(GT_SYSTEM_INFO *gtSysInfo);
43+
static void setupHardwareInfo(GT_SYSTEM_INFO *gtSysInfo, FeatureTable *featureTable, bool setupFeatureTable);
4444
static const HardwareInfo hwInfo;
4545

4646
private:
@@ -49,7 +49,7 @@ class GLK_1x3x6 : public GLK {
4949

5050
class GLK_1x2x6 : public GLK {
5151
public:
52-
static void setupGtSystemInfo(GT_SYSTEM_INFO *gtSysInfo);
52+
static void setupHardwareInfo(GT_SYSTEM_INFO *gtSysInfo, FeatureTable *featureTable, bool setupFeatureTable);
5353
static const HardwareInfo hwInfo;
5454

5555
private:

0 commit comments

Comments
 (0)