Commit 8afcb719 authored by Lin Sun's avatar Lin Sun Committed by Commit Bot

Extend the scope of Intel GPU series and generation

Add new 4th/5th generation and corresponding GPU series. Add latest
GPU series for 11th/12th generation. Also fixed a few nits in
GpuControlList.

Bug: 1062334
Change-Id: Iea0aa505cf75ab79efb12b345d9a2e2e4bd6d367
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2142747
Commit-Queue: Lin Sun <lin.sun@intel.com>
Reviewed-by: default avatarZhenyao Mo <zmo@chromium.org>
Reviewed-by: default avatarKenneth Russell <kbr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#758929}
parent 0dc9629a
...@@ -18,10 +18,15 @@ ...@@ -18,10 +18,15 @@
namespace gpu { namespace gpu {
// These values are persistent to logs. Entries should not be renumbered and
// numeric values should never be reused.
// This should match enum IntelGpuGeneration in
// \tools\metrics\histograms\enums.xml
enum class IntelGpuGeneration { enum class IntelGpuGeneration {
kNonIntel = 0, kNonIntel = 0,
kUnknownIntel = 1, // Intel GPU, but not one of the following generations. kUnknownIntel = 1, // Intel GPU, but not one of the following generations.
// Don't care about Gen1 ~ Gen5. Detection code starts with Gen6. kGen4 = 4,
kGen5 = 5,
kGen6 = 6, kGen6 = 6,
kGen7 = 7, kGen7 = 7,
kGen8 = 8, kGen8 = 8,
......
...@@ -96,7 +96,7 @@ int CompareLexicalNumberStrings( ...@@ -96,7 +96,7 @@ int CompareLexicalNumberStrings(
return 0; return 0;
} }
bool isOldIntelDriver(const std::vector<std::string>& version) { bool IsOldIntelDriver(const std::vector<std::string>& version) {
DCHECK_EQ(4u, version.size()); DCHECK_EQ(4u, version.size());
unsigned value = 0; unsigned value = 0;
bool valid = base::StringToUint(version[2], &value); bool valid = base::StringToUint(version[2], &value);
...@@ -264,20 +264,21 @@ bool GpuControlList::DriverInfo::Contains(const GPUInfo& gpu_info, ...@@ -264,20 +264,21 @@ bool GpuControlList::DriverInfo::Contains(const GPUInfo& gpu_info,
valid = ProcessVersionString(driver_version.value2, '.', &ref_version2); valid = ProcessVersionString(driver_version.value2, '.', &ref_version2);
DCHECK(valid); DCHECK(valid);
} }
// If either of the two versions doesn't match the Intel driver version + // schema, or they belong to different generation of version schema, they // If either of the two versions doesn't match the Intel driver version
// schema, or they belong to different generation of version schema, they
// should not be compared. // should not be compared.
if (version.size() != 4 || ref_version.size() != 4) if (version.size() != 4 || ref_version.size() != 4)
return false; return false;
if (isOldIntelDriver(version) != isOldIntelDriver(ref_version)) if (IsOldIntelDriver(version) != IsOldIntelDriver(ref_version))
return false; return false;
if (!ref_version2.empty()) { if (!ref_version2.empty()) {
if (ref_version2.size() != 4 if (ref_version2.size() != 4
|| isOldIntelDriver(ref_version) != isOldIntelDriver(ref_version2)) || IsOldIntelDriver(ref_version) != IsOldIntelDriver(ref_version2))
return false; return false;
} }
std::string build_num, ref_build_num, ref_build_num2; std::string build_num, ref_build_num, ref_build_num2;
if (isOldIntelDriver(version)) { if (IsOldIntelDriver(version)) {
build_num = version[3]; build_num = version[3];
ref_build_num = ref_version[3]; ref_build_num = ref_version[3];
if (!ref_version2.empty()) if (!ref_version2.empty())
......
...@@ -68,12 +68,12 @@ ...@@ -68,12 +68,12 @@
// to 0, which is Chrome's blacklist. Any entries with a non-zero test_group // to 0, which is Chrome's blacklist. Any entries with a non-zero test_group
// ID will be appended on top of the default group entries if Chrome runs // ID will be appended on top of the default group entries if Chrome runs
// with --gpu-blacklist-test-group=ID. // with --gpu-blacklist-test-group=ID.
// 28. "gpu_series" is a list of gpu series names. Currently supported series // 28. "intel_gpu_series" is a list of gpu series names. Currently supported
// include: "intel_sandybridge", "intel_valleyview", "intel_ivybridge", // series include: "broadwater", "eaglelake", "ironlake", "sandybridge",
// "intel_haswell", "intel_cherryview", "intel_broadwell", // "baytrail", "ivybridge", "haswell", "cherrytrail", "broadwell",
// "intel_apollolake", "intel_skylake", "intel_geminilake", // "apollolake", "skylake", "geminilake", "kabylake", "coffeelake",
// "intel_kabylake", "intel_coffeelake", "intel_whiskeylake", // "whiskeylake", "cometlake", "cannonlake", "icelake", "elkhartlake",
// "intel_cometlake", "intel_cannonlake", "intel_icelake". // "jasperlake", "tigerlake".
// 29. "hardware_overlay" is either "supported" or "unsupported". Currently it // 29. "hardware_overlay" is either "supported" or "unsupported". Currently it
// only applies on Windows where hardware overlays may be supported on // only applies on Windows where hardware overlays may be supported on
// certain Intel GPUs. By default it's "dont_care" and there is no need to // certain Intel GPUs. By default it's "dont_care" and there is no need to
......
...@@ -29,10 +29,17 @@ ...@@ -29,10 +29,17 @@
namespace gpu { namespace gpu {
// These values are persisted to logs. Entries should not be renumbered and // These values are persistent to logs. Entries should not be renumbered and
// numeric values should never be reused. // numeric values should never be reused.
// This should match enum IntelGpuSeriesType in
// \tools\metrics\histograms\enums.xml
enum class IntelGpuSeriesType { enum class IntelGpuSeriesType {
kUnknown = 0, kUnknown = 0,
// Intel 4th gen
kBroadwater = 16,
kEaglelake = 17,
// Intel 5th gen
kIronlake = 18,
// Intel 6th gen // Intel 6th gen
kSandybridge = 1, kSandybridge = 1,
// Intel 7th gen // Intel 7th gen
...@@ -54,8 +61,12 @@ enum class IntelGpuSeriesType { ...@@ -54,8 +61,12 @@ enum class IntelGpuSeriesType {
kCannonlake = 14, kCannonlake = 14,
// Intel 11th gen // Intel 11th gen
kIcelake = 15, kIcelake = 15,
kElkhartlake = 19,
kJasperlake = 20,
// Intel 12th gen
kTigerlake = 21,
// Please also update |gpu_series_map| in process_json.py. // Please also update |gpu_series_map| in process_json.py.
kMaxValue = kIcelake, kMaxValue = kTigerlake,
}; };
// Video profile. This *must* match media::VideoCodecProfile. // Video profile. This *must* match media::VideoCodecProfile.
......
...@@ -54,7 +54,7 @@ namespace gpu { ...@@ -54,7 +54,7 @@ namespace gpu {
namespace { namespace {
#if defined(OS_WIN) #if defined(OS_WIN)
// These values are persisted to logs. Entries should not be renumbered and // These values are persistent to logs. Entries should not be renumbered and
// numeric values should never be reused. // numeric values should never be reused.
// This should match enum D3D11FeatureLevel in // This should match enum D3D11FeatureLevel in
// \tools\metrics\histograms\enums.xml // \tools\metrics\histograms\enums.xml
...@@ -790,36 +790,36 @@ IntelGpuSeriesType GetIntelGpuSeriesType(uint32_t vendor_id, ...@@ -790,36 +790,36 @@ IntelGpuSeriesType GetIntelGpuSeriesType(uint32_t vendor_id,
// and we don't want to expose an extra bit other than the already recorded // and we don't want to expose an extra bit other than the already recorded
// vendor_id and device_id. // vendor_id and device_id.
if (vendor_id == 0x8086) { // Intel if (vendor_id == 0x8086) { // Intel
// We only identify Intel 6th gen or newer. // The device IDs of Intel GPU are based on following Mesa source files:
// The device id can be referred to in the following locations: // include/pci_ids/i965_pci_ids.h and iris_pci_ids.h
// https://en.wikipedia.org/wiki/List_of_Intel_graphics_processing_units
// and the heade files in Mesa sources:
// include/pci_ids/i965_pci_ids.h
uint32_t masked_device_id = device_id & 0xFF00; uint32_t masked_device_id = device_id & 0xFF00;
switch (masked_device_id) { switch (masked_device_id) {
case 0x0100: case 0x2900:
switch (device_id & 0xFFF0) { return IntelGpuSeriesType::kBroadwater;
case 0x0100: case 0x2A00:
case 0x0110: if (device_id == 0x2A02 || device_id == 0x2A12)
case 0x0120: return IntelGpuSeriesType::kBroadwater;
return IntelGpuSeriesType::kSandybridge; if (device_id == 0x2A42)
case 0x0150: return IntelGpuSeriesType::kEaglelake;
if (device_id == 0x0155 || device_id == 0x0157)
return IntelGpuSeriesType::kBaytrail;
if (device_id == 0x0152 || device_id == 0x015A
|| device_id == 0x0156)
return IntelGpuSeriesType::kIvybridge;
break;
case 0x0160:
return IntelGpuSeriesType::kIvybridge;
default:
break;
}
break; break;
case 0x2E00:
return IntelGpuSeriesType::kEaglelake;
case 0x0000:
return IntelGpuSeriesType::kIronlake;
case 0x0100:
if (device_id == 0x0152 || device_id == 0x0156 || device_id == 0x015A ||
device_id == 0x0162 || device_id == 0x0166 || device_id == 0x016A)
return IntelGpuSeriesType::kIvybridge;
if (device_id == 0x0155 || device_id == 0x0157)
return IntelGpuSeriesType::kBaytrail;
return IntelGpuSeriesType::kSandybridge;
case 0x0F00: case 0x0F00:
return IntelGpuSeriesType::kBaytrail; return IntelGpuSeriesType::kBaytrail;
case 0x0400:
case 0x0A00: case 0x0A00:
if (device_id == 0x0A84)
return IntelGpuSeriesType::kApollolake;
return IntelGpuSeriesType::kHaswell;
case 0x0400:
case 0x0C00: case 0x0C00:
case 0x0D00: case 0x0D00:
return IntelGpuSeriesType::kHaswell; return IntelGpuSeriesType::kHaswell;
...@@ -833,6 +833,8 @@ IntelGpuSeriesType GetIntelGpuSeriesType(uint32_t vendor_id, ...@@ -833,6 +833,8 @@ IntelGpuSeriesType GetIntelGpuSeriesType(uint32_t vendor_id,
return IntelGpuSeriesType::kCannonlake; return IntelGpuSeriesType::kCannonlake;
case 0x1900: case 0x1900:
return IntelGpuSeriesType::kSkylake; return IntelGpuSeriesType::kSkylake;
case 0x1A00:
return IntelGpuSeriesType::kApollolake;
case 0x3100: case 0x3100:
return IntelGpuSeriesType::kGeminilake; return IntelGpuSeriesType::kGeminilake;
case 0x5900: case 0x5900:
...@@ -852,6 +854,12 @@ IntelGpuSeriesType GetIntelGpuSeriesType(uint32_t vendor_id, ...@@ -852,6 +854,12 @@ IntelGpuSeriesType GetIntelGpuSeriesType(uint32_t vendor_id,
return IntelGpuSeriesType::kCometlake; return IntelGpuSeriesType::kCometlake;
case 0x8A00: case 0x8A00:
return IntelGpuSeriesType::kIcelake; return IntelGpuSeriesType::kIcelake;
case 0x4500:
return IntelGpuSeriesType::kElkhartlake;
case 0x4E00:
return IntelGpuSeriesType::kJasperlake;
case 0x9A00:
return IntelGpuSeriesType::kTigerlake;
default: default:
break; break;
} }
...@@ -863,6 +871,11 @@ std::string GetIntelGpuGeneration(uint32_t vendor_id, uint32_t device_id) { ...@@ -863,6 +871,11 @@ std::string GetIntelGpuGeneration(uint32_t vendor_id, uint32_t device_id) {
if (vendor_id == 0x8086) { if (vendor_id == 0x8086) {
IntelGpuSeriesType gpu_series = GetIntelGpuSeriesType(vendor_id, device_id); IntelGpuSeriesType gpu_series = GetIntelGpuSeriesType(vendor_id, device_id);
switch (gpu_series) { switch (gpu_series) {
case IntelGpuSeriesType::kBroadwater:
case IntelGpuSeriesType::kEaglelake:
return "4";
case IntelGpuSeriesType::kIronlake:
return "5";
case IntelGpuSeriesType::kSandybridge: case IntelGpuSeriesType::kSandybridge:
return "6"; return "6";
case IntelGpuSeriesType::kBaytrail: case IntelGpuSeriesType::kBaytrail:
...@@ -883,7 +896,11 @@ std::string GetIntelGpuGeneration(uint32_t vendor_id, uint32_t device_id) { ...@@ -883,7 +896,11 @@ std::string GetIntelGpuGeneration(uint32_t vendor_id, uint32_t device_id) {
case IntelGpuSeriesType::kCannonlake: case IntelGpuSeriesType::kCannonlake:
return "10"; return "10";
case IntelGpuSeriesType::kIcelake: case IntelGpuSeriesType::kIcelake:
case IntelGpuSeriesType::kElkhartlake:
case IntelGpuSeriesType::kJasperlake:
return "11"; return "11";
case IntelGpuSeriesType::kTigerlake:
return "12";
default: default:
break; break;
} }
......
...@@ -571,6 +571,9 @@ def write_intel_gpu_series_list(entry_id, is_exception, exception_id, ...@@ -571,6 +571,9 @@ def write_intel_gpu_series_list(entry_id, is_exception, exception_id,
data_helper_file.write('const IntelGpuSeriesType %s[%d] = {\n' % data_helper_file.write('const IntelGpuSeriesType %s[%d] = {\n' %
(var_name, len(intel_gpu_series_list))) (var_name, len(intel_gpu_series_list)))
intel_gpu_series_map = { intel_gpu_series_map = {
'broadwater': 'kBroadwater',
'eaglelake': 'kEaglelake',
'ironlake': 'kIronlake',
'sandybridge': 'kSandybridge', 'sandybridge': 'kSandybridge',
'baytrail': 'kBaytrail', 'baytrail': 'kBaytrail',
'ivybridge': 'kIvybridge', 'ivybridge': 'kIvybridge',
...@@ -585,7 +588,10 @@ def write_intel_gpu_series_list(entry_id, is_exception, exception_id, ...@@ -585,7 +588,10 @@ def write_intel_gpu_series_list(entry_id, is_exception, exception_id,
'whiskeylake': 'kWhiskeylake', 'whiskeylake': 'kWhiskeylake',
'cometlake': 'kCometlake', 'cometlake': 'kCometlake',
'cannonlake': 'kCannonlake', 'cannonlake': 'kCannonlake',
'icelake': 'kIcelake' 'icelake': 'kIcelake',
'elkhartlake': 'kElkhartlake',
'jasperlake': 'kJasperlake',
'tigerlake': 'kTigerlake'
} }
for series in intel_gpu_series_list: for series in intel_gpu_series_list:
assert series in intel_gpu_series_map assert series in intel_gpu_series_map
......
...@@ -34931,6 +34931,8 @@ Called by update_gpu_driver_bug_workaround_entries.py.--> ...@@ -34931,6 +34931,8 @@ Called by update_gpu_driver_bug_workaround_entries.py.-->
<enum name="IntelGpuGeneration"> <enum name="IntelGpuGeneration">
<int value="0" label="Not Intel"/> <int value="0" label="Not Intel"/>
<int value="1" label="Unknown Intel"/> <int value="1" label="Unknown Intel"/>
<int value="4" label="4th Gen"/>
<int value="5" label="5th Gen"/>
<int value="6" label="6th Gen"/> <int value="6" label="6th Gen"/>
<int value="7" label="7th Gen"/> <int value="7" label="7th Gen"/>
<int value="8" label="8th Gen"/> <int value="8" label="8th Gen"/>
...@@ -34960,6 +34962,12 @@ Called by update_gpu_driver_bug_workaround_entries.py.--> ...@@ -34960,6 +34962,12 @@ Called by update_gpu_driver_bug_workaround_entries.py.-->
<int value="13" label="Intel CometLake"/> <int value="13" label="Intel CometLake"/>
<int value="14" label="Intel CannonLake"/> <int value="14" label="Intel CannonLake"/>
<int value="15" label="Intel IceLake"/> <int value="15" label="Intel IceLake"/>
<int value="16" label="Intel Broadwater"/>
<int value="17" label="Intel EagleLake"/>
<int value="18" label="Intel IronLake"/>
<int value="19" label="Intel ElkhartLake"/>
<int value="20" label="Intel JaspterLake"/>
<int value="21" label="Intel TigerLake"/>
</enum> </enum>
<enum name="IntelMaxMicroArchitecture"> <enum name="IntelMaxMicroArchitecture">
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment