Skip to content

Commit

Permalink
media/gpu: disable-VP8 decoding on BDW via gpu bugs
Browse files Browse the repository at this point in the history
This CL adds a GPU driver bug workaround for VP8 video decoding on
Broadwell (BDW) devices, which are hard-disabled via driver patch
now. Having this disabling in chrome:gpu is better for developers
and testers on the field.

[1] https://source.chromium.org/chromiumos/chromiumos/codesearch/+/master:src/third_party/chromiumos-overlay/x11-libs/libva-intel-driver/files/Disable-VP8-decoder-on-BDW.patch;bpv=1

Bug: 1126058, b/167923822
Change-Id: Ifb74a66dd8a0e4d4b081b7e4bc42009803f4be72
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2398906
Reviewed-by: Zhenyao Mo <zmo@chromium.org>
Reviewed-by: Dale Curtis <dalecurtis@chromium.org>
Commit-Queue: Miguel Casas <mcasas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#805111}
  • Loading branch information
yellowdoge authored and Commit Bot committed Sep 8, 2020
1 parent cf79f2a commit a77bc78
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 0 deletions.
15 changes: 15 additions & 0 deletions gpu/config/gpu_driver_bug_list.json
Original file line number Diff line number Diff line change
Expand Up @@ -3516,6 +3516,21 @@
"features": [
"disable_accelerated_vp8_encode"
]
},
{
"id": 349,
"cr_bugs": [1126058],
"description": "VP8 decoding hangs on Intel Broadwell",
"os": {
"type": "chromeos"
},
"vendor_id": "0x8086",
"intel_gpu_series": [
"broadwell"
],
"features": [
"disable_accelerated_vp8_decode"
]
}
]
}
8 changes: 8 additions & 0 deletions media/gpu/gpu_video_decode_accelerator_factory.cc
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,14 @@ gpu::VideoDecodeAcceleratorCapabilities GetDecoderCapabilitiesInternal(
vda_profiles = VaapiVideoDecodeAccelerator::GetSupportedProfiles();
GpuVideoAcceleratorUtil::InsertUniqueDecodeProfiles(
vda_profiles, &capabilities.supported_profiles);

if (workarounds.disable_accelerated_vp8_decode) {
base::EraseIf(
capabilities.supported_profiles,
[](const VideoDecodeAccelerator::SupportedProfile& supported_profile) {
return supported_profile.profile == VP8PROFILE_ANY;
});
}
#endif
#elif defined(OS_MAC)
capabilities.supported_profiles =
Expand Down
10 changes: 10 additions & 0 deletions media/mojo/services/gpu_mojo_media_client.cc
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,16 @@ GpuMojoMediaClient::GetSupportedVideoDecoderConfigs() {
cros_supported_configs_ =
ChromeosVideoDecoderFactory::GetSupportedConfigs();
}

if (cros_supported_configs_.has_value() &&
gpu_workarounds_.disable_accelerated_vp8_decode) {
base::EraseIf(*cros_supported_configs_,
[](const SupportedVideoDecoderConfig& config) {
return VP8PROFILE_MIN <= config.profile_min &&
config.profile_max <= VP8PROFILE_MAX;
});
}

supported_config_map[VideoDecoderImplementation::kDefault] =
*cros_supported_configs_;
return supported_config_map;
Expand Down

0 comments on commit a77bc78

Please sign in to comment.