mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-08 19:04:45 +00:00
Bug 623338 - Block old drivers for ATI & NVIDIA (older than June 2010) - r=joe, a=blocking2.0
This commit is contained in:
parent
7b80f91ce8
commit
84921d6077
@ -67,6 +67,11 @@ static const PRUint64 allDriverVersions = 0xffffffffffffffffULL;
|
||||
|
||||
static const PRUint32 vendorIntel = 0x8086;
|
||||
|
||||
static const PRUint32 vendorNVIDIA = 0x10de;
|
||||
|
||||
static const PRUint32 vendorAMD = 0x1022;
|
||||
static const PRUint32 vendorATI = 0x1002;
|
||||
|
||||
#define V(a,b,c,d) GFX_DRIVER_VERSION(a,b,c,d)
|
||||
|
||||
|
||||
@ -357,7 +362,7 @@ GfxInfo::Init()
|
||||
: L"igd10umd32.dll";
|
||||
nsString dllVersion;
|
||||
// if GetDLLVersion fails, it gives "0.0.0.0"
|
||||
gfxWindowsPlatform::GetPlatform()->GetDLLVersion(dllFileName, dllVersion);
|
||||
gfxWindowsPlatform::GetPlatform()->GetDLLVersion((PRUnichar*)dllFileName, dllVersion);
|
||||
|
||||
PRUint64 dllNumericVersion = 0, driverNumericVersion = 0;
|
||||
// so if GetDLLVersion failed, we get dllNumericVersion = 0
|
||||
@ -594,6 +599,27 @@ static const GfxDriverInfo gDriverInfo[] = {
|
||||
* Notice that the first match defines the result. So always implement special cases firsts and general case last.
|
||||
*/
|
||||
|
||||
/*
|
||||
* NVIDIA entries
|
||||
*/
|
||||
GfxDriverInfo( DRIVER_OS_ALL,
|
||||
vendorNVIDIA, GfxDriverInfo::allDevices,
|
||||
GfxDriverInfo::allFeatures, nsIGfxInfo::FEATURE_BLOCKED_DRIVER_VERSION,
|
||||
DRIVER_LESS_THAN, V(8,17,12,5721), "257.21" ),
|
||||
|
||||
/*
|
||||
* AMD/ATI entries
|
||||
*/
|
||||
GfxDriverInfo( DRIVER_OS_ALL,
|
||||
vendorATI, GfxDriverInfo::allDevices,
|
||||
GfxDriverInfo::allFeatures, nsIGfxInfo::FEATURE_BLOCKED_DRIVER_VERSION,
|
||||
DRIVER_LESS_THAN, V(8,741,0,0), "10.6" ),
|
||||
GfxDriverInfo( DRIVER_OS_ALL,
|
||||
vendorAMD, GfxDriverInfo::allDevices,
|
||||
GfxDriverInfo::allFeatures, nsIGfxInfo::FEATURE_BLOCKED_DRIVER_VERSION,
|
||||
DRIVER_LESS_THAN, V(8,741,0,0), "10.6" ),
|
||||
|
||||
|
||||
/*
|
||||
* Intel entries
|
||||
*/
|
||||
@ -701,8 +727,6 @@ GfxInfo::GetFeatureStatusImpl(PRInt32 aFeature, PRInt32 *aStatus, nsAString & aS
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
|
||||
PRUint64 suggestedDriverVersion = 0;
|
||||
|
||||
if (aFeature == FEATURE_DIRECT3D_9_LAYERS &&
|
||||
mWindowsVersion < gfxWindowsPlatform::kWindowsXP)
|
||||
{
|
||||
@ -728,6 +752,17 @@ GfxInfo::GetFeatureStatusImpl(PRInt32 aFeature, PRInt32 *aStatus, nsAString & aS
|
||||
}
|
||||
}
|
||||
|
||||
// special-case the WinXP test slaves: they have out-of-date drivers, but we still want to
|
||||
// whitelist them, actually we do know that this combination of device and driver version
|
||||
// works well.
|
||||
if (os == DRIVER_OS_WINDOWS_XP &&
|
||||
adapterVendor == vendorNVIDIA &&
|
||||
adapterDeviceID == 0x0861 && // GeForce 9400
|
||||
driverVersion == V(6,14,11,7756))
|
||||
{
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
while (info->mOperatingSystem) {
|
||||
|
||||
if (info->mOperatingSystem != DRIVER_OS_ALL &&
|
||||
@ -763,7 +798,6 @@ GfxInfo::GetFeatureStatusImpl(PRInt32 aFeature, PRInt32 *aStatus, nsAString & aS
|
||||
switch (info->mComparisonOp) {
|
||||
case DRIVER_LESS_THAN:
|
||||
match = driverVersion < info->mDriverVersion;
|
||||
suggestedDriverVersion = info->mDriverVersion;
|
||||
break;
|
||||
case DRIVER_LESS_THAN_OR_EQUAL:
|
||||
match = driverVersion <= info->mDriverVersion;
|
||||
@ -808,12 +842,18 @@ GfxInfo::GetFeatureStatusImpl(PRInt32 aFeature, PRInt32 *aStatus, nsAString & aS
|
||||
|
||||
*aStatus = status;
|
||||
|
||||
if (status == FEATURE_BLOCKED_DRIVER_VERSION && suggestedDriverVersion) {
|
||||
aSuggestedDriverVersion.AppendPrintf("%lld.%lld.%lld.%lld",
|
||||
(suggestedDriverVersion & 0xffff000000000000) >> 48,
|
||||
(suggestedDriverVersion & 0x0000ffff00000000) >> 32,
|
||||
(suggestedDriverVersion & 0x00000000ffff0000) >> 16,
|
||||
(suggestedDriverVersion & 0x000000000000ffff));
|
||||
if (status == FEATURE_BLOCKED_DRIVER_VERSION) {
|
||||
if (info->mSuggestedVersion) {
|
||||
aSuggestedDriverVersion.AppendPrintf("%s", info->mSuggestedVersion);
|
||||
} else if (info->mComparisonOp == DRIVER_LESS_THAN &&
|
||||
info->mDriverVersion != allDriverVersions)
|
||||
{
|
||||
aSuggestedDriverVersion.AppendPrintf("%lld.%lld.%lld.%lld",
|
||||
(info->mDriverVersion & 0xffff000000000000) >> 48,
|
||||
(info->mDriverVersion & 0x0000ffff00000000) >> 32,
|
||||
(info->mDriverVersion & 0x00000000ffff0000) >> 16,
|
||||
(info->mDriverVersion & 0x000000000000ffff));
|
||||
}
|
||||
}
|
||||
|
||||
return NS_OK;
|
||||
|
@ -53,7 +53,8 @@ GfxDriverInfo::GfxDriverInfo()
|
||||
mFeatureStatus(nsIGfxInfo::FEATURE_NO_INFO),
|
||||
mComparisonOp(DRIVER_UNKNOWN_COMPARISON),
|
||||
mDriverVersion(0),
|
||||
mDriverVersionMax(0)
|
||||
mDriverVersionMax(0),
|
||||
mSuggestedVersion(nsnull)
|
||||
{}
|
||||
|
||||
GfxDriverInfo::GfxDriverInfo(OperatingSystem os, PRUint32 vendor,
|
||||
@ -61,6 +62,7 @@ GfxDriverInfo::GfxDriverInfo(OperatingSystem os, PRUint32 vendor,
|
||||
PRInt32 feature, PRInt32 featureStatus,
|
||||
VersionComparisonOp op,
|
||||
PRUint64 driverVersion,
|
||||
const char *suggestedVersion /* = nsnull */,
|
||||
bool ownDevices /* = false */)
|
||||
: mOperatingSystem(os),
|
||||
mAdapterVendor(vendor),
|
||||
@ -70,7 +72,8 @@ GfxDriverInfo::GfxDriverInfo(OperatingSystem os, PRUint32 vendor,
|
||||
mFeatureStatus(featureStatus),
|
||||
mComparisonOp(op),
|
||||
mDriverVersion(driverVersion),
|
||||
mDriverVersionMax(0)
|
||||
mDriverVersionMax(0),
|
||||
mSuggestedVersion(suggestedVersion)
|
||||
{}
|
||||
|
||||
GfxDriverInfo::GfxDriverInfo(const GfxDriverInfo& aOrig)
|
||||
@ -80,7 +83,8 @@ GfxDriverInfo::GfxDriverInfo(const GfxDriverInfo& aOrig)
|
||||
mFeatureStatus(aOrig.mFeatureStatus),
|
||||
mComparisonOp(aOrig.mComparisonOp),
|
||||
mDriverVersion(aOrig.mDriverVersion),
|
||||
mDriverVersionMax(aOrig.mDriverVersionMax)
|
||||
mDriverVersionMax(aOrig.mDriverVersionMax),
|
||||
mSuggestedVersion(aOrig.mSuggestedVersion)
|
||||
{
|
||||
// If we're managing the lifetime of the devices array, we have to make a
|
||||
// copy of the original's array.
|
||||
|
@ -79,7 +79,8 @@ struct GfxDriverInfo
|
||||
// array, and it will be deleted when this GfxDriverInfo is destroyed.
|
||||
GfxDriverInfo(OperatingSystem os, PRUint32 vendor, GfxDeviceFamily devices,
|
||||
PRInt32 feature, PRInt32 featureStatus, VersionComparisonOp op,
|
||||
PRUint64 driverVersion, bool ownDevices = false);
|
||||
PRUint64 driverVersion, const char *suggestedVersion = nsnull,
|
||||
bool ownDevices = false);
|
||||
|
||||
GfxDriverInfo();
|
||||
GfxDriverInfo(const GfxDriverInfo&);
|
||||
@ -109,6 +110,8 @@ struct GfxDriverInfo
|
||||
/* versions are assumed to be A.B.C.D packed as 0xAAAABBBBCCCCDDDD */
|
||||
PRUint64 mDriverVersion;
|
||||
PRUint64 mDriverVersionMax;
|
||||
|
||||
const char *mSuggestedVersion;
|
||||
};
|
||||
|
||||
#define GFX_DRIVER_VERSION(a,b,c,d) \
|
||||
|
Loading…
Reference in New Issue
Block a user