summarylogtreecommitdiffstats
path: root/enable-vaapi.patch
diff options
context:
space:
mode:
Diffstat (limited to 'enable-vaapi.patch')
-rw-r--r--enable-vaapi.patch71
1 files changed, 36 insertions, 35 deletions
diff --git a/enable-vaapi.patch b/enable-vaapi.patch
index 45dd1563afe6..1ad3196e3e84 100644
--- a/enable-vaapi.patch
+++ b/enable-vaapi.patch
@@ -40,7 +40,7 @@ Index: dev/chrome/browser/about_flags.cc
===================================================================
--- dev.orig/chrome/browser/about_flags.cc
+++ dev/chrome/browser/about_flags.cc
-@@ -1443,7 +1443,7 @@ const FeatureEntry kFeatureEntries[] = {
+@@ -1420,7 +1420,7 @@ const FeatureEntry kFeatureEntries[] = {
"disable-accelerated-video-decode",
flag_descriptions::kAcceleratedVideoDecodeName,
flag_descriptions::kAcceleratedVideoDecodeDescription,
@@ -48,8 +48,8 @@ Index: dev/chrome/browser/about_flags.cc
+ kOsAll,
SINGLE_DISABLE_VALUE_TYPE(switches::kDisableAcceleratedVideoDecode),
},
- #if defined(OS_WIN)
-@@ -2000,10 +2000,10 @@ const FeatureEntry kFeatureEntries[] = {
+ {
+@@ -1867,10 +1867,10 @@ const FeatureEntry kFeatureEntries[] = {
FEATURE_VALUE_TYPE(service_manager::features::kXRSandbox)},
#endif // ENABLE_ISOLATED_XR_SERVICE
#endif // ENABLE_VR
@@ -61,12 +61,12 @@ Index: dev/chrome/browser/about_flags.cc
+ flag_descriptions::kAcceleratedMjpegDecodeDescription, kOsCrOS | kOsLinux,
SINGLE_DISABLE_VALUE_TYPE(switches::kDisableAcceleratedMjpegDecode)},
#endif // OS_CHROMEOS
- {"v8-cache-options", flag_descriptions::kV8CacheOptionsName,
+ {"system-keyboard-lock", flag_descriptions::kSystemKeyboardLockName,
Index: dev/chrome/browser/flag_descriptions.cc
===================================================================
--- dev.orig/chrome/browser/flag_descriptions.cc
+++ dev/chrome/browser/flag_descriptions.cc
-@@ -2972,9 +2972,7 @@ const char kMacViewsTaskManagerDescripti
+@@ -2789,9 +2789,7 @@ const char kMacSystemMediaPermissionsInf
#endif
@@ -77,7 +77,7 @@ Index: dev/chrome/browser/flag_descriptions.cc
const char kAcceleratedMjpegDecodeName[] =
"Hardware-accelerated mjpeg decode for captured frame";
-@@ -2982,6 +2980,12 @@ const char kAcceleratedMjpegDecodeDescri
+@@ -2799,6 +2797,12 @@ const char kAcceleratedMjpegDecodeDescri
"Enable hardware-accelerated mjpeg decode for captured frame where "
"available.";
@@ -94,7 +94,7 @@ Index: dev/chrome/browser/flag_descriptions.h
===================================================================
--- dev.orig/chrome/browser/flag_descriptions.h
+++ dev/chrome/browser/flag_descriptions.h
-@@ -1755,13 +1755,17 @@ extern const char kPermissionPromptPersi
+@@ -1659,13 +1659,17 @@ extern const char kPermissionPromptPersi
#endif // defined(OS_MACOSX)
@@ -127,7 +127,7 @@ Index: dev/content/gpu/BUILD.gn
import("//ui/ozone/ozone.gni")
# See //content/BUILD.gn for how this works.
-@@ -136,4 +137,8 @@ target(link_target_type, "gpu_sources")
+@@ -128,4 +129,8 @@ target(link_target_type, "gpu_sources")
(!is_chromecast || is_cast_desktop_build)) {
configs += [ "//build/config/linux/dri" ]
}
@@ -140,7 +140,7 @@ Index: dev/gpu/config/software_rendering_list.json
===================================================================
--- dev.orig/gpu/config/software_rendering_list.json
+++ dev/gpu/config/software_rendering_list.json
-@@ -370,17 +370,6 @@
+@@ -369,17 +369,6 @@
]
},
{
@@ -162,8 +162,8 @@ Index: dev/media/base/media_switches.cc
===================================================================
--- dev.orig/media/base/media_switches.cc
+++ dev/media/base/media_switches.cc
-@@ -506,7 +506,7 @@ bool IsVideoCaptureAcceleratedJpegDecodi
- switches::kUseFakeJpegDecodeAccelerator)) {
+@@ -528,7 +528,7 @@ bool IsVideoCaptureAcceleratedJpegDecodi
+ switches::kUseFakeMjpegDecodeAccelerator)) {
return true;
}
-#if defined(OS_CHROMEOS)
@@ -183,7 +183,7 @@ Index: dev/media/filters/BUILD.gn
jumbo_source_set("filters") {
# Do not expand the visibility here without double-checking with OWNERS, this
-@@ -212,7 +213,7 @@ jumbo_source_set("filters") {
+@@ -196,7 +197,7 @@ jumbo_source_set("filters") {
deps += [ "//media/base/android" ]
}
@@ -196,7 +196,7 @@ Index: dev/media/gpu/BUILD.gn
===================================================================
--- dev.orig/media/gpu/BUILD.gn
+++ dev/media/gpu/BUILD.gn
-@@ -577,6 +577,7 @@ if (is_chromeos || is_linux) {
+@@ -521,6 +521,7 @@ if (use_v4l2_codec || use_vaapi || is_ma
if (use_ozone) {
deps += [ "//ui/ozone" ]
}
@@ -208,7 +208,7 @@ Index: dev/media/gpu/gpu_video_decode_accelerator_factory.cc
===================================================================
--- dev.orig/media/gpu/gpu_video_decode_accelerator_factory.cc
+++ dev/media/gpu/gpu_video_decode_accelerator_factory.cc
-@@ -183,6 +183,8 @@ GpuVideoDecodeAcceleratorFactory::Create
+@@ -171,6 +171,8 @@ GpuVideoDecodeAcceleratorFactory::Create
vda = (this->*create_vda_function)(workarounds, gpu_preferences, media_log);
if (vda && vda->Initialize(config, client))
return vda;
@@ -217,7 +217,7 @@ Index: dev/media/gpu/gpu_video_decode_accelerator_factory.cc
}
return nullptr;
-@@ -241,6 +243,7 @@ GpuVideoDecodeAcceleratorFactory::Create
+@@ -229,6 +231,7 @@ GpuVideoDecodeAcceleratorFactory::Create
const gpu::GpuDriverBugWorkarounds& workarounds,
const gpu::GpuPreferences& gpu_preferences,
MediaLog* media_log) const {
@@ -249,24 +249,24 @@ Index: dev/media/gpu/vaapi/vaapi_video_decode_accelerator.cc
===================================================================
--- dev.orig/media/gpu/vaapi/vaapi_video_decode_accelerator.cc
+++ dev/media/gpu/vaapi/vaapi_video_decode_accelerator.cc
-@@ -74,6 +74,7 @@ void CloseGpuMemoryBufferHandle(const gf
+@@ -64,6 +64,7 @@ void ReportToUMA(VAVDADecoderFailure fai
+ VAVDA_DECODER_FAILURES_MAX + 1);
}
- #endif
+#if defined(OS_ANDROID) || defined(OS_CHROMEOS)
// Returns true if the CPU is an Intel Gemini Lake or later (including Kaby
// Lake) Cpu platform id's are referenced from the following file in kernel
// source arch/x86/include/asm/intel-family.h
-@@ -103,6 +104,7 @@ bool IsSkyLakeOrLater() {
- cpuid.model() >= kFirstSkyLakeModelId;
- return is_sky_lake_or_later;
+@@ -76,6 +77,7 @@ bool IsGeminiLakeOrLater() {
+ cpuid.model() >= kGeminiLakeModelId;
+ return is_geminilake_or_later;
}
+#endif
} // namespace
-@@ -652,6 +654,10 @@ void VaapiVideoDecodeAccelerator::Assign
- const unsigned int va_format = GetVaFormatForVideoCodecProfile(profile_);
+@@ -635,6 +637,10 @@ void VaapiVideoDecodeAccelerator::Assign
+ va_surface_format_ = GetVaFormatForVideoCodecProfile(profile_);
std::vector<VASurfaceID> va_surface_ids;
+ // Nvidia doesn't support VAProfileNone, so don't try to create a temporary
@@ -276,7 +276,7 @@ Index: dev/media/gpu/vaapi/vaapi_video_decode_accelerator.cc
// If we aren't in BufferAllocationMode::kNone, we have to allocate a
// |vpp_vaapi_wrapper_| for VaapiPicture to DownloadFromSurface() the VA's
// internal decoded frame.
-@@ -665,6 +671,7 @@ void VaapiVideoDecodeAccelerator::Assign
+@@ -648,6 +654,7 @@ void VaapiVideoDecodeAccelerator::Assign
NotifyError(PLATFORM_FAILURE);
}
}
@@ -284,7 +284,7 @@ Index: dev/media/gpu/vaapi/vaapi_video_decode_accelerator.cc
for (size_t i = 0; i < buffers.size(); ++i) {
DCHECK(requested_pic_size_ == buffers[i].size());
-@@ -673,9 +680,13 @@ void VaapiVideoDecodeAccelerator::Assign
+@@ -656,9 +663,13 @@ void VaapiVideoDecodeAccelerator::Assign
// only used as a copy destination. Therefore, the VaapiWrapper used and
// owned by |picture| is |vpp_vaapi_wrapper_|.
std::unique_ptr<VaapiPicture> picture = vaapi_picture_factory_->Create(
@@ -298,7 +298,7 @@ Index: dev/media/gpu/vaapi/vaapi_video_decode_accelerator.cc
make_context_current_cb_, bind_image_cb_, buffers[i]);
RETURN_AND_NOTIFY_ON_FAILURE(picture, "Failed creating a VaapiPicture",
PLATFORM_FAILURE, );
-@@ -1091,6 +1102,9 @@ VaapiVideoDecodeAccelerator::GetSupporte
+@@ -1077,6 +1088,9 @@ VaapiVideoDecodeAccelerator::GetSupporte
VaapiVideoDecodeAccelerator::BufferAllocationMode
VaapiVideoDecodeAccelerator::DecideBufferAllocationMode() {
@@ -308,9 +308,9 @@ Index: dev/media/gpu/vaapi/vaapi_video_decode_accelerator.cc
// TODO(crbug.com/912295): Enable a better BufferAllocationMode for IMPORT
// |output_mode_| as well.
if (output_mode_ == VideoDecodeAccelerator::Config::OutputMode::IMPORT)
-@@ -1123,6 +1137,7 @@ VaapiVideoDecodeAccelerator::DecideBuffe
+@@ -1109,6 +1123,7 @@ VaapiVideoDecodeAccelerator::DecideBuffe
return BufferAllocationMode::kReduced;
-
+
return BufferAllocationMode::kSuperReduced;
+#endif
}
@@ -320,7 +320,7 @@ Index: dev/media/gpu/vaapi/vaapi_wrapper.cc
===================================================================
--- dev.orig/media/gpu/vaapi/vaapi_wrapper.cc
+++ dev/media/gpu/vaapi/vaapi_wrapper.cc
-@@ -252,6 +252,11 @@ void VADisplayState::PreSandboxInitializ
+@@ -250,6 +250,11 @@ void VADisplayState::PreSandboxInitializ
base::File::FLAG_OPEN | base::File::FLAG_READ | base::File::FLAG_WRITE);
if (drm_file.IsValid())
VADisplayState::Get()->SetDrmFd(drm_file.GetPlatformFile());
@@ -332,17 +332,18 @@ Index: dev/media/gpu/vaapi/vaapi_wrapper.cc
}
VADisplayState::VADisplayState()
-@@ -279,9 +284,6 @@ bool VADisplayState::Initialize() {
+@@ -277,10 +282,6 @@ bool VADisplayState::Initialize() {
}
bool VADisplayState::InitializeOnce() {
-- static_assert(VA_MAJOR_VERSION >= 1 && VA_MINOR_VERSION >= 1,
-- "Requires VA-API >= 1.1.0");
+- static_assert(
+- VA_MAJOR_VERSION >= 2 || (VA_MAJOR_VERSION == 1 && VA_MINOR_VERSION >= 1),
+- "Requires VA-API >= 1.1.0");
-
switch (gl::GetGLImplementation()) {
case gl::kGLImplementationEGLGLES2:
va_display_ = vaGetDisplayDRM(drm_fd_.get());
-@@ -289,10 +291,10 @@ bool VADisplayState::InitializeOnce() {
+@@ -287,10 +289,10 @@ bool VADisplayState::InitializeOnce() {
case gl::kGLImplementationDesktopGL:
#if defined(USE_X11)
va_display_ = vaGetDisplay(gfx::GetXDisplay());
@@ -356,7 +357,7 @@ Index: dev/media/gpu/vaapi/vaapi_wrapper.cc
break;
// Cannot infer platform from GL, try all available displays
case gl::kGLImplementationNone:
-@@ -325,8 +327,19 @@ bool VADisplayState::InitializeOnce() {
+@@ -323,8 +325,19 @@ bool VADisplayState::InitializeOnce() {
int major_version, minor_version;
VAStatus va_res = vaInitialize(va_display_, &major_version, &minor_version);
if (va_res != VA_STATUS_SUCCESS) {
@@ -378,7 +379,7 @@ Index: dev/media/gpu/vaapi/vaapi_wrapper.cc
}
va_initialized_ = true;
-@@ -334,7 +347,7 @@ bool VADisplayState::InitializeOnce() {
+@@ -332,7 +345,7 @@ bool VADisplayState::InitializeOnce() {
va_vendor_string_ = vaQueryVendorString(va_display_);
DLOG_IF(WARNING, va_vendor_string_.empty())
<< "Vendor string empty or error reading.";
@@ -387,7 +388,7 @@ Index: dev/media/gpu/vaapi/vaapi_wrapper.cc
<< va_vendor_string_;
// The VAAPI version is determined from what is loaded on the system by
-@@ -638,7 +651,7 @@ bool VASupportedProfiles::AreAttribsSupp
+@@ -665,7 +678,7 @@ bool VASupportedProfiles::AreAttribsSupp
if (attribs[i].type != required_attribs[i].type ||
(attribs[i].value & required_attribs[i].value) !=
required_attribs[i].value) {