Commit d4a6180c authored by Miguel Casas's avatar Miguel Casas Committed by Commit Bot

ui/display/manager: Disable filling up HDR ColorSpace on ChromeOS AMD

ChromeOS AMD devices seem to have troubles scanning out high-bit depth
framebuffers; this CL disables creating such DisplayColorSpaces on
said platforms while we fix that.

(FTR there're no HDR-capable panels on AMD Chromebooks, but users can
connect an external HDR screen, hitting this path.)

Bug: b/169576243, b/165825264
Change-Id: I7e451d9817fee34d01c7d1ef943ef43fb1dce4be
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2435925Reviewed-by: default avatarDaniele Castagna <dcastagna@chromium.org>
Commit-Queue: Miguel Casas <mcasas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#811384}
parent 6dbadbf0
......@@ -14,6 +14,8 @@
#include "base/check_op.h"
#include "base/command_line.h"
#include "base/cpu.h"
#include "base/no_destructor.h"
#include "base/stl_util.h"
#include "ui/base/l10n/l10n_util.h"
#include "ui/base/user_activity/user_activity_detector.h"
......@@ -108,6 +110,13 @@ gfx::DisplayColorSpaces FillDisplayColorSpaces(
gfx::DisplayColorSpaces display_color_spaces = gfx::DisplayColorSpaces(
sdr_color_space, DisplaySnapshot::PrimaryFormat());
// AMD Chromebooks have issues playing back and scanning out high bit depth
// content. TODO(b/169576243, b/165825264): remove this provision when fixed.
static const base::NoDestructor<base::CPU> cpuid;
static const bool is_amd = cpuid->vendor_name() == "AuthenticAMD";
if (is_amd)
return display_color_spaces;
if (allow_high_bit_depth && snapshot_color_space.IsHDR()) {
constexpr float kSDRJoint = 0.75;
constexpr float kHDRLevel = 4.0;
......
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