Bug 729817 - Block the Nouveau 3D driver as it's installed by default on OpenSuse 12.1 and crashes - r=mattwoodrow
☠☠ backed out by 44de0ed9fa1d ☠ ☠
authorBenoit Jacob <bjacob@mozilla.com>
Thu, 23 Feb 2012 17:23:29 -0500
changeset 87579 b638c0deeafa9b8785dc74dd4a4b38f1580abc73
parent 87578 512df80d7ca4d0ce2dd9c2128bd8a6f5c2661f83
child 87580 a180e202f229c64ee57c1777dc7d3be13d7b3c71
push id22133
push usermak77@bonardo.net
push dateFri, 24 Feb 2012 10:23:30 +0000
treeherdermozilla-central@fbcdc2c87df8 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmattwoodrow
bugs729817
milestone13.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 729817 - Block the Nouveau 3D driver as it's installed by default on OpenSuse 12.1 and crashes - r=mattwoodrow
widget/xpwidgets/GfxInfoX11.cpp
widget/xpwidgets/GfxInfoX11.h
--- a/widget/xpwidgets/GfxInfoX11.cpp
+++ b/widget/xpwidgets/GfxInfoX11.cpp
@@ -67,16 +67,17 @@ GfxInfo::Init()
 {
     mGLMajorVersion = 0;
     mMajorVersion = 0;
     mMinorVersion = 0;
     mRevisionVersion = 0;
     mIsMesa = false;
     mIsNVIDIA = false;
     mIsFGLRX = false;
+    mIsNouveau = false;
     mHasTextureFromPixmap = false;
     return GfxInfoBase::Init();
 }
 
 void
 GfxInfo::GetData()
 {
     // to understand this function, see bug 639842. We retrieve the OpenGL driver information in a
@@ -215,16 +216,18 @@ GfxInfo::GetData()
     // the actual driver version numbers should be expected to be found (whereToReadVersionNumbers)
     const char *whereToReadVersionNumbers = nsnull;
     const char *Mesa_in_version_string = strstr(mVersion.get(), "Mesa");
     if (Mesa_in_version_string) {
         mIsMesa = true;
         // 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"
         // note that here the vendor and version strings behave differently, that's why we don't put this above
         // alongside Mesa_in_version_string.
         const char *NVIDIA_in_version_string = strstr(mVersion.get(), "NVIDIA");
         if (NVIDIA_in_version_string)
             whereToReadVersionNumbers = NVIDIA_in_version_string + strlen("NVIDIA");
@@ -326,17 +329,20 @@ GfxInfo::GetFeatureStatusImpl(PRInt32 aF
           !strcmp(mRenderer.get(), "GeForce 9400/PCI/SSE2") &&
           !strcmp(mVersion.get(), "3.2.0 NVIDIA 190.42"))
       {
         *aStatus = nsIGfxInfo::FEATURE_NO_INFO;
         return NS_OK;
       }
 
       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");
         }
       } else if (mIsNVIDIA) {
         if (version(mMajorVersion, mMinorVersion, mRevisionVersion) < version(257,21)) {
           *aStatus = nsIGfxInfo::FEATURE_BLOCKED_DRIVER_VERSION;
           aSuggestedDriverVersion.AssignLiteral("NVIDIA 257.21");
         }
--- a/widget/xpwidgets/GfxInfoX11.h
+++ b/widget/xpwidgets/GfxInfoX11.h
@@ -93,17 +93,17 @@ protected:
                                         OperatingSystem* aOS = nsnull);
   virtual const nsTArray<GfxDriverInfo>& GetGfxDriverInfo();
 
 private:
   nsCString mVendor;
   nsCString mRenderer;
   nsCString mVersion;
   nsCString mAdapterDescription;
-  bool mIsMesa, mIsNVIDIA, mIsFGLRX;
+  bool mIsMesa, mIsNVIDIA, mIsFGLRX, mIsNouveau;
   bool mHasTextureFromPixmap;
   int mGLMajorVersion, mMajorVersion, mMinorVersion, mRevisionVersion;
 
   void AddCrashReportAnnotations();
 };
 
 } // namespace widget
 } // namespace mozilla