chromium/fixvaapionintel.patch

50 lines
2.0 KiB
Diff
Raw Normal View History

2020-02-27 16:27:21 +00:00
From 9ff06536caf7ea51aad9fd2bb649c858eaf7ee84 Mon Sep 17 00:00:00 2001
From: Akarshan Biswas <akarshanbiswas@fedoraproject.org>
Date: Sat, 26 Oct 2019 10:06:30 +0530
Subject: [PATCH] Move offending function to chromeos only
---
media/gpu/vaapi/vaapi_video_decode_accelerator.cc | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/media/gpu/vaapi/vaapi_video_decode_accelerator.cc b/media/gpu/vaapi/vaapi_video_decode_accelerator.cc
index f04b60f58..3e7865503 100644
--- a/media/gpu/vaapi/vaapi_video_decode_accelerator.cc
+++ b/media/gpu/vaapi/vaapi_video_decode_accelerator.cc
@@ -63,6 +63,7 @@ void ReportToUMA(VAVDADecoderFailure failure) {
VAVDA_DECODER_FAILURES_MAX + 1);
}
+#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
@@ -75,6 +76,7 @@ bool IsGeminiLakeOrLater() {
cpuid.model() >= kGeminiLakeModelId;
return is_geminilake_or_later;
}
+#endif
} // namespace
@@ -1091,6 +1093,8 @@ VaapiVideoDecodeAccelerator::DecideBufferAllocationMode() {
if (output_mode_ == VideoDecodeAccelerator::Config::OutputMode::IMPORT)
return BufferAllocationMode::kNormal;
+#if defined(OS_ANDROID) || defined(OS_CHROMEOS)
+ // Move this to chromeOs only as it is causing problem in some intel linux drivers
// On Gemini Lake, Kaby Lake and later we can pass to libva the client's
// PictureBuffers to decode onto, which skips the use of the Vpp unit and its
// associated format reconciliation copy, avoiding all internal buffer
@@ -1107,6 +1111,7 @@ VaapiVideoDecodeAccelerator::DecideBufferAllocationMode() {
num_extra_pics_ = 3;
return BufferAllocationMode::kNone;
}
+#endif
// If we're here, we have to use the Vpp unit and allocate buffers for
// |decoder_|; usually we'd have to allocate the |decoder_|s
--
2.21.0