Bug 729817 - Block the Nouveau 3D driver as it's installed by default on OpenSuse 12.1 and crashes - r=mattwoodrow

This commit is contained in:
Benoit Jacob 2012-02-23 17:23:29 -05:00
parent 326d0228f6
commit 893044e0f2
2 changed files with 8 additions and 2 deletions

View File

@ -72,6 +72,7 @@ GfxInfo::Init()
mIsMesa = false;
mIsNVIDIA = false;
mIsFGLRX = false;
mIsNouveau = false;
mHasTextureFromPixmap = false;
return GfxInfoBase::Init();
}
@ -220,6 +221,8 @@ GfxInfo::GetData()
// with Mesa, the version string contains "Mesa major.minor" and that's all the version information we get:
// there is no actual driver version info.
whereToReadVersionNumbers = Mesa_in_version_string + strlen("Mesa");
if (strcasestr(mVendor.get(), "nouveau"))
mIsNouveau = true;
} else if (strstr(mVendor.get(), "NVIDIA Corporation")) {
mIsNVIDIA = true;
// with the NVIDIA driver, the version string contains "NVIDIA major.minor"
@ -330,7 +333,10 @@ GfxInfo::GetFeatureStatusImpl(PRInt32 aFeature,
}
if (mIsMesa) {
if (version(mMajorVersion, mMinorVersion, mRevisionVersion) < version(7,10,3)) {
if (mIsNouveau) {
*aStatus = nsIGfxInfo::FEATURE_BLOCKED_DRIVER_VERSION;
aSuggestedDriverVersion.AssignLiteral("<Not the Nouveau driver>");
} else if (version(mMajorVersion, mMinorVersion, mRevisionVersion) < version(7,10,3)) {
*aStatus = nsIGfxInfo::FEATURE_BLOCKED_DRIVER_VERSION;
aSuggestedDriverVersion.AssignLiteral("Mesa 7.10.3");
}

View File

@ -98,7 +98,7 @@ private:
nsCString mRenderer;
nsCString mVersion;
nsCString mAdapterDescription;
bool mIsMesa, mIsNVIDIA, mIsFGLRX;
bool mIsMesa, mIsNVIDIA, mIsFGLRX, mIsNouveau;
bool mHasTextureFromPixmap;
int mGLMajorVersion, mMajorVersion, mMinorVersion, mRevisionVersion;