Blob Blame History Raw
diff -up firefox-101.0/gfx/thebes/gfxPlatformGtk.cpp.D147874.diff firefox-101.0/gfx/thebes/gfxPlatformGtk.cpp
--- firefox-101.0/gfx/thebes/gfxPlatformGtk.cpp.D147874.diff	2022-05-27 01:16:54.000000000 +0200
+++ firefox-101.0/gfx/thebes/gfxPlatformGtk.cpp	2022-06-07 11:16:03.791419558 +0200
@@ -233,13 +233,7 @@ void gfxPlatformGtk::InitDmabufConfig()
 void gfxPlatformGtk::InitVAAPIConfig() {
   FeatureState& feature = gfxConfig::GetFeature(Feature::VAAPI);
 #ifdef MOZ_WAYLAND
-  feature.DisableByDefault(FeatureStatus::Disabled,
-                           "VAAPI is disabled by default",
-                           "FEATURE_VAAPI_DISABLED"_ns);
-
-  if (StaticPrefs::media_ffmpeg_vaapi_enabled()) {
-    feature.UserForceEnable("Force enabled by pref");
-  }
+  feature.EnableByDefault();
 
   nsCString failureId;
   int32_t status;
@@ -253,6 +247,10 @@ void gfxPlatformGtk::InitVAAPIConfig() {
                     failureId);
   }
 
+  if (StaticPrefs::media_ffmpeg_vaapi_enabled()) {
+    feature.UserForceEnable("Force enabled by pref");
+  }
+
   if (!gfxVars::UseEGL()) {
     feature.ForceDisable(FeatureStatus::Unavailable, "Requires EGL",
                          "FEATURE_FAILURE_REQUIRES_EGL"_ns);
diff -up firefox-101.0/widget/gtk/GfxInfo.cpp.D147874.diff firefox-101.0/widget/gtk/GfxInfo.cpp
--- firefox-101.0/widget/gtk/GfxInfo.cpp.D147874.diff	2022-05-27 01:17:06.000000000 +0200
+++ firefox-101.0/widget/gtk/GfxInfo.cpp	2022-06-07 09:52:54.416701418 +0200
@@ -843,6 +843,31 @@ const nsTArray<GfxDriverInfo>& GfxInfo::
         V(495, 44, 0, 0), "FEATURE_FAILURE_NO_GBM", "495.44.0");
 
     ////////////////////////////////////
+    // FEATURE_VAAPI
+    APPEND_TO_DRIVER_BLOCKLIST_EXT(
+        OperatingSystem::Linux, ScreenSizeStatus::All, BatteryStatus::All,
+        DesktopEnvironment::All, WindowProtocol::All, DriverVendor::MesaAll,
+        DeviceFamily::All, nsIGfxInfo::FEATURE_VAAPI,
+        nsIGfxInfo::FEATURE_BLOCKED_DRIVER_VERSION, DRIVER_LESS_THAN,
+        V(21, 0, 0, 0), "FEATURE_ROLLOUT_VAAPI_MESA", "Mesa 21.0.0.0");
+
+    // Disable on all NVIDIA hardware
+    APPEND_TO_DRIVER_BLOCKLIST_EXT(
+        OperatingSystem::Linux, ScreenSizeStatus::All, BatteryStatus::All,
+        DesktopEnvironment::All, WindowProtocol::All, DriverVendor::All,
+        DeviceFamily::NvidiaAll, nsIGfxInfo::FEATURE_VAAPI,
+        nsIGfxInfo::FEATURE_BLOCKED_DEVICE, DRIVER_COMPARISON_IGNORED,
+        V(0, 0, 0, 0), "FEATURE_FAILURE_VAAPI_NO_LINUX_NVIDIA", "");
+
+    // Disable on all AMD devices not using Mesa.
+    APPEND_TO_DRIVER_BLOCKLIST_EXT(
+        OperatingSystem::Linux, ScreenSizeStatus::All, BatteryStatus::All,
+        DesktopEnvironment::All, WindowProtocol::All, DriverVendor::NonMesaAll,
+        DeviceFamily::AtiAll, nsIGfxInfo::FEATURE_VAAPI,
+        nsIGfxInfo::FEATURE_BLOCKED_DEVICE, DRIVER_COMPARISON_IGNORED,
+        V(0, 0, 0, 0), "FEATURE_FAILURE_VAAPI_NO_LINUX_AMD", "");
+
+    ////////////////////////////////////
     // FEATURE_WEBRENDER_PARTIAL_PRESENT
     APPEND_TO_DRIVER_BLOCKLIST_EXT(
         OperatingSystem::Linux, ScreenSizeStatus::All, BatteryStatus::All,