BUG 1428174 - Add Qualcomm to Windows GPU Whitelist r=jrmuizel

New Windows devices are coming out that have GPU Device ID strings of
the form

ACPI\VEN_QCOM&DEV_007C&SUBSYS_CLS08998&REV_007C

as reported in the bug description. Since the VEN_ ID is not numeric,
this change interprets the QCOM string so that it can be whitelisted
and then whitelists it.

MozReview-Commit-ID: 2ABRzvHKn6v

--HG--
extra : rebase_source : 6951d3bfc060abc298c93dd31db07715d6857cc5
This commit is contained in:
Jon Kunkee 2018-01-05 17:28:02 -08:00
Родитель 4027f91f3e
Коммит 01ad44282e
3 изменённых файлов: 10 добавлений и 0 удалений

Просмотреть файл

@ -307,6 +307,9 @@ const nsAString& GfxDriverInfo::GetDeviceVendor(DeviceVendor id)
DECLARE_VENDOR_ID(VendorATI, "0x1002");
DECLARE_VENDOR_ID(VendorMicrosoft, "0x1414");
DECLARE_VENDOR_ID(VendorParallels, "0x1ab8");
// Choose an arbitrary Qualcomm PCI VENdor ID for now.
// TODO: This should be "QCOM" when Windows device ID parsing is reworked.
DECLARE_VENDOR_ID(VendorQualcomm, "0x5143");
// Suppress a warning.
DECLARE_VENDOR_ID(DeviceVendorMax, "");
}

Просмотреть файл

@ -108,6 +108,7 @@ enum DeviceVendor {
VendorATI,
VendorMicrosoft,
VendorParallels,
VendorQualcomm,
DeviceVendorMax
};

Просмотреть файл

@ -265,6 +265,11 @@ ParseIDFromDeviceID(const nsAString &key, const char *prefix, int length)
id.Cut(0, start + strlen(prefix));
id.Truncate(length);
}
if (id.Equals(L"QCOM", nsCaseInsensitiveStringComparator())) {
// String format assumptions are broken, so use a Qualcomm PCI Vendor ID
// for now. See also GfxDriverInfo::GetDeviceVendor.
return 0x5143;
}
nsresult err;
return id.ToInteger(&err, 16);
}
@ -1410,6 +1415,7 @@ GfxInfo::GetFeatureStatusImpl(int32_t aFeature,
!adapterVendorID.Equals(GfxDriverInfo::GetDeviceVendor(VendorATI), nsCaseInsensitiveStringComparator()) &&
!adapterVendorID.Equals(GfxDriverInfo::GetDeviceVendor(VendorMicrosoft), nsCaseInsensitiveStringComparator()) &&
!adapterVendorID.Equals(GfxDriverInfo::GetDeviceVendor(VendorParallels), nsCaseInsensitiveStringComparator()) &&
!adapterVendorID.Equals(GfxDriverInfo::GetDeviceVendor(VendorQualcomm), nsCaseInsensitiveStringComparator()) &&
// FIXME - these special hex values are currently used in xpcshell tests introduced by
// bug 625160 patch 8/8. Maybe these tests need to be adjusted now that we're only whitelisting
// intel/ati/nvidia.