drm_hwcomposer: Convert UNKNOWN sample range and dataspace
Distinguish between Dataspace and SampleRange of value UNKNOWN vs some
other unsupported value.
In practice, UNKNOWN (0) is common, and not handling it explicitly in
the conversion leads to a lot of log spam.
Change-Id: Id4ff7884f96e0403e5fb5f628f2989597b8bbea2
Signed-off-by: Drew Davenport <ddavenport@google.com>
diff --git a/hwc3/ComposerClient.cpp b/hwc3/ComposerClient.cpp
index fe520ed..470c448 100644
--- a/hwc3/ComposerClient.cpp
+++ b/hwc3/ComposerClient.cpp
@@ -108,6 +108,8 @@
case static_cast<int32_t>(
common::Dataspace::STANDARD_BT2020_CONSTANT_LUMINANCE):
return BufferColorSpace::kItuRec2020;
+ case static_cast<int32_t>(common::Dataspace::UNKNOWN):
+ return BufferColorSpace::kUndefined;
default:
ALOGE("Unsupported standard: %d", standard);
return std::nullopt;
@@ -127,6 +129,8 @@
return BufferSampleRange::kFullRange;
case static_cast<int32_t>(common::Dataspace::RANGE_LIMITED):
return BufferSampleRange::kLimitedRange;
+ case static_cast<int32_t>(common::Dataspace::UNKNOWN):
+ return BufferSampleRange::kUndefined;
default:
ALOGE("Unsupported sample range: %d", sample_range);
return std::nullopt;