Commit 1980f0cb authored by Hirokazu Honda's avatar Hirokazu Honda Committed by Chromium LUCI CQ

Revert "media/gpu/test/VFValidator: Workaround the buffer synchronization problem on intel 3.18"

This reverts commit 276dd2ba.

Reason for revert: The root cause of the synchronization is fixed.
Removes this workaround.

Original change's description:
> media/gpu/test/VFValidator: Workaround the buffer synchronization problem on intel 3.18
>
> There is a synchronization problem on the mapped buffer on intel
> skylake devices. This is due to some missing 9165 patches in kernel
> 3.18, and thus will be fixed if the kernel is upreved to 4.4 or
> newer. This bug causes a decoded content validation failure in
> video_decode_accelerator_tests.
> This is a workaround to this bug; usleep() is added after the
> buffer is mapped and before the frame validation if the kernel
> version is 3.18 and the processor is Skylake.
>
> Bug: b:149808895
> Test: video_decode_accelerator_tests on sentry
> Change-Id: Ib77ebe0b83834e4d91bc994cbe6912348862e021
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2371724
> Commit-Queue: Hirokazu Honda <hiroh@chromium.org>
> Reviewed-by: Miguel Casas <mcasas@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#801614}

TBR=mcasas@chromium.org,hiroh@chromium.org,andrescj@chromium.org

# Not skipping CQ checks because original CL landed > 1 day ago.

Bug: b:149808895
Change-Id: Id0f1bdcc486effef2c6d3fd64275d71051020028
Test: None
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2631645Reviewed-by: default avatarHirokazu Honda <hiroh@chromium.org>
Commit-Queue: Hirokazu Honda <hiroh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#843919}
parent 990c5e15
......@@ -5,19 +5,14 @@
#include "media/gpu/test/video_frame_validator.h"
#include "base/bind.h"
#include "base/cpu.h"
#include "base/files/file.h"
#include "base/hash/md5.h"
#include "base/memory/ptr_util.h"
#include "base/no_destructor.h"
#include "base/numerics/safe_conversions.h"
#include "base/strings/string_util.h"
#include "base/strings/stringprintf.h"
#include "base/system/sys_info.h"
#include "build/build_config.h"
#include "build/chromeos_buildflags.h"
#include "media/base/video_frame.h"
#include "media/gpu/buildflags.h"
#include "media/gpu/macros.h"
#include "media/gpu/test/image_quality_metrics.h"
#include "media/gpu/test/video_test_helpers.h"
......@@ -225,27 +220,6 @@ std::unique_ptr<VideoFrameValidator::MismatchedFrameInfo>
MD5VideoFrameValidator::Validate(scoped_refptr<const VideoFrame> frame,
size_t frame_index) {
DCHECK_CALLED_ON_VALID_SEQUENCE(validator_thread_sequence_checker_);
#if BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_CHROMEOS_LACROS)
// b/149808895: There is a bug in the synchronization on mapped buffers, which
// causes the frame validation failure. The bug is due to some missing i915
// patches in kernel v3.18. The bug will be fixed if the kernel is upreved to
// v4.4 or newer. Inserts usleep as a short term workaround to the
// synchronization bug until the kernel uprev is complete for all the v3.18
// devices. Since this bug only occurs in Skylake just because they are 3.18
// devices, we also filter by the processor.
const static std::string kernel_version = base::SysInfo::KernelVersion();
if (base::StartsWith(kernel_version, "3.18")) {
constexpr int kPentiumAndLaterFamily = 0x06;
constexpr int kSkyLakeModelId = 0x5E;
constexpr int kSkyLake_LModelId = 0x4E;
static base::NoDestructor<base::CPU> cpuid;
static bool is_skylake = cpuid->family() == kPentiumAndLaterFamily &&
(cpuid->model() == kSkyLakeModelId ||
cpuid->model() == kSkyLake_LModelId);
if (is_skylake)
usleep(10);
}
#endif // BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_CHROMEOS_LACROS)
if (frame->format() != validation_format_) {
frame = ConvertVideoFrame(frame.get(), validation_format_);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment