Bug 1137716. Try blacklisting Optimus w/ Intel Ironlake Graphics. r=bas
☠☠ backed out by a2e34f98c85a ☠ ☠
authorJeff Muizelaar <jmuizelaar@mozilla.com>
Sat, 21 Mar 2015 15:37:00 -0400
changeset 265306 726f8309756a644bcdfa89f3d854a11a753bb9d8
parent 265305 9ff253e22f9b4fd17bfeb96c3d8c9cf445b2037e
child 265307 76b1809d22ebe04df848f2061cd26a282db1ff13
push id830
push userraliiev@mozilla.com
push dateFri, 19 Jun 2015 19:24:37 +0000
treeherdermozilla-release@932614382a68 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbas
bugs1137716
milestone39.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 1137716. Try blacklisting Optimus w/ Intel Ironlake Graphics. r=bas Hopefully this will help and won't make things worse. We still don't know why this regressed.
widget/GfxDriverInfo.cpp
widget/GfxDriverInfo.h
widget/GfxInfoBase.cpp
widget/windows/GfxInfo.cpp
--- a/widget/GfxDriverInfo.cpp
+++ b/widget/GfxDriverInfo.cpp
@@ -23,37 +23,40 @@ GfxDriverInfo::GfxDriverInfo()
     mAdapterVendor(GfxDriverInfo::GetDeviceVendor(VendorAll)),
     mDevices(allDevices),
     mDeleteDevices(false),
     mFeature(allFeatures),
     mFeatureStatus(nsIGfxInfo::FEATURE_STATUS_OK),
     mComparisonOp(DRIVER_COMPARISON_IGNORED),
     mDriverVersion(0),
     mDriverVersionMax(0),
-    mSuggestedVersion(nullptr)
+    mSuggestedVersion(nullptr),
+    mGpu2(false)
 {}
 
 GfxDriverInfo::GfxDriverInfo(OperatingSystem os, nsAString& vendor,
                              GfxDeviceFamily* devices,
                              int32_t feature, int32_t featureStatus,
                              VersionComparisonOp op,
                              uint64_t driverVersion,
                              const char *suggestedVersion /* = nullptr */,
-                             bool ownDevices /* = false */)
+                             bool ownDevices /* = false */,
+                             bool gpu2 /* = false */)
   : mOperatingSystem(os),
     mOperatingSystemVersion(0),
     mAdapterVendor(vendor),
     mDevices(devices),
     mDeleteDevices(ownDevices),
     mFeature(feature),
     mFeatureStatus(featureStatus),
     mComparisonOp(op),
     mDriverVersion(driverVersion),
     mDriverVersionMax(0),
-    mSuggestedVersion(suggestedVersion)
+    mSuggestedVersion(suggestedVersion),
+    mGpu2(gpu2)
 {}
 
 GfxDriverInfo::GfxDriverInfo(const GfxDriverInfo& aOrig)
   : mOperatingSystem(aOrig.mOperatingSystem),
     mOperatingSystemVersion(aOrig.mOperatingSystemVersion),
     mAdapterVendor(aOrig.mAdapterVendor),
     mFeature(aOrig.mFeature),
     mFeatureStatus(aOrig.mFeatureStatus),
@@ -209,16 +212,45 @@ const GfxDeviceFamily* GfxDriverInfo::Ge
       APPEND_DEVICE(0x7291);
       break;
     case Geforce7300GT:
       APPEND_DEVICE(0x0393);
       break;
     case Nvidia310M:
       APPEND_DEVICE(0x0A70);
       break;
+    case Bug1137716:
+      APPEND_DEVICE(0x0a29);
+      APPEND_DEVICE(0x0a2b);
+      APPEND_DEVICE(0x0a2d);
+      APPEND_DEVICE(0x0a35);
+      APPEND_DEVICE(0x0a6c);
+      APPEND_DEVICE(0x0a70);
+      APPEND_DEVICE(0x0a72);
+      APPEND_DEVICE(0x0a7a);
+      APPEND_DEVICE(0x0caf);
+      // GF180M ids
+      APPEND_DEVICE(0x0de3);
+      APPEND_DEVICE(0x0de8);
+      APPEND_DEVICE(0x0de9);
+      APPEND_DEVICE(0x0dea);
+      APPEND_DEVICE(0x0deb);
+      APPEND_DEVICE(0x0dec);
+      APPEND_DEVICE(0x0ded);
+      APPEND_DEVICE(0x0dee);
+      APPEND_DEVICE(0x0def);
+      APPEND_DEVICE(0x0df0);
+      APPEND_DEVICE(0x0df1);
+      APPEND_DEVICE(0x0df2);
+      APPEND_DEVICE(0x0df3);
+      APPEND_DEVICE(0x0df4);
+      APPEND_DEVICE(0x0df5);
+      APPEND_DEVICE(0x0df6);
+      APPEND_DEVICE(0x0df7);
+      break;
     case AMDRadeonHD5800:
       APPEND_DEVICE(0x6899);
       break;
     // This should never happen, but we get a warning if we don't handle this.
     case DeviceFamilyMax:
       NS_WARNING("Invalid DeviceFamily id");
       break;
   }
--- a/widget/GfxDriverInfo.h
+++ b/widget/GfxDriverInfo.h
@@ -20,16 +20,27 @@
       MOZ_ASSERT(driverComparator == DRIVER_BETWEEN_EXCLUSIVE || \
                  driverComparator == DRIVER_BETWEEN_INCLUSIVE || \
                  driverComparator == DRIVER_BETWEEN_INCLUSIVE_START); \
       GfxDriverInfo info(os, vendor, devices, feature, featureStatus, driverComparator, driverVersion, suggestedVersion); \
       info.mDriverVersionMax = driverVersionMax; \
       mDriverInfo->AppendElement(info); \
     } while (false)
 
+#define APPEND_TO_DRIVER_BLOCKLIST_RANGE_GPU2(os, vendor, devices, feature, featureStatus, driverComparator, driverVersion, driverVersionMax, suggestedVersion) \
+    do { \
+      MOZ_ASSERT(driverComparator == DRIVER_BETWEEN_EXCLUSIVE || \
+                 driverComparator == DRIVER_BETWEEN_INCLUSIVE || \
+                 driverComparator == DRIVER_BETWEEN_INCLUSIVE_START); \
+      GfxDriverInfo info(os, vendor, devices, feature, featureStatus, driverComparator, driverVersion, suggestedVersion, false, true); \
+      info.mDriverVersionMax = driverVersionMax; \
+      mDriverInfo->AppendElement(info); \
+    } while (false)
+
+
 namespace mozilla {
 namespace widget {
 
 enum OperatingSystem {
   DRIVER_OS_UNKNOWN = 0,
   DRIVER_OS_WINDOWS_XP,
   DRIVER_OS_WINDOWS_SERVER_2003,
   DRIVER_OS_WINDOWS_VISTA,
@@ -70,16 +81,17 @@ enum DeviceFamily {
   IntelGMAX4500HD,
   IntelHD3000,
   IntelMobileHDGraphics,
   NvidiaBlockD3D9Layers,
   RadeonX1000,
   Geforce7300GT,
   Nvidia310M,
   AMDRadeonHD5800,
+  Bug1137716,
   DeviceFamilyMax
 };
 
 enum DeviceVendor {
   VendorAll,
   VendorIntel,
   VendorNVIDIA,
   VendorAMD,
@@ -93,17 +105,17 @@ typedef nsTArray<nsString> GfxDeviceFami
 
 struct GfxDriverInfo
 {
   // If |ownDevices| is true, you are transferring ownership of the devices
   // array, and it will be deleted when this GfxDriverInfo is destroyed.
   GfxDriverInfo(OperatingSystem os, nsAString& vendor, GfxDeviceFamily* devices,
                 int32_t feature, int32_t featureStatus, VersionComparisonOp op,
                 uint64_t driverVersion, const char *suggestedVersion = nullptr,
-                bool ownDevices = false);
+                bool ownDevices = false, bool gpu2 = false);
 
   GfxDriverInfo();
   GfxDriverInfo(const GfxDriverInfo&);
   ~GfxDriverInfo();
 
   OperatingSystem mOperatingSystem;
   uint32_t mOperatingSystemVersion;
 
@@ -134,16 +146,18 @@ struct GfxDriverInfo
 
   static const GfxDeviceFamily* GetDeviceFamily(DeviceFamily id);
   static GfxDeviceFamily* mDeviceFamilies[DeviceFamilyMax];
 
   static const nsAString& GetDeviceVendor(DeviceVendor id);
   static nsAString* mDeviceVendors[DeviceVendorMax];
 
   nsString mModel, mHardware, mProduct, mManufacturer;
+
+  bool mGpu2;
 };
 
 #define GFX_DRIVER_VERSION(a,b,c,d) \
   ((uint64_t(a)<<48) | (uint64_t(b)<<32) | (uint64_t(c)<<16) | uint64_t(d))
 
 inline uint64_t
 V(uint32_t a, uint32_t b, uint32_t c, uint32_t d)
 {
--- a/widget/GfxInfoBase.cpp
+++ b/widget/GfxInfoBase.cpp
@@ -601,33 +601,44 @@ GfxInfoBase::GetFeatureStatus(int32_t aF
 int32_t
 GfxInfoBase::FindBlocklistedDeviceInList(const nsTArray<GfxDriverInfo>& info,
                                          nsAString& aSuggestedVersion,
                                          int32_t aFeature,
                                          OperatingSystem os)
 {
   int32_t status = nsIGfxInfo::FEATURE_STATUS_UNKNOWN;
 
-  nsAutoString adapterVendorID;
-  nsAutoString adapterDeviceID;
-  nsAutoString adapterDriverVersionString;
-  if (NS_FAILED(GetAdapterVendorID(adapterVendorID)) ||
-      NS_FAILED(GetAdapterDeviceID(adapterDeviceID)) ||
-      NS_FAILED(GetAdapterDriverVersion(adapterDriverVersionString)))
-  {
-    return 0;
-  }
+  uint32_t i = 0;
+  for (; i < info.Length(); i++) {
+    // XXX: it would be better not to do this everytime round the loop
+    nsAutoString adapterVendorID;
+    nsAutoString adapterDeviceID;
+    nsAutoString adapterDriverVersionString;
+    if (info[i].mGpu2) {
+      if (NS_FAILED(GetAdapterVendorID2(adapterVendorID)) ||
+          NS_FAILED(GetAdapterDeviceID2(adapterDeviceID)) ||
+          NS_FAILED(GetAdapterDriverVersion2(adapterDriverVersionString)))
+      {
+        return 0;
+      }
+    } else {
+      if (NS_FAILED(GetAdapterVendorID(adapterVendorID)) ||
+          NS_FAILED(GetAdapterDeviceID(adapterDeviceID)) ||
+          NS_FAILED(GetAdapterDriverVersion(adapterDriverVersionString)))
+      {
+        return 0;
+      }
+    }
 
 #if defined(XP_WIN) || defined(ANDROID)
-  uint64_t driverVersion;
-  ParseDriverVersion(adapterDriverVersionString, &driverVersion);
+    uint64_t driverVersion;
+    ParseDriverVersion(adapterDriverVersionString, &driverVersion);
 #endif
 
-  uint32_t i = 0;
-  for (; i < info.Length(); i++) {
+
     if (info[i].mOperatingSystem != DRIVER_OS_ALL &&
         info[i].mOperatingSystem != os)
     {
       continue;
     }
 
     if (info[i].mOperatingSystemVersion && info[i].mOperatingSystemVersion != OperatingSystemVersion()) {
         continue;
--- a/widget/windows/GfxInfo.cpp
+++ b/widget/windows/GfxInfo.cpp
@@ -1087,16 +1087,24 @@ GfxInfo::GetGfxDriverInfo()
       nsIGfxInfo::FEATURE_DXVA, nsIGfxInfo::FEATURE_BLOCKED_DEVICE,
       DRIVER_LESS_THAN, GfxDriverInfo::allDriverVersions);
 
     /* Bug 1139503: DXVA crashes with ATI cards on windows 10. */
     APPEND_TO_DRIVER_BLOCKLIST2(DRIVER_OS_WINDOWS_10,
       (nsAString&)GfxDriverInfo::GetDeviceVendor(VendorATI), GfxDriverInfo::allDevices,
       nsIGfxInfo::FEATURE_DXVA, nsIGfxInfo::FEATURE_BLOCKED_DRIVER_VERSION,
       DRIVER_EQUAL, V(15,200,1006,0));
+
+    /* Bug 1137716: XXX this should really check for the matching Intel piece as well.
+     * Unfortunately, we don't have the infrastructure to do that */
+    APPEND_TO_DRIVER_BLOCKLIST_RANGE_GPU2(DRIVER_OS_WINDOWS7,
+        (nsAString&) GfxDriverInfo::GetDeviceVendor(VendorNVIDIA), (GfxDeviceFamily*)GfxDriverInfo::GetDeviceFamily(Bug1137716),
+      GfxDriverInfo::allFeatures, nsIGfxInfo::FEATURE_BLOCKED_DRIVER_VERSION,
+      DRIVER_BETWEEN_INCLUSIVE, V(8,7,12,5730), V(8,17,12,6901), "Nvidia driver > 8.17.12.6901");
+
   }
   return *mDriverInfo;
 }
 
 nsresult
 GfxInfo::GetFeatureStatusImpl(int32_t aFeature,
                               int32_t *aStatus, 
                               nsAString & aSuggestedDriverVersion,